cosmetic changes from review of last patch. obvious
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34598 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/ARM/ARMConstantIslandPass.cpp b/lib/Target/ARM/ARMConstantIslandPass.cpp
index 422e0e4..8fe8167 100644
--- a/lib/Target/ARM/ARMConstantIslandPass.cpp
+++ b/lib/Target/ARM/ARMConstantIslandPass.cpp
@@ -558,7 +558,7 @@
return NewBB;
}
-//// OffsetIsInRange - Checks whether UserOffset is within MaxDisp of
+/// OffsetIsInRange - Checks whether UserOffset is within MaxDisp of
/// TrialOffset.
bool ARMConstantIslands::OffsetIsInRange(unsigned UserOffset,
unsigned TrialOffset, unsigned MaxDisp, bool NegativeOK) {
@@ -631,7 +631,7 @@
void ARMConstantIslands::AdjustBBOffsetsAfter(MachineBasicBlock *BB, int delta)
{
MachineFunction::iterator MBBI = BB->getParent()->end();
- for(int i=BB->getNumber()+1; i<=prior(MBBI)->getNumber(); i++)
+ for(unsigned i=BB->getNumber()+1; i<BB->getParent()->getNumBlockIDs(); i++)
BBOffsets[i] += delta;
}
diff --git a/lib/Target/ARM/README.txt b/lib/Target/ARM/README.txt
index 8f80b79..9f28581 100644
--- a/lib/Target/ARM/README.txt
+++ b/lib/Target/ARM/README.txt
@@ -24,8 +24,9 @@
1. When there isn't an existing water, the current MBB is split right after
the use. It would be profitable to look farther forward, especially on Thumb,
where negative offsets won't work.
-Now it will put the island at the end of the block if that is in range. If it
-is not in range things still work as above, which is poor on Thumb.
+(Partially fixed: it will put the island at the end of the block if that is
+in range. If it is not in range things still work as above, which is poor on
+Thumb.)
2. There may be some advantage to trying to be smarter about the initial
placement, rather than putting everything at the end.