[Attributor] Change AAExecutionDomain to check intrinsic edges
authorJoseph Huber <jhuber6@vols.utk.edu>
Wed, 15 Sep 2021 20:16:00 +0000 (16:16 -0400)
committerJoseph Huber <jhuber6@vols.utk.edu>
Fri, 17 Sep 2021 23:51:38 +0000 (19:51 -0400)
commit27905eeb89620357bbb69e8396c4708341a5fd1a
treeeff68fbba0296c67b510795ddbdcc58205460923
parentfec2927e0739144d101d5ad1e912bde9e8cd1fb6
[Attributor] Change AAExecutionDomain to check intrinsic edges

The AAExecutionDomain instance checks if a BB is executed by the main
thread only. Currently, this only checks the `__kmpc_kernel_init` call
for generic regions to indicate the path taken by the main thread. In
the new runtime, we want to be able to detect basic blocks even in SPMD
mode. For this we enable it to check thread-ID intrinsics being compared
to zero as well.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D109849
llvm/lib/Transforms/IPO/OpenMPOpt.cpp
llvm/test/Transforms/OpenMP/single_threaded_execution.ll