diff options
author | Chris Lattner <sabre@nondot.org> | 2003-12-18 08:12:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-12-18 08:12:32 +0000 |
commit | ba7df4c48235964f1b8d133c98886781b5f853e2 (patch) | |
tree | 6a527d55cfb5a80920de93473e4b32071b31dcf1 /lib/Transforms/Scalar | |
parent | 2cffeec014537a5f4d2313a5c21c3aa6fcf33288 (diff) | |
download | external_llvm-ba7df4c48235964f1b8d133c98886781b5f853e2.zip external_llvm-ba7df4c48235964f1b8d133c98886781b5f853e2.tar.gz external_llvm-ba7df4c48235964f1b8d133c98886781b5f853e2.tar.bz2 |
When we delete instructions from the loop, make sure to remove them from the
AliasSetTracker as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10507 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar')
-rw-r--r-- | lib/Transforms/Scalar/LICM.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp index 6046f02..1916229 100644 --- a/lib/Transforms/Scalar/LICM.cpp +++ b/lib/Transforms/Scalar/LICM.cpp @@ -387,6 +387,7 @@ void LICM::sink(Instruction &I) { if (ExitBlocks.size() == 1) { if (!isExitBlockDominatedByBlockInLoop(ExitBlocks[0], I.getParent())) { // Instruction is not used, just delete it. + CurAST->remove(&I); I.getParent()->getInstList().erase(&I); } else { // Move the instruction to the start of the exit block, after any PHI @@ -399,6 +400,7 @@ void LICM::sink(Instruction &I) { } } else if (ExitBlocks.size() == 0) { // The instruction is actually dead if there ARE NO exit blocks. + CurAST->remove(&I); I.getParent()->getInstList().erase(&I); } else { // Otherwise, if we have multiple exits, use the PromoteMem2Reg function to |