eugenis added a comment.
Positive attribute sounds good to me (frozen is not a bad name), but the tests
update change is going to be huge. Any concerns about IR size bloat? The
attribute will apply to the majority of function arguments, 8 bytes per
instance as far as I can see.
Good point about uninitialized variables being undef, not poison. The meaning
of the attribute should be "poison or undef (even partial) in this argument is
UB". An extension that specifies which bytes, or even bits, of the argument are
required to be undef-free would be nice, but seems too much at this point.
Another way to design this thing that would work for MSan, but not so much for
general poison/undef analysis, is to emit an intrinsic call on the pre-coerced
type to force an MSan check, and then an attribute ("partialinit") on the
argument to skip checking the coerced value. This way the frontend has greater
control over which parts of the arguments correspond to C++-things, and what
does it mean for them to be initialized. I'm not sure I like this design though.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81678/new/
https://reviews.llvm.org/D81678
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits