[PATCH] D25848: [PM/OptBisect] Don't crash with some particular values of -opt-bisect-limit=
Andy Kaylor via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 15 12:34:42 PST 2016
andrew.w.kaylor added a comment.
What do you think of this change instead?
Index: lib/Transforms/Scalar/LICM.cpp
===================================================================
--- lib/Transforms/Scalar/LICM.cpp (revision 289480)
+++ lib/Transforms/Scalar/LICM.cpp (working copy)
@@ -124,8 +124,13 @@
}
bool runOnLoop(Loop *L, LPPassManager &LPM) override {
- if (skipLoop(L))
+ if (skipLoop(L)) {
+ // If we have run LICM on a previous loop but now we are skipping
+ // (because we've hit the opt-bisect limit), we need to clear the
+ // loop alias information.
+ LICM.getLoopToAliasSetMap().clear();
return false;
+ }
auto *SE = getAnalysisIfAvailable<ScalarEvolutionWrapperPass>();
return LICM.runOnLoop(L,
https://reviews.llvm.org/D25848
More information about the llvm-commits
mailing list