summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen/CodeGeneration.cpp
diff options
context:
space:
mode:
authorPhilip Pfaffe <philip.pfaffe@gmail.com>2017-08-10 07:43:46 +0000
committerPhilip Pfaffe <philip.pfaffe@gmail.com>2017-08-10 07:43:46 +0000
commitf43e7c2e9733448624fe05cd186cc440daf83e4b (patch)
tree0ca16341a3ac523ebd41204e480fa8318cea4f1e /polly/lib/CodeGen/CodeGeneration.cpp
parent2f4e2e2758abc28ebc2215c293f5f77b7711ed89 (diff)
downloadbcm5719-llvm-f43e7c2e9733448624fe05cd186cc440daf83e4b.tar.gz
bcm5719-llvm-f43e7c2e9733448624fe05cd186cc440daf83e4b.zip
[Polly][PM] Improve invalidation in the Scop-Pipeline
Summary: During code generation for a Scop we modify the IR of a function. While this shouldn't affect a Scop in the formal sense, the implementation caches various information about the IR such as SCEV expressions for bounds or parameters. This cached information needs to be updated or invalidated. To this end, SPMUpdater allows passes to report when they've invalidated a Scop to the PassManager, which will then flush and recompute all Scops. This in turn invalidates all iterators, so references to Scops shouldn't be held. Reviewers: grosser, Meinersbur, bollu Reviewed By: grosser Subscribers: llvm-commits, pollydev Differential Revision: https://reviews.llvm.org/D36524 llvm-svn: 310551
Diffstat (limited to 'polly/lib/CodeGen/CodeGeneration.cpp')
-rw-r--r--polly/lib/CodeGen/CodeGeneration.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp
index 9f46715c580..76022d7b594 100644
--- a/polly/lib/CodeGen/CodeGeneration.cpp
+++ b/polly/lib/CodeGen/CodeGeneration.cpp
@@ -328,8 +328,10 @@ PreservedAnalyses
polly::CodeGenerationPass::run(Scop &S, ScopAnalysisManager &SAM,
ScopStandardAnalysisResults &AR, SPMUpdater &U) {
auto &AI = SAM.getResult<IslAstAnalysis>(S, AR);
- if (CodeGen(S, AI, AR.LI, AR.DT, AR.SE, AR.RI))
+ if (CodeGen(S, AI, AR.LI, AR.DT, AR.SE, AR.RI)) {
+ U.invalidateScop(S);
return PreservedAnalyses::none();
+ }
return PreservedAnalyses::all();
}
OpenPOWER on IntegriCloud