[llvm-commits] [llvm] r123164 - /llvm/trunk/lib/CodeGen/MachineCSE.cpp
Chris Lattner
sabre at nondot.org
Sun Jan 9 23:51:32 PST 2011
Author: lattner
Date: Mon Jan 10 01:51:31 2011
New Revision: 123164
URL: http://llvm.org/viewvc/llvm-project?rev=123164&view=rev
Log:
fit in 80 cols and use MBB::isSuccessor instead of a hand
rolled std::find.
Modified:
llvm/trunk/lib/CodeGen/MachineCSE.cpp
Modified: llvm/trunk/lib/CodeGen/MachineCSE.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineCSE.cpp?rev=123164&r1=123163&r2=123164&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineCSE.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineCSE.cpp Mon Jan 10 01:51:31 2011
@@ -284,14 +284,13 @@
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;
}
More information about the llvm-commits
mailing list