[llvm-commits] [llvm] r141210 - /llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
Jim Grosbach
grosbach at apple.com
Wed Oct 5 13:53:45 PDT 2011
Author: grosbach
Date: Wed Oct 5 15:53:43 2011
New Revision: 141210
URL: http://llvm.org/viewvc/llvm-project?rev=141210&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp?rev=141210&r1=141209&r2=141210&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp Wed Oct 5 15:53:43 2011
@@ -2017,13 +2017,13 @@
// Everything uses the new instruction now.
I->replaceAllUsesWith(Result);
+ // Move the name to the new instruction first.
+ Result->takeName(I);
+
// Push the new instruction and any users onto the worklist.
Worklist.Add(Result);
Worklist.AddUsersToWorkList(*Result);
- // Move the name to the new instruction first.
- Result->takeName(I);
-
// Insert the new instruction into the basic block...
BasicBlock *InstParent = I->getParent();
BasicBlock::iterator InsertPos = I;
More information about the llvm-commits
mailing list