mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
[GVN][NFC] Mark instruction for deletion instead of immediate erasing in LoadPRE
It is done to uniformly handle instructions removal. Differential Revision: https://reviews.llvm.org/D39369 llvm-svn: 316884
This commit is contained in:
parent
bd4dda833e
commit
9d3ed5c225
@ -1167,8 +1167,7 @@ bool GVN::PerformLoadPRE(LoadInst *LI, AvailValInBlkVect &ValuesPerBlock,
|
||||
if (!CanDoPRE) {
|
||||
while (!NewInsts.empty()) {
|
||||
Instruction *I = NewInsts.pop_back_val();
|
||||
if (MD) MD->removeInstruction(I);
|
||||
I->eraseFromParent();
|
||||
markInstructionForDeletion(I);
|
||||
}
|
||||
// HINT: Don't revert the edge-splitting as following transformation may
|
||||
// also need to split these critical edges.
|
||||
|
Loading…
Reference in New Issue
Block a user