[PM] Properly require and preserve OptimizationRemarkEmitter. NFCI.
commita72716228ae6c88e9138bef46ac02b6d1c9f0918
authorMichael Kruse <llvm@meinersbur.de>
Mon, 28 Aug 2017 14:07:33 +0000 (28 14:07 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Mon, 28 Aug 2017 14:07:33 +0000 (28 14:07 +0000)
tree821600dda75cddbb47312f2120f5e4858295c968
parent080c7182e73c8fc10c417a13ea2151f80cbbb630
[PM] Properly require and preserve OptimizationRemarkEmitter. NFCI.

Properly require and preserve the OptimizationRemarkEmitter for use in
ScopPass. Previously one had to get the ORE from ScopDetection because
CodeGeneration did not mark it as preserved. It would need to be
recomputed which results in the legacy PM to throw away all previous
SCoP analysis.

This also changes the implementation of ScopPass::getAnalysisUsage to
not unconditionally preserve all passes, but only those needed to be
preserved by any SCoP pass (at least when using the legacy PM). This
allows invalidating DependenceInfo (and IslAstInfo) in case the pass
would cause them to change (e.g. OpTree, DeLICM, MaximalArrayExpansion)

JSONImporter should also invalidate the DependenceInfo. In this patch
it marks DependenceInfo as preserved anyway because some regression
tests depend on it.

Differential Revision: https://reviews.llvm.org/D37010

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@311888 91177308-0d34-0410-b5e6-96231b3b80d8
include/polly/ScopBuilder.h
include/polly/ScopDetection.h
include/polly/ScopInfo.h
lib/Analysis/ScopBuilder.cpp
lib/Analysis/ScopInfo.cpp
lib/Analysis/ScopPass.cpp
lib/CodeGen/CodeGeneration.cpp
lib/CodeGen/IslAst.cpp
lib/CodeGen/PPCGCodeGeneration.cpp
lib/Exchange/JSONExporter.cpp
lib/Transform/ScheduleOptimizer.cpp