summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2014-07-04 01:55:26 +0000
committerEric Christopher <echristo@gmail.com>2014-07-04 01:55:26 +0000
commitc1058df66f15589012f5e2dc1ab571906778e8cc (patch)
tree4e038f2de8ee0011be947a0ad0529641abca247b /llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
parentac90380b5e9ef1c4fa32ab0bee869a0be5ddbea2 (diff)
downloadbcm5719-llvm-c1058df66f15589012f5e2dc1ab571906778e8cc.tar.gz
bcm5719-llvm-c1058df66f15589012f5e2dc1ab571906778e8cc.zip
Move function dependent resetting of a subtarget variable out of the
subtarget. This involved having the movt predicate take the current function - since we care about size in instruction selection for whether or not to use movw/movt take the function so we can check the attributes. This required adding the current MachineFunction to FastISel and propagating through. llvm-svn: 212309
Diffstat (limited to 'llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
index eec5d14100c..0288db91dcb 100644
--- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
@@ -1887,7 +1887,8 @@ bool llvm::tryFoldSPUpdateIntoPushPop(const ARMSubtarget &Subtarget,
unsigned NumBytes) {
// This optimisation potentially adds lots of load and store
// micro-operations, it's only really a great benefit to code-size.
- if (!Subtarget.isMinSize())
+ if (!MF.getFunction()->getAttributes().hasAttribute(
+ AttributeSet::FunctionIndex, Attribute::MinSize))
return false;
// If only one register is pushed/popped, LLVM can use an LDR/STR
OpenPOWER on IntegriCloud