Cleanup getUserOffset. Issues related to inline assembler length and
authorReed Kotler <rkotler@mips.com>
Tue, 5 Nov 2013 21:39:57 +0000 (21:39 +0000)
committerReed Kotler <rkotler@mips.com>
Tue, 5 Nov 2013 21:39:57 +0000 (21:39 +0000)
alignment will be handled differently than in ARM constant islands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194096 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Mips/MipsConstantIslandPass.cpp

index b15ec06441fb9260f3346fd4ef00030460287338..36b531487257d9ebad112003f0e8f0e10b5096f7 100644 (file)
@@ -766,23 +766,8 @@ void MipsConstantIslands::updateForInsertedWaterBlock
   WaterList.insert(IP, NewBB);
 }
 
-/// getUserOffset - Compute the offset of U.MI as seen by the hardware
-/// displacement computation.  Update U.KnownAlignment to match its current
-/// basic block location.
 unsigned MipsConstantIslands::getUserOffset(CPUser &U) const {
-  unsigned UserOffset = getOffsetOf(U.MI);
-  const BasicBlockInfo &BBI = BBInfo[U.MI->getParent()->getNumber()];
-  unsigned KnownBits = BBI.internalKnownBits();
-
-  // The value read from PC is offset from the actual instruction address.
-
-
-  // Because of inline assembly, we may not know the alignment (mod 4) of U.MI.
-  // Make sure U.getMaxDisp() returns a constrained range.
-  U.KnownAlignment = (KnownBits >= 2);
-
-
-  return UserOffset;
+  return getOffsetOf(U.MI);
 }
 
 /// Split the basic block containing MI into two blocks, which are joined by