summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineCombiner.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2015-08-11 14:31:14 +0000
committerSanjay Patel <spatel@rotateright.com>2015-08-11 14:31:14 +0000
commit74ca3126663217a4afce759e342a074f9d91c831 (patch)
treec9d8834894deee7aea202a465ee6f12ee3e58d2e /llvm/lib/CodeGen/MachineCombiner.cpp
parent52c2691829200710139decef3d0f5627423554bb (diff)
downloadbcm5719-llvm-74ca3126663217a4afce759e342a074f9d91c831.tar.gz
bcm5719-llvm-74ca3126663217a4afce759e342a074f9d91c831.zip
fix minsize detection: minsize attribute implies optimizing for size
llvm-svn: 244604
Diffstat (limited to 'llvm/lib/CodeGen/MachineCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineCombiner.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineCombiner.cpp b/llvm/lib/CodeGen/MachineCombiner.cpp
index aab436f4a5a..3a20d15880f 100644
--- a/llvm/lib/CodeGen/MachineCombiner.cpp
+++ b/llvm/lib/CodeGen/MachineCombiner.cpp
@@ -426,9 +426,7 @@ bool MachineCombiner::runOnMachineFunction(MachineFunction &MF) {
MRI = &MF.getRegInfo();
Traces = &getAnalysis<MachineTraceMetrics>();
MinInstr = 0;
-
- // FIXME: Use Function::optForSize().
- OptSize = MF.getFunction()->hasFnAttribute(Attribute::OptimizeForSize);
+ OptSize = MF.getFunction()->optForSize();
DEBUG(dbgs() << getPassName() << ": " << MF.getName() << '\n');
if (!TII->useMachineCombiner()) {
OpenPOWER on IntegriCloud