cosmetic changes from review of last patch. obvious
authorDale Johannesen <dalej@apple.com>
Sun, 25 Feb 2007 18:31:31 +0000 (18:31 +0000)
committerDale Johannesen <dalej@apple.com>
Sun, 25 Feb 2007 18:31:31 +0000 (18:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34598 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMConstantIslandPass.cpp
lib/Target/ARM/README.txt

index 422e0e4cb71f7a14ba181b76683e87f4bb78bac5..8fe8167abaf5f736356fc2e357a965e23fab291b 100644 (file)
@@ -558,7 +558,7 @@ MachineBasicBlock *ARMConstantIslands::SplitBlockBeforeInstr(MachineInstr *MI) {
   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 @@ static bool BBIsJumpedOver(MachineBasicBlock *MBB) {
 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;
 }
 
index 8f80b79fc3309040b1ea4916a8c966c1993f20b0..9f285812a896c5dcddfa1e253da75a52d0c46835 100644 (file)
@@ -24,8 +24,9 @@ things that can be done:
 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.