[llvm] r194096 - Cleanup getUserOffset. Issues related to inline assembler length and

Reed Kotler rkotler at mips.com
Tue Nov 5 13:39:57 PST 2013


Author: rkotler
Date: Tue Nov  5 15:39:57 2013
New Revision: 194096

URL: http://llvm.org/viewvc/llvm-project?rev=194096&view=rev
Log:
Cleanup getUserOffset. Issues related to inline assembler length and
alignment will be handled differently than in ARM constant islands.


Modified:
    llvm/trunk/lib/Target/Mips/MipsConstantIslandPass.cpp

Modified: llvm/trunk/lib/Target/Mips/MipsConstantIslandPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsConstantIslandPass.cpp?rev=194096&r1=194095&r2=194096&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsConstantIslandPass.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsConstantIslandPass.cpp Tue Nov  5 15:39:57 2013
@@ -766,23 +766,8 @@ void MipsConstantIslands::updateForInser
   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





More information about the llvm-commits mailing list