mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-24 04:45:00 +00:00
Don't insert and erase load instruction. Simply create (new) and delete it.
llvm-svn: 167196
This commit is contained in:
parent
33e910f445
commit
131641627b
@ -2521,12 +2521,12 @@ private:
|
||||
// the computed value, and then replace the placeholder with LI, leaving
|
||||
// LI only used for this computation.
|
||||
Value *Placeholder
|
||||
= IRB.CreateLoad(UndefValue::get(LI.getType()->getPointerTo()));
|
||||
= new LoadInst(UndefValue::get(LI.getType()->getPointerTo()));
|
||||
V = insertInteger(TD, IRB, Placeholder, V, BeginOffset,
|
||||
getName(".insert"));
|
||||
LI.replaceAllUsesWith(V);
|
||||
Placeholder->replaceAllUsesWith(&LI);
|
||||
cast<Instruction>(Placeholder)->eraseFromParent();
|
||||
delete Placeholder;
|
||||
if (Pass.DeadSplitInsts.insert(&LI))
|
||||
Pass.DeadInsts.push_back(&LI);
|
||||
DEBUG(dbgs() << " to: " << *V << "\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user