[OpenMP][NFC] Expose AAExecutionDomain and rename its getter
authorJohannes Doerfert <johannes@jdoerfert.de>
Wed, 12 May 2021 03:13:40 +0000 (22:13 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Fri, 18 Jun 2021 06:07:52 +0000 (01:07 -0500)
commit9a23e673caebdd54d8cc285fcad78f18fa2e919a
tree4b96c8a8c4973b636f97a4e4fa74c211088ea792
parentca7563bb02689a7145a7348d8b7a9676189df296
[OpenMP][NFC] Expose AAExecutionDomain and rename its getter

The initial use for AAExecutionDomain was to determine if a single
thread executes a block. While this is sometimes informative most
of the time, and for other reasons, we actually want to know if it
is the "initial thread". Thus, the thread that started execution on
the current device. The deduction needs to be adjusted in a follow
up as the methods we use right not are looking for the OpenMP thread
id which is resets whenever a thread enters a parallel region. What
we basically want is to look for `llvm.nvvm.read.ptx.sreg.ntid.x` and
equivalent functions.
llvm/include/llvm/Transforms/IPO/Attributor.h
llvm/lib/Transforms/IPO/OpenMPOpt.cpp