Skip to content

Commit

Permalink
[OpenMP] Add RTL function to externalization RAII
Browse files Browse the repository at this point in the history
This patch adds the `__kmpc_get_warp_size` OpenMP RTL function to the
externalization RAII struct. This was getting optimized out and then
being replaced with an undefined value once added back in, causing bugs
for complex reductions.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D114802
  • Loading branch information
jhuber6 committed Nov 30, 2021
1 parent 914e72d commit 7986a5f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions llvm/lib/Transforms/IPO/OpenMPOpt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1885,6 +1885,7 @@ struct OpenMPOpt {
OMPRTL___kmpc_barrier_simple_generic);
ExternalizationRAII ThreadId(OMPInfoCache,
OMPRTL___kmpc_get_hardware_thread_id_in_block);
ExternalizationRAII WarpSize(OMPInfoCache, OMPRTL___kmpc_get_warp_size);

registerAAs(IsModulePass);

Expand Down

0 comments on commit 7986a5f

Please sign in to comment.