From 8b5344fda2a8db14eefc801342488a3a8374730e Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Thu, 6 Nov 2014 19:35:21 +0000 Subject: [PATCH] Explicitly annotate loops we want to run thread-parallel We introduces a new flag -polly-parallel and use it to annotate the for-nodes in the isl ast that we want to execute thread parallel (e.g., using OpenMP). We previously already emmitted openmp annotations, but we did this for various kinds of parallel loops, including some which we can not run in parallel. With this patch we now have three annotations: 1) #pragma known-parallel [reduction] 2) #pragma omp for 3) #pragma simd meaning: 1) loop has no loop carried dependences 2) loop will be executed thread-parallel 3) loop can possibly be vectorized This patch introduces 1) and reduces the use of 2) to only the cases where we will actually generate thread parallel code. It is in preparation of openmp code generation in our isl backend. Legacy: - We also have a command line option -enable-polly-openmp. This option controls the OpenMP code generation in CLooG. It will become an alias of -polly-parallel after the CLooG code generation has been dropped. http://reviews.llvm.org/D6142 llvm-svn: 221479 --- polly/include/polly/CodeGen/IslAst.h | 3 +++ polly/lib/CodeGen/IslAst.cpp | 19 ++++++++++++++++--- .../Isl/Ast/OpenMP/multiple_loops_outer_parallel.ll | 2 +- .../test/Isl/Ast/OpenMP/nested_loop_both_parallel.ll | 2 +- .../OpenMP/nested_loop_both_parallel_parametric.ll | 2 +- .../test/Isl/Ast/OpenMP/nested_loop_inner_parallel.ll | 2 +- .../test/Isl/Ast/OpenMP/nested_loop_outer_parallel.ll | 2 +- .../Isl/Ast/OpenMP/single_loop_param_non_parallel.ll | 2 +- .../test/Isl/Ast/OpenMP/single_loop_param_parallel.ll | 2 +- .../OpenMP/single_loop_param_parallel_computeout.ll | 2 +- .../Ast/reduction_clauses_multidimensional_access.ll | 2 +- .../Ast/reduction_clauses_onedimensional_access.ll | 2 +- .../Isl/Ast/reduction_different_reduction_clauses.ll | 2 +- polly/test/Isl/Ast/reduction_in_one_dimension.ll | 2 +- .../reduction_modulo_and_loop_reversal_schedule_2.ll | 2 +- .../reduction_modulo_schedule_multiple_dimensions.ll | 2 +- ...reduction_modulo_schedule_multiple_dimensions_2.ll | 4 ++-- ...reduction_modulo_schedule_multiple_dimensions_3.ll | 4 ++-- ...reduction_modulo_schedule_multiple_dimensions_4.ll | 4 ++-- ...reduction_modulo_schedule_multiple_dimensions_5.ll | 2 +- polly/test/Isl/Ast/reduction_multiple_dimensions.ll | 4 ++-- polly/test/Isl/Ast/reduction_multiple_dimensions_2.ll | 4 ++-- polly/test/Isl/Ast/reduction_multiple_dimensions_3.ll | 4 ++-- polly/test/Isl/Ast/reduction_multiple_dimensions_4.ll | 4 ++-- polly/test/Isl/Ast/single_loop_strip_mine.ll | 2 +- polly/test/ScheduleOptimizer/prevectorization.ll | 4 ++-- 26 files changed, 51 insertions(+), 35 deletions(-) diff --git a/polly/include/polly/CodeGen/IslAst.h b/polly/include/polly/CodeGen/IslAst.h index db4d70c..dfd949f 100644 --- a/polly/include/polly/CodeGen/IslAst.h +++ b/polly/include/polly/CodeGen/IslAst.h @@ -126,6 +126,9 @@ public: /// @brief Is this loop a reduction parallel loop? static bool isReductionParallel(__isl_keep isl_ast_node *Node); + /// @brief Will the loop be run as thread parallel? + static bool isExecutedInParallel(__isl_keep isl_ast_node *Node); + /// @brief Get the nodes schedule or a nullptr if not available. static __isl_give isl_union_map *getSchedule(__isl_keep isl_ast_node *Node); diff --git a/polly/lib/CodeGen/IslAst.cpp b/polly/lib/CodeGen/IslAst.cpp index 8045542..4b950b2 100644 --- a/polly/lib/CodeGen/IslAst.cpp +++ b/polly/lib/CodeGen/IslAst.cpp @@ -42,6 +42,11 @@ using namespace polly; using IslAstUserPayload = IslAstInfo::IslAstUserPayload; +static cl::opt + PollyParallel("polly-parallel", + cl::desc("Generate thread parallel code (isl codegen only)"), + cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); + static cl::opt UseContext("polly-ast-use-context", cl::desc("Use context"), cl::Hidden, cl::init(false), cl::ZeroOrMore, @@ -148,6 +153,7 @@ static isl_printer *cbPrintFor(__isl_take isl_printer *Printer, isl_pw_aff *DD = IslAstInfo::getMinimalDependenceDistance(Node); const std::string BrokenReductionsStr = getBrokenReductionsStr(Node); + const std::string KnownParallelStr = "#pragma known-parallel"; const std::string DepDisPragmaStr = "#pragma minimal dependence distance: "; const std::string SimdPragmaStr = "#pragma simd"; const std::string OmpPragmaStr = "#pragma omp parallel for"; @@ -158,8 +164,10 @@ static isl_printer *cbPrintFor(__isl_take isl_printer *Printer, if (IslAstInfo::isInnermostParallel(Node)) Printer = printLine(Printer, SimdPragmaStr + BrokenReductionsStr); - if (IslAstInfo::isOutermostParallel(Node)) - Printer = printLine(Printer, OmpPragmaStr + BrokenReductionsStr); + if (IslAstInfo::isExecutedInParallel(Node)) + Printer = printLine(Printer, OmpPragmaStr); + else if (IslAstInfo::isOutermostParallel(Node)) + Printer = printLine(Printer, KnownParallelStr + BrokenReductionsStr); isl_pw_aff_free(DD); return isl_ast_node_for_print(Node, Printer, Options); @@ -357,7 +365,8 @@ IslAst::IslAst(Scop *Scop, Dependences &D) : S(Scop) { isl_union_map *Schedule = isl_union_map_intersect_domain(S->getSchedule(), S->getDomains()); - if (DetectParallel || PollyVectorizerChoice != VECTORIZER_NONE) { + if (PollyParallel || DetectParallel || + PollyVectorizerChoice != VECTORIZER_NONE) { BuildInfo.Deps = &D; BuildInfo.InParallelFor = 0; @@ -444,6 +453,10 @@ bool IslAstInfo::isReductionParallel(__isl_keep isl_ast_node *Node) { return Payload && Payload->IsReductionParallel; } +bool IslAstInfo::isExecutedInParallel(__isl_keep isl_ast_node *Node) { + return PollyParallel && isOutermostParallel(Node) && !isReductionParallel(Node); +} + isl_union_map *IslAstInfo::getSchedule(__isl_keep isl_ast_node *Node) { IslAstUserPayload *Payload = getNodePayload(Node); return Payload ? isl_ast_build_get_schedule(Payload->Build) : nullptr; diff --git a/polly/test/Isl/Ast/OpenMP/multiple_loops_outer_parallel.ll b/polly/test/Isl/Ast/OpenMP/multiple_loops_outer_parallel.ll index 03fd13f..bcd36bf 100644 --- a/polly/test/Isl/Ast/OpenMP/multiple_loops_outer_parallel.ll +++ b/polly/test/Isl/Ast/OpenMP/multiple_loops_outer_parallel.ll @@ -1,4 +1,4 @@ -; RUN: opt %loadPolly -polly-ast -polly-ast-detect-parallel -analyze < %s | FileCheck %s +; RUN: opt %loadPolly -polly-ast -polly-parallel -analyze < %s | FileCheck %s ; ; void jd(int *A) { ; CHECK: #pragma omp parallel for diff --git a/polly/test/Isl/Ast/OpenMP/nested_loop_both_parallel.ll b/polly/test/Isl/Ast/OpenMP/nested_loop_both_parallel.ll index f70c5b5..4ae7277 100644 --- a/polly/test/Isl/Ast/OpenMP/nested_loop_both_parallel.ll +++ b/polly/test/Isl/Ast/OpenMP/nested_loop_both_parallel.ll @@ -1,4 +1,4 @@ -; RUN: opt %loadPolly -polly-ast -polly-ast-detect-parallel -analyze < %s | FileCheck %s +; RUN: opt %loadPolly -polly-ast -polly-parallel -analyze < %s | FileCheck %s 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-pc-linux-gnu" diff --git a/polly/test/Isl/Ast/OpenMP/nested_loop_both_parallel_parametric.ll b/polly/test/Isl/Ast/OpenMP/nested_loop_both_parallel_parametric.ll index 23f4c24..99e36e6 100644 --- a/polly/test/Isl/Ast/OpenMP/nested_loop_both_parallel_parametric.ll +++ b/polly/test/Isl/Ast/OpenMP/nested_loop_both_parallel_parametric.ll @@ -1,4 +1,4 @@ -; RUN: opt %loadPolly -polly-ast -polly-ast-detect-parallel -analyze -polly-delinearize < %s | FileCheck %s +; RUN: opt %loadPolly -polly-ast -polly-parallel -analyze -polly-delinearize < %s | FileCheck %s 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-pc-linux-gnu" ; int A[1024][1024]; diff --git a/polly/test/Isl/Ast/OpenMP/nested_loop_inner_parallel.ll b/polly/test/Isl/Ast/OpenMP/nested_loop_inner_parallel.ll index c92fb1d..ba798da 100644 --- a/polly/test/Isl/Ast/OpenMP/nested_loop_inner_parallel.ll +++ b/polly/test/Isl/Ast/OpenMP/nested_loop_inner_parallel.ll @@ -1,4 +1,4 @@ -; RUN: opt %loadPolly -polly-ast -polly-ast-detect-parallel -analyze < %s | FileCheck %s +; RUN: opt %loadPolly -polly-ast -polly-parallel -analyze < %s | FileCheck %s 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-pc-linux-gnu" diff --git a/polly/test/Isl/Ast/OpenMP/nested_loop_outer_parallel.ll b/polly/test/Isl/Ast/OpenMP/nested_loop_outer_parallel.ll index 8ca4b1a..9a577fa 100644 --- a/polly/test/Isl/Ast/OpenMP/nested_loop_outer_parallel.ll +++ b/polly/test/Isl/Ast/OpenMP/nested_loop_outer_parallel.ll @@ -1,4 +1,4 @@ -; RUN: opt %loadPolly -polly-ast -polly-ast-detect-parallel -analyze < %s | FileCheck %s +; RUN: opt %loadPolly -polly-ast -polly-parallel -analyze < %s | FileCheck %s 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-pc-linux-gnu" diff --git a/polly/test/Isl/Ast/OpenMP/single_loop_param_non_parallel.ll b/polly/test/Isl/Ast/OpenMP/single_loop_param_non_parallel.ll index 9a3e18c..633e487 100644 --- a/polly/test/Isl/Ast/OpenMP/single_loop_param_non_parallel.ll +++ b/polly/test/Isl/Ast/OpenMP/single_loop_param_non_parallel.ll @@ -1,4 +1,4 @@ -; RUN: opt %loadPolly -polly-ast -polly-ast-detect-parallel -analyze < %s | FileCheck %s +; RUN: opt %loadPolly -polly-ast -polly-parallel -analyze < %s | FileCheck %s 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-pc-linux-gnu" diff --git a/polly/test/Isl/Ast/OpenMP/single_loop_param_parallel.ll b/polly/test/Isl/Ast/OpenMP/single_loop_param_parallel.ll index cbe48d8e..35c2006 100644 --- a/polly/test/Isl/Ast/OpenMP/single_loop_param_parallel.ll +++ b/polly/test/Isl/Ast/OpenMP/single_loop_param_parallel.ll @@ -1,4 +1,4 @@ -; RUN: opt %loadPolly -polly-ast -polly-ast-detect-parallel -analyze < %s | FileCheck %s +; RUN: opt %loadPolly -polly-ast -polly-parallel -analyze < %s | FileCheck %s 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-pc-linux-gnu" diff --git a/polly/test/Isl/Ast/OpenMP/single_loop_param_parallel_computeout.ll b/polly/test/Isl/Ast/OpenMP/single_loop_param_parallel_computeout.ll index 1199aca..313042a 100644 --- a/polly/test/Isl/Ast/OpenMP/single_loop_param_parallel_computeout.ll +++ b/polly/test/Isl/Ast/OpenMP/single_loop_param_parallel_computeout.ll @@ -1,4 +1,4 @@ -; RUN: opt %loadPolly -polly-ast -polly-ast-detect-parallel -polly-dependences-computeout=1 -analyze < %s | FileCheck %s +; RUN: opt %loadPolly -polly-ast -polly-parallel -polly-dependences-computeout=1 -analyze < %s | FileCheck %s 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-pc-linux-gnu" diff --git a/polly/test/Isl/Ast/reduction_clauses_multidimensional_access.ll b/polly/test/Isl/Ast/reduction_clauses_multidimensional_access.ll index dba85cd..3ecc54a 100644 --- a/polly/test/Isl/Ast/reduction_clauses_multidimensional_access.ll +++ b/polly/test/Isl/Ast/reduction_clauses_multidimensional_access.ll @@ -1,6 +1,6 @@ ; RUN: opt %loadPolly -polly-delinearize -polly-ast -polly-ast-detect-parallel -analyze < %s | FileCheck %s ; -; CHECK: #pragma omp parallel for reduction (^ : sum) +; CHECK: #pragma known-parallel reduction (^ : sum) ; void f(int N, int M, int P, int sum[P][M]) { ; for (int i = 0; i < N; i++) ; for (int j = 0; j < P; j++) diff --git a/polly/test/Isl/Ast/reduction_clauses_onedimensional_access.ll b/polly/test/Isl/Ast/reduction_clauses_onedimensional_access.ll index 1e0f654..a5143c7 100644 --- a/polly/test/Isl/Ast/reduction_clauses_onedimensional_access.ll +++ b/polly/test/Isl/Ast/reduction_clauses_onedimensional_access.ll @@ -1,6 +1,6 @@ ; RUN: opt %loadPolly -polly-ast -polly-ast-detect-parallel -analyze < %s | FileCheck %s ; -; CHECK: #pragma omp parallel for reduction (^ : sum) +; CHECK: #pragma known-parallel reduction (^ : sum) ; void f(int N, int M, int *sum) { ; for (int i = 0; i < N; i++) ; CHECK: #pragma simd diff --git a/polly/test/Isl/Ast/reduction_different_reduction_clauses.ll b/polly/test/Isl/Ast/reduction_different_reduction_clauses.ll index b2272d3..08f3c79 100644 --- a/polly/test/Isl/Ast/reduction_different_reduction_clauses.ll +++ b/polly/test/Isl/Ast/reduction_different_reduction_clauses.ll @@ -1,7 +1,7 @@ ; RUN: opt %loadPolly -basicaa -polly-ast -polly-ast-detect-parallel -analyze < %s | FileCheck %s ; ; CHECK: #pragma simd reduction (+ : sum{{[1,2]}}, sum{{[1,2]}}) reduction (* : prod) reduction (| : or) reduction (& : and) -; CHECK: #pragma omp parallel for reduction (+ : sum{{[1,2]}}, sum{{[1,2]}}) reduction (* : prod) reduction (| : or) reduction (& : and) +; CHECK: #pragma known-parallel reduction (+ : sum{{[1,2]}}, sum{{[1,2]}}) reduction (* : prod) reduction (| : or) reduction (& : and) ; CHECK: for (int c1 = 0; c1 < N; c1 += 1) ; CHECK: Stmt_for_body(c1); ; diff --git a/polly/test/Isl/Ast/reduction_in_one_dimension.ll b/polly/test/Isl/Ast/reduction_in_one_dimension.ll index 24bbd9f..c415c47 100644 --- a/polly/test/Isl/Ast/reduction_in_one_dimension.ll +++ b/polly/test/Isl/Ast/reduction_in_one_dimension.ll @@ -2,7 +2,7 @@ ; ; Verify that we won't privatize anything in the outer dimension ; -; CHECK: #pragma omp parallel for +; CHECK: #pragma known-parallel ; CHECK: for (int c1 = 0; c1 < 2 * n; c1 += 1) ; CHECK: #pragma simd reduction ; CHECK: for (int c3 = 0; c3 <= 1023; c3 += 1) diff --git a/polly/test/Isl/Ast/reduction_modulo_and_loop_reversal_schedule_2.ll b/polly/test/Isl/Ast/reduction_modulo_and_loop_reversal_schedule_2.ll index 3ac8a29..7d99cc9 100644 --- a/polly/test/Isl/Ast/reduction_modulo_and_loop_reversal_schedule_2.ll +++ b/polly/test/Isl/Ast/reduction_modulo_and_loop_reversal_schedule_2.ll @@ -1,6 +1,6 @@ ; RUN: opt %loadPolly -polly-import-jscop-dir=%S -polly-import-jscop -polly-ast -polly-ast-detect-parallel -analyze < %s | FileCheck %s ; -; CHECK: #pragma omp parallel for reduction +; CHECK: #pragma known-parallel reduction ; CHECK: for (int c0 = 0; c0 <= 2; c0 += 1) { ; CHECK: if (c0 == 2) { ; CHECK: #pragma simd reduction diff --git a/polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions.ll b/polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions.ll index 2d1ed9f..4360ea6 100644 --- a/polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions.ll +++ b/polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions.ll @@ -1,6 +1,6 @@ ; RUN: opt %loadPolly -polly-import-jscop-dir=%S -polly-import-jscop -polly-ast -polly-ast-detect-parallel -analyze < %s | FileCheck %s ; -; CHECK: #pragma omp parallel for +; CHECK: #pragma known-parallel ; CHECK: for (int c0 = 0; c0 <= 1; c0 += 1) { ; CHECK: if (c0 == 1) { ; CHECK: for (int c1 = 1; c1 < 2 * n; c1 += 2) diff --git a/polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_2.ll b/polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_2.ll index 34677d27..5b33b4e 100644 --- a/polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_2.ll +++ b/polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_2.ll @@ -2,8 +2,8 @@ ; ; Verify that the outer dimension doesnt't carry reduction dependences ; -; CHECK-NOT:#pragma omp parallel for reduction -; CHECK: #pragma omp parallel for +; CHECK-NOT:#pragma known-parallel reduction +; CHECK: #pragma known-parallel ; CHECK: for (int c1 = 0; c1 < 2 * n; c1 += 1) { ; CHECK: if (c1 % 2 == 0) { ; CHECK: #pragma simd reduction diff --git a/polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_3.ll b/polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_3.ll index 0a544d2..52bc242 100644 --- a/polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_3.ll +++ b/polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_3.ll @@ -2,8 +2,8 @@ ; ; Verify that the outer dimension doesnt't carry reduction dependences ; -; CHECK-NOT:#pragma omp parallel for reduction -; CHECK: #pragma omp parallel for +; CHECK-NOT:#pragma known-parallel reduction +; CHECK: #pragma known-parallel ; CHECK: for (int c1 = 0; c1 < 2 * n; c1 += 1) ; CHECK: #pragma simd reduction ; CHECK: for (int c3 = 0; c3 <= 1023; c3 += 1) { diff --git a/polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_4.ll b/polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_4.ll index bf91a8e..708e7fa 100644 --- a/polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_4.ll +++ b/polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_4.ll @@ -2,8 +2,8 @@ ; ; Verify that the outer dimension doesnt't carry reduction dependences ; -; CHECK-NOT:#pragma omp parallel for reduction -; CHECK: #pragma omp parallel for +; CHECK-NOT:#pragma known-parallel reduction +; CHECK: #pragma known-parallel ; CHECK: for (int c1 = 0; c1 < 2 * n; c1 += 1) ; CHECK: #pragma simd reduction ; CHECK: for (int c3 = -1023; c3 <= 1023; c3 += 1) { diff --git a/polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_5.ll b/polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_5.ll index a1e00b8..23b26a27 100644 --- a/polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_5.ll +++ b/polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_5.ll @@ -2,7 +2,7 @@ ; ; Verify that only the outer dimension needs privatization ; -; CHECK: #pragma omp parallel for reduction +; CHECK: #pragma known-parallel reduction ; CHECK: for (int c1 = 0; c1 <= 1023; c1 += 1) { ; CHECK: if (c1 % 2 == 0) { ; CHECK-NOT: #pragma simd reduction diff --git a/polly/test/Isl/Ast/reduction_multiple_dimensions.ll b/polly/test/Isl/Ast/reduction_multiple_dimensions.ll index 98520dc..f246d21 100644 --- a/polly/test/Isl/Ast/reduction_multiple_dimensions.ll +++ b/polly/test/Isl/Ast/reduction_multiple_dimensions.ll @@ -1,7 +1,7 @@ ; RUN: opt %loadPolly -polly-ast -polly-ast-detect-parallel -analyze < %s | FileCheck %s ; -; CHECK-NOT:#pragma omp parallel for reduction -; CHECK: #pragma omp parallel for +; CHECK-NOT:#pragma known-parallel reduction +; CHECK: #pragma known-parallel ; CHECK: for (int c1 = 0; c1 <= 2047; c1 += 1) ; CHECK: for (int c3 = 0; c3 <= 1023; c3 += 1) ; CHECK: #pragma simd reduction diff --git a/polly/test/Isl/Ast/reduction_multiple_dimensions_2.ll b/polly/test/Isl/Ast/reduction_multiple_dimensions_2.ll index af63bc7..0a14d7c 100644 --- a/polly/test/Isl/Ast/reduction_multiple_dimensions_2.ll +++ b/polly/test/Isl/Ast/reduction_multiple_dimensions_2.ll @@ -1,7 +1,7 @@ ; RUN: opt %loadPolly -polly-ast -polly-ast-detect-parallel -analyze < %s | FileCheck %s ; -; CHECK-NOT:#pragma omp parallel for reduction -; CHECK: #pragma omp parallel for +; CHECK-NOT:#pragma known-parallel reduction +; CHECK: #pragma known-parallel ; CHECK: for (int c1 = 0; c1 <= 2047; c1 += 1) ; CHECK: for (int c3 = 0; c3 <= 1023; c3 += 1) ; CHECK: #pragma simd reduction diff --git a/polly/test/Isl/Ast/reduction_multiple_dimensions_3.ll b/polly/test/Isl/Ast/reduction_multiple_dimensions_3.ll index 13ae1a1..724321e 100644 --- a/polly/test/Isl/Ast/reduction_multiple_dimensions_3.ll +++ b/polly/test/Isl/Ast/reduction_multiple_dimensions_3.ll @@ -1,7 +1,7 @@ ; RUN: opt %loadPolly -polly-ast -polly-ast-detect-parallel -analyze < %s | FileCheck %s ; -; CHECK-NOT:#pragma omp parallel for reduction -; CHECK: #pragma omp parallel for +; CHECK-NOT:#pragma known-parallel reduction +; CHECK: #pragma known-parallel ; CHECK: for (int c1 = 0; c1 <= 2047; c1 += 1) ; CHECK: for (int c3 = 0; c3 <= 1023; c3 += 1) ; CHECK: #pragma simd reduction diff --git a/polly/test/Isl/Ast/reduction_multiple_dimensions_4.ll b/polly/test/Isl/Ast/reduction_multiple_dimensions_4.ll index 1a8f703..0a3c456 100644 --- a/polly/test/Isl/Ast/reduction_multiple_dimensions_4.ll +++ b/polly/test/Isl/Ast/reduction_multiple_dimensions_4.ll @@ -1,7 +1,7 @@ ; RUN: opt %loadPolly -polly-ast -polly-ast-detect-parallel -analyze < %s | FileCheck %s ; -; CHECK-NOT:#pragma omp parallel for reduction -; CHECK: #pragma omp parallel for +; CHECK-NOT:#pragma known-parallel reduction +; CHECK: #pragma known-parallel ; CHECK: for (int c1 = 0; c1 <= 2047; c1 += 1) ; CHECK: for (int c3 = 0; c3 <= 1023; c3 += 1) ; CHECK: #pragma simd reduction diff --git a/polly/test/Isl/Ast/single_loop_strip_mine.ll b/polly/test/Isl/Ast/single_loop_strip_mine.ll index 2f83ca0..19f8ddb 100644 --- a/polly/test/Isl/Ast/single_loop_strip_mine.ll +++ b/polly/test/Isl/Ast/single_loop_strip_mine.ll @@ -32,7 +32,7 @@ for.end: ; preds = %for.cond ; CHECK: for (int c1 = 0; c1 <= 1023; c1 += 1) ; CHECK: Stmt_for_body(c1); -; CHECK-VECTOR: #pragma omp parallel for +; CHECK-VECTOR: #pragma known-parallel ; CHECK-VECTOR: for (int c0 = 0; c0 <= 1023; c0 += 4) ; CHECK-VECTOR: #pragma simd ; CHECK-VECTOR: for (int c1 = c0; c1 <= c0 + 3; c1 += 1) diff --git a/polly/test/ScheduleOptimizer/prevectorization.ll b/polly/test/ScheduleOptimizer/prevectorization.ll index 5f80b73..dc9b77b 100644 --- a/polly/test/ScheduleOptimizer/prevectorization.ll +++ b/polly/test/ScheduleOptimizer/prevectorization.ll @@ -54,7 +54,7 @@ for.end30: ; preds = %for.inc28 attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } -; CHECK: #pragma omp parallel for +; CHECK: #pragma known-parallel ; CHECK: for (int c1 = 0; c1 <= 1535; c1 += 32) ; CHECK: for (int c2 = 0; c2 <= 1535; c2 += 32) ; CHECK: for (int c3 = c1; c3 <= c1 + 31; c3 += 1) @@ -62,7 +62,7 @@ attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointe ; CHECK: #pragma simd ; CHECK: for (int c5 = c4; c5 <= c4 + 3; c5 += 1) ; CHECK: Stmt_for_body3(c3, c5); -; CHECK: #pragma omp parallel for +; CHECK: #pragma known-parallel ; CHECK: for (int c1 = 0; c1 <= 1535; c1 += 32) ; CHECK: for (int c2 = 0; c2 <= 1535; c2 += 32) ; CHECK: for (int c3 = 0; c3 <= 1535; c3 += 32) -- 2.7.4