[polly] r356965 - Moving ManagedMemoryRewritePass when hybrid option is selected
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 25 16:26:59 PDT 2019
Author: meinersbur
Date: Mon Mar 25 16:26:59 2019
New Revision: 356965
URL: http://llvm.org/viewvc/llvm-project?rev=356965&view=rev
Log:
Moving ManagedMemoryRewritePass when hybrid option is selected
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. ManagedMemoryRewritePass being 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.
Patch by Lorenzo Chelini <l.chelini at icloud.com>
Differential Revision: https://reviews.llvm.org/D59263
Modified:
polly/trunk/lib/Support/RegisterPasses.cpp
Modified: polly/trunk/lib/Support/RegisterPasses.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Support/RegisterPasses.cpp?rev=356965&r1=356964&r2=356965&view=diff
==============================================================================
--- polly/trunk/lib/Support/RegisterPasses.cpp (original)
+++ polly/trunk/lib/Support/RegisterPasses.cpp Mon Mar 25 16:26:59 2019
@@ -349,12 +349,9 @@ void registerPollyPasses(llvm::legacy::P
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 @@ void registerPollyPasses(llvm::legacy::P
}
#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.
More information about the llvm-commits
mailing list