[all-commits] [llvm/llvm-project] b0cfbf: [OpenACC] Implement `loop` restrictions on `for` l...
Erich Keane via All-commits
all-commits at lists.llvm.org
Fri Nov 8 05:50:06 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b0cfbfd74bfd9d077f7c1854a1b38dcbe9d402e4
https://github.com/llvm/llvm-project/commit/b0cfbfd74bfd9d077f7c1854a1b38dcbe9d402e4
Author: Erich Keane <ekeane at nvidia.com>
Date: 2024-11-08 (Fri, 08 Nov 2024)
Changed paths:
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/include/clang/Sema/SemaOpenACC.h
M clang/lib/Parse/ParseOpenACC.cpp
M clang/lib/Parse/ParseStmt.cpp
M clang/lib/Sema/SemaOpenACC.cpp
M clang/lib/Sema/TreeTransform.h
M clang/test/AST/ast-print-openacc-loop-construct.cpp
M clang/test/ParserOpenACC/parse-clauses.c
M clang/test/ParserOpenACC/parse-clauses.cpp
M clang/test/ParserOpenACC/parse-constructs.c
M clang/test/SemaOpenACC/compute-construct-async-clause.c
M clang/test/SemaOpenACC/compute-construct-attach-clause.c
M clang/test/SemaOpenACC/compute-construct-copy-clause.c
M clang/test/SemaOpenACC/compute-construct-copyin-clause.c
M clang/test/SemaOpenACC/compute-construct-copyout-clause.c
M clang/test/SemaOpenACC/compute-construct-create-clause.c
M clang/test/SemaOpenACC/compute-construct-default-clause.c
M clang/test/SemaOpenACC/compute-construct-deviceptr-clause.c
M clang/test/SemaOpenACC/compute-construct-firstprivate-clause.c
M clang/test/SemaOpenACC/compute-construct-if-clause.c
M clang/test/SemaOpenACC/compute-construct-no_create-clause.c
M clang/test/SemaOpenACC/compute-construct-num_gangs-clause.c
M clang/test/SemaOpenACC/compute-construct-num_workers-clause.c
M clang/test/SemaOpenACC/compute-construct-present-clause.c
M clang/test/SemaOpenACC/compute-construct-self-clause.c
M clang/test/SemaOpenACC/compute-construct-vector_length-clause.c
M clang/test/SemaOpenACC/compute-construct-wait-clause.c
M clang/test/SemaOpenACC/loop-ast.cpp
M clang/test/SemaOpenACC/loop-construct-auto_seq_independent-ast.cpp
M clang/test/SemaOpenACC/loop-construct-auto_seq_independent-clauses.c
M clang/test/SemaOpenACC/loop-construct-collapse-ast.cpp
M clang/test/SemaOpenACC/loop-construct-collapse-clause.cpp
M clang/test/SemaOpenACC/loop-construct-device_type-ast.cpp
M clang/test/SemaOpenACC/loop-construct-device_type-clause.c
M clang/test/SemaOpenACC/loop-construct-device_type-clause.cpp
M clang/test/SemaOpenACC/loop-construct-gang-ast.cpp
M clang/test/SemaOpenACC/loop-construct-gang-clause.cpp
M clang/test/SemaOpenACC/loop-construct-private-clause.c
M clang/test/SemaOpenACC/loop-construct-private-clause.cpp
M clang/test/SemaOpenACC/loop-construct-reduction-ast.cpp
M clang/test/SemaOpenACC/loop-construct-reduction-clause.cpp
M clang/test/SemaOpenACC/loop-construct-tile-ast.cpp
M clang/test/SemaOpenACC/loop-construct-tile-clause.cpp
M clang/test/SemaOpenACC/loop-construct-vector-ast.cpp
M clang/test/SemaOpenACC/loop-construct-vector-clause.cpp
M clang/test/SemaOpenACC/loop-construct-worker-ast.cpp
M clang/test/SemaOpenACC/loop-construct-worker-clause.cpp
A clang/test/SemaOpenACC/loop-construct.cpp
M clang/test/SemaOpenACC/loop-loc-and-stmt.c
M clang/test/SemaOpenACC/loop-loc-and-stmt.cpp
Log Message:
-----------
[OpenACC] Implement `loop` restrictions on `for` loops. (#115370)
OpenACC restricts the contents of a 'for' loop affected by a 'loop'
construct without a 'seq'. The loop variable must be integer, pointer,
or random-access-iterator, it must monotonically increase/decrease, and
the trip count must be computable at runtime before the function.
This patch tries to implement some of these limitations to the best of
our ability, though it causes us to be perhaps overly restrictive at the
moment. I expect we'll revisit some of these rules/add additional
supported forms of loop-variable and 'monotonically increasing' here,
but the currently enforced rules are heavily inspired by the OMP
implementation here.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list