[Openmp-commits] [PATCH] D83271: [OpenMP] Replace function pointer uses in GPU state machine
Jon Chesterfield via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jul 7 16:57:37 PDT 2020
JonChesterfield accepted this revision.
JonChesterfield added a comment.
This revision is now accepted and ready to land.
I haven't been able to apply this to the aomp tree (for reasons unrelated to this patch), but by inspection I think it's sound. I like the conservative pattern matching approach.
The function pointer specialisation alternative is more complicated than I suggested above - because the pointer gets stored in local state and loaded, it isn't readily available for specialisation on by each call.
================
Comment at: llvm/test/Transforms/OpenMP/gpu_state_machine_function_ptr_replacement.ll:40
+
+define internal void @__omp_offloading_35_a1e179_foo_l7_worker() {
+entry:
----------------
arsenm wrote:
> These tests seem really big
Agreed. I wonder if it's worth restructuring the openmp codegen to favour emitting functions instead of blocks with interesting control flow, such that tests like these look more like a linear sequence of named function calls. Said functions would then be inlined downstream of the codegen to produce the same IR we see here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83271/new/
https://reviews.llvm.org/D83271
More information about the Openmp-commits
mailing list