[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause
David Pagan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 22 20:31:01 PDT 2023
ddpagan added inline comments.
================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:9823
+def err_omp_loop_reduction_clause : Error<
+ "reduction clause not handled with '#pragma omp loop bind(teams)'">;
def warn_break_binds_to_switch : Warning<
----------------
Should be "allowed".
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:6127
+ bool UseClausesWithoutBind = false;
+
+ // Restricting to "#pragma omp loop bind"
----------------
This function only applies to OMPD_loop. If *Kind != OMPD_loop then should just return UseClauseWithoutBind.
================
Comment at: clang/test/OpenMP/generic_loop_ast_print.cpp:26
//PRINT: T j, z;
-//PRINT: #pragma omp loop collapse(C) reduction(+: z) lastprivate(j) bind(thread)
+//PRINT: #pragma omp simd collapse(C) reduction(+: z) lastprivate(j)
//PRINT: for (T i = 0; i < t; ++i)
----------------
The AST that is printed should be what was originally specified in the source.
================
Comment at: clang/test/OpenMP/loop_bind_codegen.cpp:1
+// expected-no-diagnostics
+// RUN: %clang_cc1 -DCK1 -verify -fopenmp -x c++ %s -emit-llvm -o - | FileCheck %s
----------------
Should auto-generate the the IR checking for this test using llvm/utils/update_cc_test_checks.py after verifying that what's generated is correct.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144634/new/
https://reviews.llvm.org/D144634
More information about the cfe-commits
mailing list