[llvm-commits] CVS: llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
Evan Cheng
evan.cheng at apple.com
Fri Apr 27 01:14:33 PDT 2007
Changes in directory llvm/lib/Target/ARM:
ARMConstantIslandPass.cpp updated: 1.36 -> 1.37
---
Log message:
Special handling of LEApcrel and tLEApcrel.
---
Diffs of the changes: (+11 -0)
ARMConstantIslandPass.cpp | 11 +++++++++++
1 files changed, 11 insertions(+)
Index: llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
diff -u llvm/lib/Target/ARM/ARMConstantIslandPass.cpp:1.36 llvm/lib/Target/ARM/ARMConstantIslandPass.cpp:1.37
--- llvm/lib/Target/ARM/ARMConstantIslandPass.cpp:1.36 Mon Apr 23 15:09:04 2007
+++ llvm/lib/Target/ARM/ARMConstantIslandPass.cpp Fri Apr 27 03:14:15 2007
@@ -377,6 +377,10 @@
// Constant pool entries can reach anything.
if (I->getOpcode() == ARM::CONSTPOOL_ENTRY)
continue;
+ if (I->getOpcode() == ARM::tLEApcrel) {
+ Bits = 8; // Taking the address of a CP entry.
+ break;
+ }
assert(0 && "Unknown addressing mode for CP reference!");
case ARMII::AddrMode1: // AM1: 8 bits << 2
Bits = 8;
@@ -869,6 +873,13 @@
MachineBasicBlock *NewMBB;
// Compute this only once, it's expensive
unsigned UserOffset = GetOffsetOf(UserMI) + (isThumb ? 4 : 8);
+
+ // Special cases: LEApcrel and tLEApcrel are two instructions MI's. The
+ // actual user is the second instruction.
+ if (UserMI->getOpcode() == ARM::LEApcrel)
+ UserOffset += 4;
+ else if (UserMI->getOpcode() == ARM::tLEApcrel)
+ UserOffset += 2;
// See if the current entry is within range, or there is a clone of it
// in range.
More information about the llvm-commits
mailing list