diff options
| author | Chris Lattner <sabre@nondot.org> | 2011-01-10 07:51:31 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2011-01-10 07:51:31 +0000 |
| commit | 6c8b8dd5228a17ecc12fd61d58578f5186b07e74 (patch) | |
| tree | ffb4792f0ae9e7f5250d07eec808675423fc9d38 /llvm/lib/CodeGen/MachineCSE.cpp | |
| parent | a8bac7f514ae46a7d4b26d05762ee799b78462ac (diff) | |
| download | bcm5719-llvm-6c8b8dd5228a17ecc12fd61d58578f5186b07e74.tar.gz bcm5719-llvm-6c8b8dd5228a17ecc12fd61d58578f5186b07e74.zip | |
fit in 80 cols and use MBB::isSuccessor instead of a hand
rolled std::find.
llvm-svn: 123164
Diffstat (limited to 'llvm/lib/CodeGen/MachineCSE.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/MachineCSE.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/MachineCSE.cpp b/llvm/lib/CodeGen/MachineCSE.cpp index 60ad46a0d3b..07a7d27b019 100644 --- a/llvm/lib/CodeGen/MachineCSE.cpp +++ b/llvm/lib/CodeGen/MachineCSE.cpp @@ -284,14 +284,13 @@ bool MachineCSE::isProfitableToCSE(unsigned CSReg, unsigned Reg, MachineInstr *CSMI, MachineInstr *MI) { // FIXME: Heuristics that works around the lack the live range splitting. - // Heuristics #1: Don't cse "cheap" computating if the def is not local or in an - // immediate predecessor. We don't want to increase register pressure and end up - // causing other computation to be spilled. + // Heuristics #1: Don't CSE "cheap" computation if the def is not local or in + // an immediate predecessor. We don't want to increase register pressure and + // end up causing other computation to be spilled. if (MI->getDesc().isAsCheapAsAMove()) { MachineBasicBlock *CSBB = CSMI->getParent(); MachineBasicBlock *BB = MI->getParent(); - if (CSBB != BB && - find(CSBB->succ_begin(), CSBB->succ_end(), BB) == CSBB->succ_end()) + if (CSBB != BB && !CSBB->isSuccessor(BB)) return false; } |

