summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-01-07 04:07:22 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-01-07 04:07:22 +0000
commit8cdce7e69074ab4db9769d82ba91a8bd8e399519 (patch)
treec46975002e160367d0d02a24700253ed10561073 /llvm/lib/Target/ARM
parent6cc8d49885981be90db5f6a82fa9435d5fb339e7 (diff)
downloadbcm5719-llvm-8cdce7e69074ab4db9769d82ba91a8bd8e399519.tar.gz
bcm5719-llvm-8cdce7e69074ab4db9769d82ba91a8bd8e399519.zip
Use getRegForValue() to materialize the address of ARM globals.
This enables basic local CSE, giving us 20% smaller code for consumer-typeset in -O0 builds. <rdar://problem/10658692> llvm-svn: 147720
Diffstat (limited to 'llvm/lib/Target/ARM')
-rw-r--r--llvm/lib/Target/ARM/ARMFastISel.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/llvm/lib/Target/ARM/ARMFastISel.cpp b/llvm/lib/Target/ARM/ARMFastISel.cpp
index 56e3d495304..9b056d703c7 100644
--- a/llvm/lib/Target/ARM/ARMFastISel.cpp
+++ b/llvm/lib/Target/ARM/ARMFastISel.cpp
@@ -865,16 +865,6 @@ bool ARMFastISel::ARMComputeAddress(const Value *Obj, Address &Addr) {
}
}
- // Materialize the global variable's address into a reg which can
- // then be used later to load the variable.
- if (const GlobalValue *GV = dyn_cast<GlobalValue>(Obj)) {
- unsigned Tmp = ARMMaterializeGV(GV, TLI.getValueType(Obj->getType()));
- if (Tmp == 0) return false;
-
- Addr.Base.Reg = Tmp;
- return true;
- }
-
// Try to get this in a register if nothing else has worked.
if (Addr.Base.Reg == 0) Addr.Base.Reg = getRegForValue(Obj);
return Addr.Base.Reg != 0;
OpenPOWER on IntegriCloud