Add some comments linking back to PR28400.
authorSean Silva <chisophugis@gmail.com>
Mon, 8 Aug 2016 07:03:49 +0000 (07:03 +0000)
committerSean Silva <chisophugis@gmail.com>
Mon, 8 Aug 2016 07:03:49 +0000 (07:03 +0000)
Thanks to Mehdi for the suggestion!

llvm-svn: 277984

llvm/lib/Transforms/IPO/FunctionAttrs.cpp
llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp
llvm/lib/Transforms/Scalar/NaryReassociate.cpp
llvm/lib/Transforms/Utils/LoopSimplify.cpp

index e4b86e9..6496f3a 100644 (file)
@@ -1274,6 +1274,8 @@ ReversePostOrderFunctionAttrsPass::run(Module &M, AnalysisManager<Module> &AM) {
 
   // CallGraphAnalysis holds AssertingVH and must be invalidated eagerly so
   // that other passes don't delete stuff from under it.
+  // FIXME: We need to invalidate this to avoid PR28400. Is there a better
+  // solution?
   AM.invalidate<CallGraphAnalysis>(M);
 
   if (!Changed)
index a9acbd0..9ecaefe 100644 (file)
@@ -434,7 +434,11 @@ AlignmentFromAssumptionsPass::run(Function &F, FunctionAnalysisManager &AM) {
   ScalarEvolution &SE = AM.getResult<ScalarEvolutionAnalysis>(F);
   DominatorTree &DT = AM.getResult<DominatorTreeAnalysis>(F);
   bool Changed = runImpl(F, AC, &SE, &DT);
+
+  // FIXME: We need to invalidate this to avoid PR28400. Is there a better
+  // solution?
   AM.invalidate<ScalarEvolutionAnalysis>(F);
+
   if (!Changed)
     return PreservedAnalyses::all();
   PreservedAnalyses PA;
index 0ac1edf..84ccb50 100644 (file)
@@ -157,7 +157,11 @@ PreservedAnalyses NaryReassociatePass::run(Function &F,
   auto *TTI = &AM.getResult<TargetIRAnalysis>(F);
 
   bool Changed = runImpl(F, AC, DT, SE, TLI, TTI);
+
+  // FIXME: We need to invalidate this to avoid PR28400. Is there a better
+  // solution?
   AM.invalidate<ScalarEvolutionAnalysis>(F);
+
   if (!Changed)
     return PreservedAnalyses::all();
 
index d24a7aa..5b21ad6 100644 (file)
@@ -869,6 +869,8 @@ PreservedAnalyses LoopSimplifyPass::run(Function &F,
   for (LoopInfo::iterator I = LI->begin(), E = LI->end(); I != E; ++I)
     Changed |= simplifyLoop(*I, DT, LI, SE, AC, true /* PreserveLCSSA */);
 
+  // FIXME: We need to invalidate this to avoid PR28400. Is there a better
+  // solution?
   AM.invalidate<ScalarEvolutionAnalysis>(F);
 
   if (!Changed)