[PATCH] D85393: [WIP] [IR] Adding noprogress as a LLVM IR attribute

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 08:00:16 PDT 2020


jdoerfert added a comment.

In D85393#2241230 <https://reviews.llvm.org/D85393#2241230>, @RalfJung wrote:

>> It depends on how you look at it:
>> From the perspective of optimizations we can do, sure absence is the one that enables more.
>> From the perspective of source behavior, it just distinguishes between two alternatives, so both option w/ and w/o flag have the same information value.
>
> I don't entirely understand what you mean. From the perspective of source behavior, *removing* the attribute adds UB, i.e., it turns some previously non-UB executions into UB executions. That's exactly the opposite of attributes like "noreturn" or "nosync" or "nounwind"  that all add UB when being *added*.

I don't look at it as added or removed, for me it is a boolean flag, with a default that requires progress. It is more like `nobuiltin`, `noduplicate`, `nomerge`,` returns_twice`, .... The difference is that I don't see this being deduced. It is just a description of the input semantics, not a property we derive from the code (to describe the code). Unclear if the view makes a difference, let me know what u think :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85393



More information about the llvm-commits mailing list