aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorRazvan Lupusoru <rlupusoru@nvidia.com>2023-07-25 17:01:44 -0700
committerRazvan Lupusoru <rlupusoru@nvidia.com>2023-07-26 15:06:39 -0700
commit52a0b6a662686815887eab2b573ddfdcfa3cc8f7 (patch)
treef98b64a159824a376d7ad686a0fe82f6070cd1f6 /clang/lib/CodeGen/CodeGenFunction.cpp
parent12982d250d54beaae592b55cad36f1ac7081af08 (diff)
downloadllvm-52a0b6a662686815887eab2b573ddfdcfa3cc8f7.zip
llvm-52a0b6a662686815887eab2b573ddfdcfa3cc8f7.tar.gz
llvm-52a0b6a662686815887eab2b573ddfdcfa3cc8f7.tar.bz2
[openacc] Add acc routine support to acc dialect
Adds representation for `acc routine` under new operation named `acc.routine`. This operation is associated with a function symbol. It also gets its own compiler generated synthetic symbol name so that it can be referenced from the associated function. The clauses associated with the `acc routine` directive are captured in the `acc.routine` op. The linking between the `func.func` and its `acc.routine` declaration is done through the `acc.routine_info` attribute. In practice, a single `acc routine` is associated with a function. But the spec does not specifically restrict this - thus the 1:N relationship between `func.func` and `acc.routine` allowed in the dialect. Additionally, it makes sense that multiple acc routines could be used for a single function depending on loop context - to allow flexible parallelization. Most acc routine clauses are supported including `gang`, `gang(dim:)`, `vector`, `worker`, `seq`, `nohost`, and `bind`. The only one not supported is `device_type`. This is because most other clauses also miss this and the effort to add support for it needs to be coordinated and consistent. Reviewed By: clementval, vzakhari Differential Revision: https://reviews.llvm.org/D156281
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions