[PATCH] D147719: [OpenMP] Replace HeapToShared's initial value with `poison`

Artem Belevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 6 10:51:04 PDT 2023


tra added a comment.

In D147719#4249298 <https://reviews.llvm.org/D147719#4249298>, @jhuber6 wrote:

> This was in reponse to https://reviews.llvm.org/D147572 suggesting that we use `poison` in general over `undef`. I feel the semantics are roughly equivalent here, so I don't think this patch changes any existing behavior. All of these values get `addrspacecast`ed before they're used, but as far as I know those simply propagate poison values and don't imply any sort of volatility.

I'm somewhat concerned about this property of poison <https://llvm.org/docs/LangRef.html#poison-values>: "It is correct to replace a poison value with an undef value or any value of the type."

The way I read it, poison *may* make it possible to assume whatever value is convenient for optimization passes, which is not what we want for the values read from shared memory.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147719



More information about the llvm-commits mailing list