mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-08 13:00:50 +00:00
Small optimization to speed up replacementPreservesLCSSAForm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122600 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e21083aa3a
commit
9bc6a90146
@ -1029,6 +1029,10 @@ public:
|
||||
// instruction.
|
||||
Instruction *I = dyn_cast<Instruction>(To);
|
||||
if (!I) return true;
|
||||
// If both instructions are defined in the same basic block then replacement
|
||||
// cannot break LCSSA form.
|
||||
if (I->getParent() == From->getParent())
|
||||
return true;
|
||||
// If the instruction is not defined in a loop then it can safely replace
|
||||
// anything.
|
||||
Loop *ToLoop = getLoopFor(I->getParent());
|
||||
|
Loading…
Reference in New Issue
Block a user