[PATCH] D75815: [InstCombine] Simplify calls with "returned" attribute
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 26 04:17:54 PDT 2020
lebedev.ri added a comment.
In D75815#1943296 <https://reviews.llvm.org/D75815#1943296>, @glider wrote:
> In D75815#1941004 <https://reviews.llvm.org/D75815#1941004>, @lebedev.ri wrote:
>
> > I'm going to guess `__attribute__((no_sanitize()))` needs to also imply (read: implicitly add) `noinline` attribute,
> > but even that is not sufficient to block inter-procedural optimizations.
> > See also disscussion in https://reviews.llvm.org/D53431
>
>
> I don't think `noinline` works here:
> <...>
Yeah, like i said, `noinline` is insufficient here, and i don't actually
think we currently have the right tool to block any such transform:
> In D75815#1941004 <https://reviews.llvm.org/D75815#1941004>, @lebedev.ri wrote:
>
>> See also disscussion in https://reviews.llvm.org/D53431
>> All these semantic guarantees for sanitize_memory functions are rather underspecified in langref.
>> I'm not sure it is good idea to try to enforce them without codifying them first.
>
> You're right, we'll have to write them down. But in the case of noinline attribute langref is pretty clear on this subject: "This attribute indicates that the inliner should never inline this function in any situation."
To be noted, i'm not currently saying that the expected behavior is unreasonable,
i'm merely saying that the behavior was not actually guaranteed but accidental,
and likely partial.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75815/new/
https://reviews.llvm.org/D75815
More information about the llvm-commits
mailing list