diff options
author | Chris Lattner <sabre@nondot.org> | 2004-04-10 22:33:34 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-04-10 22:33:34 +0000 |
commit | adb7c0de394b4de58a0ac79092932c28ddc3dcf1 (patch) | |
tree | 31a2e42b3d3fa9ecd54ff9cd81acb1adf13e9ae2 /lib | |
parent | 7015a035e7295b6b33d89ded2147fb340675dfc0 (diff) | |
download | external_llvm-adb7c0de394b4de58a0ac79092932c28ddc3dcf1.zip external_llvm-adb7c0de394b4de58a0ac79092932c28ddc3dcf1.tar.gz external_llvm-adb7c0de394b4de58a0ac79092932c28ddc3dcf1.tar.bz2 |
Update the value numbering interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12824 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Scalar/GCSE.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/GCSE.cpp b/lib/Transforms/Scalar/GCSE.cpp index 8ed8238..bbefe81 100644 --- a/lib/Transforms/Scalar/GCSE.cpp +++ b/lib/Transforms/Scalar/GCSE.cpp @@ -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; |