diff options
author | Sam Parker <sam.parker@arm.com> | 2019-02-08 07:57:42 +0000 |
---|---|---|
committer | Sam Parker <sam.parker@arm.com> | 2019-02-08 07:57:42 +0000 |
commit | 5b09834bc364313e48cc54dccd8f251232d84b65 (patch) | |
tree | 030e669eb5be27f9a814f9c0a6a838d442013542 /llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp | |
parent | 807960e6ef445971756389db7e0c0a001f411720 (diff) | |
download | bcm5719-llvm-5b09834bc364313e48cc54dccd8f251232d84b65.tar.gz bcm5719-llvm-5b09834bc364313e48cc54dccd8f251232d84b65.zip |
[ARM] Add OptMinSize to ARMSubtarget
In many places in the backend, we like to know whether we're
optimising for code size and this is performed by checking the
current machine function attributes. A subtarget is created on a
per-function basis, so it's possible to know when we're compiling for
code size on construction so record this in the new object.
Differential Revision: https://reviews.llvm.org/D57812
llvm-svn: 353501
Diffstat (limited to 'llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp index 7278680cb31..9c8fed0e223 100644 --- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp +++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp @@ -2265,7 +2265,7 @@ 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 (!MF.getFunction().optForMinSize()) + if (!Subtarget.optForMinSize()) return false; // If only one register is pushed/popped, LLVM can use an LDR/STR |