[llvm-dev] Missing attribute inference cases
Chandler Carruth via llvm-dev
llvm-dev at lists.llvm.org
Fri Feb 16 17:12:35 PST 2018
Thanks for the digging!
A quick note:
On Fri, Feb 16, 2018 at 10:30 AM Philip Reames via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> *Untrusted Declarations*
> In several cases, we check hasExactDefinition before checking properties
> of the function declaration (such as return type). To my knowledge, facts
> on declarations are valid even in the place of derefinement. This results
> in the analysis being unnecessarily conservative around external
We need to be careful here. Totally agree with you, just worried about
something somewhere *inferring* things onto declarations when it shouldn't
and a general lack of adequate understanding of the line between the good
and bad cases...
> *AlwaysInline and hasExactDefinition*
> I believe, but have not fully thought through, that it is legal to IPO
> across an inexact definition boundary if a particularly callsite or
> declaration is marked alwaysinline. It's not clear this matters since
> we'll eventually inline it anyway, but this might be a compile time savings
> by simplifying callers earlier than otherwise possible.
Given pass ordering, I'd not worry about this. The inliner runs first (in
the new PM) and then we deduce attributes so we should already have nuked
any always_inline edges.
We also have the pre-call-graph cleanup passes that do most of the code
deletion and such prior to inlining.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev