[PATCH] D112016: [IR] Introduce load assume operand bundle

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 19 13:56:23 PDT 2021


fhahn added a comment.

In D112016#3073235 <https://reviews.llvm.org/D112016#3073235>, @jdoerfert wrote:

> In D112016#3072158 <https://reviews.llvm.org/D112016#3072158>, @nikic wrote:
>
>> In D112016#3071380 <https://reviews.llvm.org/D112016#3071380>, @aeubanks wrote:
>>
>>> In D112016#3071099 <https://reviews.llvm.org/D112016#3071099>, @nikic wrote:
>>>
>>>> As long as the load is speculatable, it should count as an ephemeral value and be considered as free by the inliner at least.
>>>
>>> I'm not seeing that: [...]
>>
>> Thus the "as long as the load is speculatable" caveat. It works if you add a `dereferenceable(1)` attribute. Though now that I think about this, I have no idea why speculatability is even a requirement for ephemeral values -- shouldn't side-effect freedom be sufficient? In that case your example would work without the `dereferenceable(1)`.
>
> I think side-effect free is sufficient, though, haven't thought long about it. (When you say deref(1) you mean deref(sizeof(access)), right?)

I agree that side-effect-free should be sufficient to ignore them here as well. looks like there are a couple of places that define their own checks for ephemeral values, so it might be a good start to consolidate them


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112016



More information about the llvm-commits mailing list