[PATCH] D50377: [MustExecute] Rework LoopSafetyInfo to make it more optimistic about throws
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 20 22:15:37 PDT 2018
reames requested changes to this revision.
reames added inline comments.
This revision now requires changes to proceed.
================
Comment at: lib/Analysis/MustExecute.cpp:32
+ ICF.clear();
+ MayThrow = false;
+ // Figure out the fact that at least one block may throw.
----------------
We could chose to be more precise here by recomputing MayThrow lazily after invalidation.
================
Comment at: lib/Transforms/Scalar/LICM.cpp:406
Changed = true;
+ BlockChanged = true;
continue;
----------------
Invalidation is needed eagerly here.
================
Comment at: lib/Transforms/Scalar/LICM.cpp:474
CurAST->deleteValue(&I);
I.eraseFromParent();
}
----------------
BUG. Missing invalidation.
================
Comment at: lib/Transforms/Scalar/LICM.cpp:1267
Value *SomePtr = *PointerMustAliases.begin();
BasicBlock *Preheader = CurLoop->getLoopPreheader();
----------------
There needs to be some invalidations somewhere within this function.
================
Comment at: lib/Transforms/Scalar/LoopUnswitch.cpp:514
AC = &getAnalysis<AssumptionCacheTracker>().getAssumptionCache(
*L->getHeader()->getParent());
LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
----------------
The fact there is no invalidation in loop unswitch is severely suspicious.
https://reviews.llvm.org/D50377
More information about the llvm-commits
mailing list