mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-12 16:25:18 +00:00
Re-commit 141203, but much more conservative.
Just pull the instruction name, but don't change the order of anything else. That keeps --debug happy and non-crashing, but doesn't change how the worklist gets built. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141210 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2017,13 +2017,13 @@ bool InstCombiner::DoOneIteration(Function &F, unsigned Iteration) {
|
|||||||
// Everything uses the new instruction now.
|
// Everything uses the new instruction now.
|
||||||
I->replaceAllUsesWith(Result);
|
I->replaceAllUsesWith(Result);
|
||||||
|
|
||||||
|
// Move the name to the new instruction first.
|
||||||
|
Result->takeName(I);
|
||||||
|
|
||||||
// Push the new instruction and any users onto the worklist.
|
// Push the new instruction and any users onto the worklist.
|
||||||
Worklist.Add(Result);
|
Worklist.Add(Result);
|
||||||
Worklist.AddUsersToWorkList(*Result);
|
Worklist.AddUsersToWorkList(*Result);
|
||||||
|
|
||||||
// Move the name to the new instruction first.
|
|
||||||
Result->takeName(I);
|
|
||||||
|
|
||||||
// Insert the new instruction into the basic block...
|
// Insert the new instruction into the basic block...
|
||||||
BasicBlock *InstParent = I->getParent();
|
BasicBlock *InstParent = I->getParent();
|
||||||
BasicBlock::iterator InsertPos = I;
|
BasicBlock::iterator InsertPos = I;
|
||||||
|
Reference in New Issue
Block a user