1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00

When we delete instructions from the loop, make sure to remove them from the

AliasSetTracker as well.

llvm-svn: 10507
This commit is contained in:
Chris Lattner 2003-12-18 08:12:32 +00:00
parent 457dd0b6c7
commit 17122cbe7b

View File

@ -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