[polly] r179674 - IndependentBlocks: We can only reconstruct PHI nodes that are within the ScoP

Tobias Grosser grosser at fim.uni-passau.de
Wed Apr 17 00:20:36 PDT 2013


Author: grosser
Date: Wed Apr 17 02:20:36 2013
New Revision: 179674

URL: http://llvm.org/viewvc/llvm-project?rev=179674&view=rev
Log:
IndependentBlocks: We can only reconstruct PHI nodes that are within the ScoP

In the classical (non -polly-codegen-scev) mode, we assume that we can always
recreate PHI nodes during code generation. This is not true. We can only
reconstruct them from the polyhedral information, in case the entire loop of the
PHI node is part of the SCoP and consequently the PHI node was translated in
the polyhedral description.

Modified:
    polly/trunk/lib/CodeGen/BlockGenerators.cpp
    polly/trunk/test/Isl/CodeGen/20110226-PHI-Node-removed.ll

Modified: polly/trunk/lib/CodeGen/BlockGenerators.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/BlockGenerators.cpp?rev=179674&r1=179673&r2=179674&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/BlockGenerators.cpp (original)
+++ polly/trunk/lib/CodeGen/BlockGenerators.cpp Wed Apr 17 02:20:36 2013
@@ -58,7 +58,7 @@ bool polly::canSynthesize(const Instruct
   }
 
   Loop *L = LI->getLoopFor(I->getParent());
-  return L && I == L->getCanonicalInductionVariable();
+  return L && I == L->getCanonicalInductionVariable() && R->contains(L);
 }
 
 // Helper class to generate memory location.

Modified: polly/trunk/test/Isl/CodeGen/20110226-PHI-Node-removed.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Isl/CodeGen/20110226-PHI-Node-removed.ll?rev=179674&r1=179673&r2=179674&view=diff
==============================================================================
--- polly/trunk/test/Isl/CodeGen/20110226-PHI-Node-removed.ll (original)
+++ polly/trunk/test/Isl/CodeGen/20110226-PHI-Node-removed.ll Wed Apr 17 02:20:36 2013
@@ -1,6 +1,4 @@
 ; RUN: opt %loadPolly %defaultOpts -polly-codegen-isl %s
-; -polly-indenpendent causes: Cannot generate independent blocks
-; XFAIL:*
 
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
 target triple = "x86_64-unknown-linux-gnu"





More information about the llvm-commits mailing list