[PATCH] D102956: [polly] Port NewPM PassInstrumentation to Scop passes.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 21 16:25:10 PDT 2021
efriedma created this revision.
efriedma added reviewers: fedor.sergeev, aeubanks, ychen, Meinersbur, pfaffe.
Herald added a reviewer: bollu.
efriedma requested review of this revision.
Herald added a project: LLVM.
Makes opt-bisect work with scop passes.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D102956
Files:
polly/lib/Analysis/ScopPass.cpp
Index: polly/lib/Analysis/ScopPass.cpp
===================================================================
--- polly/lib/Analysis/ScopPass.cpp
+++ polly/lib/Analysis/ScopPass.cpp
@@ -76,10 +76,16 @@
PassManager<Scop, ScopAnalysisManager, ScopStandardAnalysisResults &,
SPMUpdater &>::run(Scop &S, ScopAnalysisManager &AM,
ScopStandardAnalysisResults &AR, SPMUpdater &U) {
+ PassInstrumentation PI = AM.getResult<PassInstrumentationAnalysis>(S, AR);
auto PA = PreservedAnalyses::all();
for (auto &Pass : Passes) {
+ if (!PI.runBeforePass<Scop>(*Pass, S))
+ continue;
+
auto PassPA = Pass->run(S, AM, AR, U);
+ PI.runAfterPass(*Pass, S, PassPA);
+
AM.invalidate(S, PassPA);
PA.intersect(std::move(PassPA));
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102956.347149.patch
Type: text/x-patch
Size: 791 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210521/08de0566/attachment.bin>
More information about the llvm-commits
mailing list