[OpenMP] Add RTL function to externalization RAII
authorJoseph Huber <jhuber6@vols.utk.edu>
Tue, 30 Nov 2021 15:15:44 +0000 (10:15 -0500)
committerJoseph Huber <jhuber6@vols.utk.edu>
Tue, 30 Nov 2021 15:19:06 +0000 (10:19 -0500)
commit7986a5f23ebbf7fc3c6d667610fd193288dba7ce
treec52b233b2f1cebfdec751c7f27cfbf5d7a4733e4
parent914e72d40014de1c61709969666be59f27712e5e
[OpenMP] Add RTL function to externalization RAII

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
llvm/lib/Transforms/IPO/OpenMPOpt.cpp