diff options
author | Eric Christopher <echristo@apple.com> | 2011-06-23 06:24:52 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2011-06-23 06:24:52 +0000 |
commit | 96513120b73821726d0e33f2a64afbe464cd8b74 (patch) | |
tree | bb51f3ebc9ee79cd1dfc742611d26577244684cc /llvm/lib/Transforms/Scalar/LoopUnswitch.cpp | |
parent | b0d8199925611f010f87a5c1450d054b4ab9293e (diff) | |
download | bcm5719-llvm-96513120b73821726d0e33f2a64afbe464cd8b74.tar.gz bcm5719-llvm-96513120b73821726d0e33f2a64afbe464cd8b74.zip |
Revert r133513:
"Reinstate r133435 and r133449 (reverted in r133499) now that the clang
self-hosted build failure has been fixed (r133512)."
Due to some additional warnings.
llvm-svn: 133700
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopUnswitch.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopUnswitch.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp index 840c4b69cf0..e05f29c3e13 100644 --- a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -1021,10 +1021,6 @@ void LoopUnswitch::SimplifyCode(std::vector<Instruction*> &Worklist, Loop *L) { while (PHINode *PN = dyn_cast<PHINode>(Succ->begin())) ReplaceUsesOfWith(PN, PN->getIncomingValue(0), Worklist, L, LPM); - // If Succ has any successors with PHI nodes, update them to have - // entries coming from Pred instead of Succ. - Succ->replaceAllUsesWith(Pred); - // Move all of the successor contents from Succ to Pred. Pred->getInstList().splice(BI, Succ->getInstList(), Succ->begin(), Succ->end()); @@ -1032,6 +1028,10 @@ void LoopUnswitch::SimplifyCode(std::vector<Instruction*> &Worklist, Loop *L) { BI->eraseFromParent(); RemoveFromWorklist(BI, Worklist); + // If Succ has any successors with PHI nodes, update them to have + // entries coming from Pred instead of Succ. + Succ->replaceAllUsesWith(Pred); + // Remove Succ from the loop tree. LI->removeBlock(Succ); LPM->deleteSimpleAnalysisValue(Succ, L); |