mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
Convert ScalarEvolution to use CallbackVH for its internal map. This
makes ScalarEvolution::deleteValueFromRecords, and it's code that subtly needed to be called before ReplaceAllUsesWith, unnecessary. It also makes ValueDeletionListener unnecessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70645 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -124,7 +124,6 @@ DeleteTriviallyDeadInstructions(SmallPtrSet<Instruction*, 16> &Insts) {
|
||||
for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i)
|
||||
if (Instruction *U = dyn_cast<Instruction>(I->getOperand(i)))
|
||||
Insts.insert(U);
|
||||
SE->deleteValueFromRecords(I);
|
||||
DOUT << "INDVARS: Deleting: " << *I;
|
||||
I->eraseFromParent();
|
||||
Changed = true;
|
||||
@@ -308,7 +307,6 @@ void IndVarSimplify::RewriteLoopExitValues(Loop *L,
|
||||
// the PHI entirely. This is safe, because the NewVal won't be variant
|
||||
// in the loop, so we don't need an LCSSA phi node anymore.
|
||||
if (NumPreds == 1) {
|
||||
SE->deleteValueFromRecords(PN);
|
||||
PN->replaceAllUsesWith(ExitVal);
|
||||
PN->eraseFromParent();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user