> If you want to flag errors for all possible wrongly used always_inline
> attribute, should this change be done in can_inline_edge_p? Or keep
> your current change, but also add a warning (something like 'always
> inline function is ignored etc') in inline_always_inline_functions
> when inline transformation can not meaningfully give a useful error.

We have the CIF error codes to be able to give useful diagnostic at
transformation time.  I think it is better to have all the diagnostic output at
one place unless we have really good reasons to fork it.  We are not losing any
precision here, right?

Sure, other option would be to move all alwaysinline diagnostic into
inline_always_inline_functions and remove the code path in tree-inline.  The
warnings however are quite meaningfully places in tree-inline, because we want
to warn only after all the inlining algorithms has finished and inlining really
did not happen. They can be moved out there if we walk the edges at end and
output diagnostic, but I do not see anything really wrong with their current
location.

Honza

Reply via email to