[PATCH] D75815: [InstCombine] Simplify calls with "returned" attribute

Alexander Potapenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 25 02:40:47 PDT 2020


glider added subscribers: eugenis, vitalybuka.
glider added a comment.

In D75815#1940120 <https://reviews.llvm.org/D75815#1940120>, @nikic wrote:

> @glider Not quite sure what to do on that front. Inlining here is prevented due to an ABI mismatch,


Not sure I understand where the ABI mismatch is coming from.
Functions with e.g. `sanitize_memory` attribute are 100% ABI-compatible with functions without such an attribute.
The only distinction is that functions without that attribute will be instrumented differently by the MSan pass.
Since the pass has function-level granularity, not inlining the annotated function is the only possible way to make sure it is not instrumented.

> but lack of inlining does not imply that no other optimizations may take place. For example, SCCP will happily propagate a constant parameter across noinline function boundaries. I believe that the `returned` attribute is essentially in the same situation.

So far we haven't seen cases in which this prevented the sanitizers from working normally. The example you mention doesn't seem to affect our use cases.


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