mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
revert 112448 for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112449 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bb07ed3bb5
commit
1b9c848d0a
@ -574,11 +574,12 @@ void LICM::hoist(Instruction &I) {
|
||||
DEBUG(dbgs() << "LICM hoisting to " << Preheader->getName() << ": "
|
||||
<< I << "\n");
|
||||
|
||||
// The instruction is no longer in this loop.
|
||||
CurAST->deleteValue(&I);
|
||||
// Remove the instruction from its current basic block... but don't delete the
|
||||
// instruction.
|
||||
I.removeFromParent();
|
||||
|
||||
// Move the new node to the Preheader, before its terminator.
|
||||
I.moveBefore(Preheader->getTerminator());
|
||||
// Insert the new node in Preheader, before the terminator.
|
||||
Preheader->getInstList().insert(Preheader->getTerminator(), &I);
|
||||
|
||||
if (isa<LoadInst>(I)) ++NumMovedLoads;
|
||||
else if (isa<CallInst>(I)) ++NumMovedCalls;
|
||||
|
Loading…
Reference in New Issue
Block a user