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/ARMLoadStoreOptimizer.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/ARMLoadStoreOptimizer.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp b/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp index f5c5b1f73c6..73db4abbf69 100644 --- a/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp +++ b/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp @@ -1286,7 +1286,7 @@ bool ARMLoadStoreOpt::MergeBaseUpdateLSMultiple(MachineInstr *MI) { // can still change to a writeback form as that will save us 2 bytes // of code size. It can create WAW hazards though, so only do it if // we're minimizing code size. - if (!MBB.getParent()->getFunction().optForMinSize() || !BaseKill) + if (!STI->optForMinSize() || !BaseKill) return false; bool HighRegsUsed = false; |