[PATCH] D59263: Moving ManagedMemoryRewritePass when hybrid option is selected
lorenzo chelini via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 12 09:25:57 PDT 2019
chelini created this revision.
chelini added reviewers: grosser, Meinersbur, bollu.
chelini added a project: Polly.
Herald added subscribers: llvm-commits, jdoerfert.
Herald added a project: LLVM.
Compiling with `polly-target=hybrid` was causing Polly to occur two times in the pipeline. The reason was how the `ManagedMemoryRewritePass` was registered in the pass manager. Being `ManagedMemoryRewritePass` a Modulepass was forcing all previous passes to get recomputed. This commit avoids Polly to appear two times in the pipeline registering the `ManagedMemoryRewritePass` later in the pass manager.
Repository:
rPLO Polly
https://reviews.llvm.org/D59263
Files:
lib/Support/RegisterPasses.cpp
Index: lib/Support/RegisterPasses.cpp
===================================================================
--- lib/Support/RegisterPasses.cpp
+++ lib/Support/RegisterPasses.cpp
@@ -349,12 +349,9 @@
PM.add(polly::createPruneUnprofitablePass());
#ifdef GPU_CODEGEN
- if (Target == TARGET_HYBRID) {
+ if (Target == TARGET_HYBRID)
PM.add(
polly::createPPCGCodeGenerationPass(GPUArchChoice, GPURuntimeChoice));
- PM.add(polly::createManagedMemoryRewritePassPass(GPUArchChoice,
- GPURuntimeChoice));
- }
#endif
if (Target == TARGET_CPU || Target == TARGET_HYBRID)
switch (Optimizer) {
@@ -388,6 +385,12 @@
}
#endif
+#ifdef GPU_CODEGEN
+ if (Target == TARGET_HYBRID)
+ PM.add(polly::createManagedMemoryRewritePassPass(GPUArchChoice,
+ GPURuntimeChoice));
+#endif
+
// FIXME: This dummy ModulePass keeps some programs from miscompiling,
// probably some not correctly preserved analyses. It acts as a barrier to
// force all analysis results to be recomputed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59263.190278.patch
Type: text/x-patch
Size: 1111 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190312/65c8c723/attachment.bin>
More information about the llvm-commits
mailing list