summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Grosser <grosser@fim.uni-passau.de>2013-04-17 07:20:36 +0000
committerTobias Grosser <grosser@fim.uni-passau.de>2013-04-17 07:20:36 +0000
commite8df5bd92b95b86427b167b8e0b5753a87e42530 (patch)
tree73fe05b501a4816373c38973b73d24e11a62c84e
parentb5f92892d1074e899db2255fcb2f8c7c18569a65 (diff)
downloadbcm5719-llvm-e8df5bd92b95b86427b167b8e0b5753a87e42530.tar.gz
bcm5719-llvm-e8df5bd92b95b86427b167b8e0b5753a87e42530.zip
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. llvm-svn: 179674
-rw-r--r--polly/lib/CodeGen/BlockGenerators.cpp2
-rw-r--r--polly/test/Isl/CodeGen/20110226-PHI-Node-removed.ll2
2 files changed, 1 insertions, 3 deletions
diff --git a/polly/lib/CodeGen/BlockGenerators.cpp b/polly/lib/CodeGen/BlockGenerators.cpp
index 6eb2e583c38..1baefaf0ee2 100644
--- a/polly/lib/CodeGen/BlockGenerators.cpp
+++ b/polly/lib/CodeGen/BlockGenerators.cpp
@@ -58,7 +58,7 @@ bool polly::canSynthesize(const Instruction *I, const llvm::LoopInfo *LI,
}
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.
diff --git a/polly/test/Isl/CodeGen/20110226-PHI-Node-removed.ll b/polly/test/Isl/CodeGen/20110226-PHI-Node-removed.ll
index a519e46dc6c..75676be3b47 100644
--- a/polly/test/Isl/CodeGen/20110226-PHI-Node-removed.ll
+++ b/polly/test/Isl/CodeGen/20110226-PHI-Node-removed.ll
@@ -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"
OpenPOWER on IntegriCloud