OpenMPOpt: Check nested parallelism in target region
authorRafael A Herrera Guaitero <randres2011@gmail.com>
Mon, 9 Jan 2023 21:54:35 +0000 (15:54 -0600)
committerJose M Monsalve Diaz <jmonsalvediaz@anl.gov>
Mon, 9 Jan 2023 21:55:30 +0000 (15:55 -0600)
commit13b909ef27e7cb7a4c55d1778254be1ac5c0884d
treec827afb95fc335ee9476479ddd8c9a71c68bb5ca
parentf400daae902875b488c92b13322e39f41eb20934
OpenMPOpt: Check nested parallelism in target region

Analysis that determines if a parallel region can reach another parallel region in any target region of the TU.
A new global var is emitted with the name of the kernel + "_nested_parallelism", which is either 0 or 1 depending on the result.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D141010
llvm/lib/Transforms/IPO/OpenMPOpt.cpp
llvm/test/Transforms/OpenMP/nested_parallelism.ll [new file with mode: 0644]