mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-20 18:56:04 +00:00
fit in 80 cols and use MBB::isSuccessor instead of a hand
rolled std::find. llvm-svn: 123164
This commit is contained in:
parent
772e26df36
commit
0e49a35bd2
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user