[llvm] [OpenMP][OMPIRBuilder] Add support to omp target parallel (PR #67000)

Dominik Adamski via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 28 02:31:32 PDT 2023


================
@@ -1137,8 +1139,12 @@ IRBuilder<>::InsertPoint OpenMPIRBuilder::createParallel(
   // Change the location to the outer alloca insertion point to create and
   // initialize the allocas we pass into the parallel region.
   Builder.restoreIP(OuterAllocaIP);
-  AllocaInst *TIDAddr = Builder.CreateAlloca(Int32, nullptr, "tid.addr");
-  AllocaInst *ZeroAddr = Builder.CreateAlloca(Int32, nullptr, "zero.addr");
+  unsigned AllocaAddressSpace =
+      Config.isTargetDevice() ? 0 : M.getDataLayout().getAllocaAddrSpace();
----------------
DominikAdamski wrote:

Fixed.

https://github.com/llvm/llvm-project/pull/67000


More information about the llvm-commits mailing list