[llvm] r291288 - Fix use after free
Xin Tong via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 6 13:49:08 PST 2017
Author: trentxintong
Date: Fri Jan 6 15:49:08 2017
New Revision: 291288
URL: http://llvm.org/viewvc/llvm-project?rev=291288&view=rev
Log:
Fix use after free
Summary: Fix use after free in LoopUnswitch
Reviewers: chenli, atrick, hfinkel, mzolotukhin
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D28412
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp?rev=291288&r1=291287&r2=291288&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp Fri Jan 6 15:49:08 2017
@@ -1382,8 +1382,8 @@ void LoopUnswitch::SimplifyCode(std::vec
Pred->getInstList().splice(BI->getIterator(), Succ->getInstList(),
Succ->begin(), Succ->end());
LPM->deleteSimpleAnalysisValue(BI, L);
- BI->eraseFromParent();
RemoveFromWorklist(BI, Worklist);
+ BI->eraseFromParent();
// Remove Succ from the loop tree.
LI->removeBlock(Succ);
More information about the llvm-commits
mailing list