[PATCH] D156478: [IR] Mark `llvm.assume` as `memory(inaccessiblemem: write)`

Nuno Lopes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 28 03:32:59 PDT 2023


nlopes accepted this revision.
nlopes added a comment.
This revision is now accepted and ready to land.

In D156478#4541777 <https://reviews.llvm.org/D156478#4541777>, @nikic wrote:

> In D156478#4541650 <https://reviews.llvm.org/D156478#4541650>, @nlopes wrote:
>
>> Assuming that assume can only be used for path-/flow- insensitive invariants (that hold for the whole program), this change is correct. The implication is that the order of assumes doesn't matter.
>>
>> Alas, with the previous spec, it was already possible to hoist assumes out of branches, so it implied it couldn't be used to assume facts just in a specific branch.
>> I need to change Alive2's semantics to make sure that LLVM is using assume in this way only.
>
> Assume definitely needs to be flow sensitive. But I don't understand why this change would remove the flow sensitivity. Assume is still non-speculatable, so it cannot be moved outside of branches.

Ah, never mind, I don't know what I was thinking when I wrote that comment 😅   I forgot for a second that assume is a function call in LLVM IR.
Sorry, it's all good.


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

https://reviews.llvm.org/D156478



More information about the llvm-commits mailing list