mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-19 23:29:20 +00:00
Update the value numbering interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12824 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7015a035e7
commit
adb7c0de39
@ -160,11 +160,14 @@ void GCSE::ReplaceInstructionWith(Instruction *I, Value *V) {
|
||||
++NumCallRemoved; // Keep track of calls eliminated
|
||||
++NumInstRemoved; // Keep track of number of insts eliminated
|
||||
|
||||
// Update value numbering
|
||||
getAnalysis<ValueNumbering>().deleteInstruction(I);
|
||||
|
||||
// If we are not replacing the instruction with a constant, we cannot do
|
||||
// anything special.
|
||||
if (!isa<Constant>(V)) {
|
||||
I->replaceAllUsesWith(V);
|
||||
|
||||
|
||||
// Erase the instruction from the program.
|
||||
I->getParent()->getInstList().erase(I);
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user