guiand added a comment.

In D82317#2200789 <https://reviews.llvm.org/D82317#2200789>, @rjmccall wrote:

> Are you seriously adding an attribute to literally every argument and return 
> value?  Why is this the right representation?

This adds an attribute to every argument and return value where the language 
rules denote it cannot be undef (which is ideally in most places, but 
definitely not everywhere). In a previous incarnation of this idea, the 
attribute was called `partialinit`, and had the inverse meaning -- the idea 
being that it would be a less invasive change because it is more common for 
these values to be fully defined (@rsmith at some point noted that in C, return 
values in general may be undef, which would complicate that a bit, but anyway 
was the idea). `partialinit` was scrapped as pretty much everybody agreed it 
wasn't ideal to have a negative attribute: the presence of `partialinit` 
meaning "proceed as normal", and its absence denoting a different behavior.

As for being an attribute, that was the level of granularity we had decided on. 
The alternative I suppose would be to some form of metadata.

As for being enabled by default, the idea was that transformation maintainers 
could get to using the attribute right away. This might be a good place to 
compromise.

And as for applying them to all the tests (rather than suppressing the 
attribute by default or something along those lines), we figured it would be 
best to keep the tests reflecting the actual common-case codegen. If `noundef` 
was on and showing up everywhere, the idea was to have the tests reflect that.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82317

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to