summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMISelLowering.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-10-26 01:17:44 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-10-26 01:17:44 +0000
commit043c9d3f7ad77516bb2c78307c269922fd0bfc5f (patch)
tree8af27631ab6c1da8730e85f857d04711dad41551 /llvm/lib/Target/ARM/ARMISelLowering.cpp
parent9b9932229d70ec9807e4a7f1de9ee8473a3196a9 (diff)
downloadbcm5719-llvm-043c9d3f7ad77516bb2c78307c269922fd0bfc5f.tar.gz
bcm5719-llvm-043c9d3f7ad77516bb2c78307c269922fd0bfc5f.zip
Revert part of r142530. The patch potentially hurts performance especially
on Darwin platforms where -Os means optimize for size without hurting performance. llvm-svn: 143002
Diffstat (limited to 'llvm/lib/Target/ARM/ARMISelLowering.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMISelLowering.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index 3f913ded1d1..fa5f0be1d74 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -2106,8 +2106,9 @@ SDValue ARMTargetLowering::LowerGlobalAddressELF(SDValue Op,
// If we have T2 ops, we can materialize the address directly via movt/movw
// pair. This is always cheaper in terms of performance, but uses at least 2
// extra bytes.
+ MachineFunction &MF = DAG.getMachineFunction();
if (Subtarget->useMovt() &&
- !DAG.getMachineFunction().getFunction()->hasFnAttr(Attribute::OptimizeForSize)) {
+ !MF.getFunction()->hasFnAttr(Attribute::OptimizeForSize)) {
++NumMovwMovt;
// FIXME: Once remat is capable of dealing with instructions with register
// operands, expand this into two nodes.
@@ -2132,8 +2133,7 @@ SDValue ARMTargetLowering::LowerGlobalAddressDarwin(SDValue Op,
ARMFunctionInfo *AFI = MF.getInfo<ARMFunctionInfo>();
// FIXME: Enable this for static codegen when tool issues are fixed.
- if (Subtarget->useMovt() && RelocM != Reloc::Static &&
- !DAG.getMachineFunction().getFunction()->hasFnAttr(Attribute::OptimizeForSize)) {
+ if (Subtarget->useMovt() && RelocM != Reloc::Static) {
++NumMovwMovt;
// FIXME: Once remat is capable of dealing with instructions with register
// operands, expand this into two nodes.
OpenPOWER on IntegriCloud