mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-05 17:39:16 +00:00
Use early exit to reduce indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83874 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9d16f2c0ba
commit
3b7573517c
@ -956,28 +956,29 @@ bool ARMConstantIslands::LookForWater(CPUser &U, unsigned UserOffset,
|
||||
MachineBasicBlock *&NewMBB) {
|
||||
water_iterator IPThatWouldPad;
|
||||
MachineBasicBlock* WaterBBThatWouldPad = NULL;
|
||||
if (!WaterList.empty()) {
|
||||
for (water_iterator IP = prior(WaterList.end()),
|
||||
B = WaterList.begin();; --IP) {
|
||||
MachineBasicBlock* WaterBB = *IP;
|
||||
if (WaterIsInRange(UserOffset, WaterBB, U)) {
|
||||
unsigned WBBId = WaterBB->getNumber();
|
||||
if (isThumb &&
|
||||
(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;
|
||||
IPThatWouldPad = IP;
|
||||
}
|
||||
} else {
|
||||
NewMBB = AcceptWater(WaterBB, IP);
|
||||
return true;
|
||||
if (WaterList.empty())
|
||||
return false;
|
||||
|
||||
for (water_iterator IP = prior(WaterList.end()),
|
||||
B = WaterList.begin();; --IP) {
|
||||
MachineBasicBlock* WaterBB = *IP;
|
||||
if (WaterIsInRange(UserOffset, WaterBB, U)) {
|
||||
unsigned WBBId = WaterBB->getNumber();
|
||||
if (isThumb &&
|
||||
(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;
|
||||
IPThatWouldPad = IP;
|
||||
}
|
||||
} else {
|
||||
NewMBB = AcceptWater(WaterBB, IP);
|
||||
return true;
|
||||
}
|
||||
if (IP == B)
|
||||
break;
|
||||
}
|
||||
if (IP == B)
|
||||
break;
|
||||
}
|
||||
if (isThumb && WaterBBThatWouldPad) {
|
||||
NewMBB = AcceptWater(WaterBBThatWouldPad, IPThatWouldPad);
|
||||
|
Loading…
x
Reference in New Issue
Block a user