Kill off the old SimplifyInstruction API by converting remaining users.
llvm-svn: 301673
This commit is contained in:
@@ -210,7 +210,7 @@ static PHINode *findPHIToPartitionLoops(Loop *L, DominatorTree *DT,
|
||||
for (BasicBlock::iterator I = L->getHeader()->begin(); isa<PHINode>(I); ) {
|
||||
PHINode *PN = cast<PHINode>(I);
|
||||
++I;
|
||||
if (Value *V = SimplifyInstruction(PN, DL, nullptr, DT, AC)) {
|
||||
if (Value *V = SimplifyInstruction(PN, {DL, nullptr, DT, AC})) {
|
||||
// This is a degenerate PHI already, don't modify it!
|
||||
PN->replaceAllUsesWith(V);
|
||||
PN->eraseFromParent();
|
||||
@@ -628,7 +628,7 @@ ReprocessLoop:
|
||||
PHINode *PN;
|
||||
for (BasicBlock::iterator I = L->getHeader()->begin();
|
||||
(PN = dyn_cast<PHINode>(I++)); )
|
||||
if (Value *V = SimplifyInstruction(PN, DL, nullptr, DT, AC)) {
|
||||
if (Value *V = SimplifyInstruction(PN, {DL, nullptr, DT, AC})) {
|
||||
if (SE) SE->forgetValue(PN);
|
||||
if (!PreserveLCSSA || LI->replacementPreservesLCSSAForm(PN, V)) {
|
||||
PN->replaceAllUsesWith(V);
|
||||
|
||||
Reference in New Issue
Block a user