diff options
author | Ellis Hoag <ellis.sparky.hoag@gmail.com> | 2024-10-28 09:45:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-28 09:45:03 -0700 |
commit | 6ab26eab4f1e06f2da7b3183c55666ad57f8866e (patch) | |
tree | 8d58cecc95cfea7a335f12e325e952263cb3db3e /llvm/lib/CodeGen/MachineCombiner.cpp | |
parent | 92412c106f5275b4b385f7c2d882008181de2854 (diff) | |
download | llvm-6ab26eab4f1e06f2da7b3183c55666ad57f8866e.zip llvm-6ab26eab4f1e06f2da7b3183c55666ad57f8866e.tar.gz llvm-6ab26eab4f1e06f2da7b3183c55666ad57f8866e.tar.bz2 |
Check hasOptSize() in shouldOptimizeForSize() (#112626)
Diffstat (limited to 'llvm/lib/CodeGen/MachineCombiner.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineCombiner.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/MachineCombiner.cpp b/llvm/lib/CodeGen/MachineCombiner.cpp index 5bfc1d6..141cc1f 100644 --- a/llvm/lib/CodeGen/MachineCombiner.cpp +++ b/llvm/lib/CodeGen/MachineCombiner.cpp @@ -77,9 +77,6 @@ class MachineCombiner : public MachineFunctionPass { TargetSchedModel TSchedModel; - /// True if optimizing for code size. - bool OptSize = false; - public: static char ID; MachineCombiner() : MachineFunctionPass(ID) { @@ -571,7 +568,7 @@ bool MachineCombiner::combineInstructions(MachineBasicBlock *MBB) { SparseSet<LiveRegUnit> RegUnits; RegUnits.setUniverse(TRI->getNumRegUnits()); - bool OptForSize = OptSize || llvm::shouldOptimizeForSize(MBB, PSI, MBFI); + bool OptForSize = llvm::shouldOptimizeForSize(MBB, PSI, MBFI); bool DoRegPressureReduce = TII->shouldReduceRegisterPressure(MBB, &RegClassInfo); @@ -733,7 +730,6 @@ bool MachineCombiner::runOnMachineFunction(MachineFunction &MF) { &getAnalysis<LazyMachineBlockFrequencyInfoPass>().getBFI() : nullptr; TraceEnsemble = nullptr; - OptSize = MF.getFunction().hasOptSize(); RegClassInfo.runOnMachineFunction(MF); LLVM_DEBUG(dbgs() << getPassName() << ": " << MF.getName() << '\n'); |