diff options
| author | Jim Grosbach <grosbach@apple.com> | 2011-10-05 20:53:43 +0000 | 
|---|---|---|
| committer | Jim Grosbach <grosbach@apple.com> | 2011-10-05 20:53:43 +0000 | 
| commit | e7abae0442ed1db5df991d2227f3d0af37ca3c30 (patch) | |
| tree | 26c3751e5ddbb4177a927a8217f848ddacb17719 /llvm/lib/Transforms | |
| parent | 8f9acfac898bc6667eaba6564d2a1b583d902c50 (diff) | |
| download | bcm5719-llvm-e7abae0442ed1db5df991d2227f3d0af37ca3c30.tar.gz bcm5719-llvm-e7abae0442ed1db5df991d2227f3d0af37ca3c30.zip | |
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.
llvm-svn: 141210
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/InstCombine/InstructionCombining.cpp | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp index cee27ff5913..c66f423a292 100644 --- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -2017,13 +2017,13 @@ bool InstCombiner::DoOneIteration(Function &F, unsigned Iteration) {          // 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; | 

