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.