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

Nuno Lopes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 8 06:57:13 PDT 2023


nlopes added a comment.

I've no clue about these shared variables.

If you require that there's a store before any load, then the initialization value doesn't matter and can (should) be poison.
If it's ok to do an uninitialized of these shared variables, then you need to decide what's the semantics you want. If you want that comparison in the example above to be executed, poison is not ok.
Note that in C++, reading an uninitialized integer is UB, so you can use poison safely.


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