diff options
author | Johannes Doerfert <jdoerfert@codeaurora.org> | 2014-08-01 08:14:28 +0000 |
---|---|---|
committer | Johannes Doerfert <jdoerfert@codeaurora.org> | 2014-08-01 08:14:28 +0000 |
commit | ed67f8baf6847712aab6437050341e00975e1221 (patch) | |
tree | d6ad0c14245d0c07246f1a5913fdf4e312efb9b1 /polly/lib/CodeGen/IslCodeGeneration.cpp | |
parent | f16a808292b79d078c2bbff3707be2c6c83df826 (diff) | |
download | bcm5719-llvm-ed67f8baf6847712aab6437050341e00975e1221.tar.gz bcm5719-llvm-ed67f8baf6847712aab6437050341e00975e1221.zip |
Change the semantics of is*Parallel
The functions isParallel, isInnermostParallel and IsOutermostParallel in
IslAstInfo will now return true even in the presence of broken reductions.
To compensate for this change the negated result of isReductionParallel can
be used.
llvm-svn: 214488
Diffstat (limited to 'polly/lib/CodeGen/IslCodeGeneration.cpp')
-rw-r--r-- | polly/lib/CodeGen/IslCodeGeneration.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/polly/lib/CodeGen/IslCodeGeneration.cpp b/polly/lib/CodeGen/IslCodeGeneration.cpp index 641b7876ee3..90b73214bbe 100644 --- a/polly/lib/CodeGen/IslCodeGeneration.cpp +++ b/polly/lib/CodeGen/IslCodeGeneration.cpp @@ -314,7 +314,8 @@ void IslNodeBuilder::createForSequential(__isl_take isl_ast_node *For) { CmpInst::Predicate Predicate; bool Parallel; - Parallel = IslAstInfo::isInnermostParallel(For); + Parallel = IslAstInfo::isInnermostParallel(For) && + !IslAstInfo::isReductionParallel(For); Body = isl_ast_node_for_get_body(For); @@ -366,7 +367,8 @@ void IslNodeBuilder::createForSequential(__isl_take isl_ast_node *For) { void IslNodeBuilder::createFor(__isl_take isl_ast_node *For) { bool Vector = PollyVectorizerChoice != VECTORIZER_NONE; - if (Vector && IslAstInfo::isInnermostParallel(For)) { + if (Vector && IslAstInfo::isInnermostParallel(For) && + !IslAstInfo::isReductionParallel(For)) { int VectorWidth = getNumberOfIterations(For); if (1 < VectorWidth && VectorWidth <= 16) { createForVector(For, VectorWidth); |