aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2009-10-12 20:45:53 +0000
committerBob Wilson <bob.wilson@apple.com>2009-10-12 20:45:53 +0000
commit32c50e8f9920bb7835eb42926945c9a1e6385de5 (patch)
tree5e3c29d8452da5262bd7c50eee2f667920c8d4be
parentf1787b055c2e7cf1dea4f9e6b5d8ca8ee7048535 (diff)
Another minor clean-up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83897 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/ARM/ARMConstantIslandPass.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Target/ARM/ARMConstantIslandPass.cpp b/lib/Target/ARM/ARMConstantIslandPass.cpp
index 33b847281a..e47ddd18a5 100644
--- a/lib/Target/ARM/ARMConstantIslandPass.cpp
+++ b/lib/Target/ARM/ARMConstantIslandPass.cpp
@@ -952,11 +952,11 @@ MachineBasicBlock *ARMConstantIslands::AcceptWater(water_iterator IP) {
/// group, prefer the water that's farthest away.
bool ARMConstantIslands::LookForWater(CPUser &U, unsigned UserOffset,
MachineBasicBlock *&NewMBB) {
- water_iterator IPThatWouldPad;
- MachineBasicBlock* WaterBBThatWouldPad = NULL;
if (WaterList.empty())
return false;
+ bool FoundWaterThatWouldPad = false;
+ water_iterator IPThatWouldPad;
for (water_iterator IP = prior(WaterList.end()),
B = WaterList.begin();; --IP) {
MachineBasicBlock* WaterBB = *IP;
@@ -966,8 +966,8 @@ bool ARMConstantIslands::LookForWater(CPUser &U, unsigned UserOffset,
(BBOffsets[WBBId] + BBSizes[WBBId])%4 != 0) {
// This is valid Water, but would introduce padding. Remember
// it in case we don't find any Water that doesn't do this.
- if (!WaterBBThatWouldPad) {
- WaterBBThatWouldPad = WaterBB;
+ if (!FoundWaterThatWouldPad) {
+ FoundWaterThatWouldPad = true;
IPThatWouldPad = IP;
}
} else {
@@ -978,7 +978,7 @@ bool ARMConstantIslands::LookForWater(CPUser &U, unsigned UserOffset,
if (IP == B)
break;
}
- if (isThumb && WaterBBThatWouldPad) {
+ if (FoundWaterThatWouldPad) {
NewMBB = AcceptWater(IPThatWouldPad);
return true;
}