[PATCH] D158081: [IR] Add writable attribute

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 17 02:11:03 PDT 2023


nikic added a comment.

In D158081#4594727 <https://reviews.llvm.org/D158081#4594727>, @RalfJung wrote:

>> introduce *p = *p on function entry
>
> I'm not sure about that. If some but not all of the bytes at `*p` were poison, then after this `*p = *p` they will all be poison (since `*p` will turn a single-byte poison into a whole-value poison).

The notation here was a bit too abstract. It would be more precise to say that you can `llvm.memcpy(p, p, dereferenceable(p))`.

The poison propagation issue is a very general one -- and indeed, it does also appear when introducing spurious stores. It's a well known problem that we currently don't have a good answer to. (The `byte` type will likely be part of that answer.)


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

https://reviews.llvm.org/D158081



More information about the llvm-commits mailing list