[PATCH] D99350: [OPENMP]Fix PR49649: The introduction of $ref globals is not always valid.

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 21 12:52:54 PDT 2021


ABataev added a comment.

In D99350#2894305 <https://reviews.llvm.org/D99350#2894305>, @jdoerfert wrote:

> I don't understand why the cast makes ptxas happy, can you include a test in the runtime so we can make sure that stays that way and is not some ptxas artifact. After all, we still point to a shared memory symbol from global memory which doesn't make too much sense.

Here is the related info https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#initializers. Take a look at the Examples:

        .const  .u32 foo = 42;
  ...
        .global .u32 p2 = generic(foo); // generic address of foo

After the patch, we have this:

  .shared .align 4 .u32 _ZL1X;
  .global .align 8 .u64 __ZL1X$ref = generic(_ZL1X);

which is similar to the example.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99350/new/

https://reviews.llvm.org/D99350



More information about the cfe-commits mailing list