[Bug middle-end/94146] [10 Regression] Merging functions with same bodies stopped working

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Mar 12 10:38:10 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94146

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Both functions are extern. So both functions can have their address taken out
side of this TU so they cannot be alias of each other.  Yes inlining inlined
back the original function but that is ok because the cost model is saying that
is cheaper than the call itself.

Note even though the cost model could be improved, tail call detection happens
late so the cost for call does not take into account tail call.  Oh not every
target has a tail call pattern (major ones do).


More information about the Gcc-bugs mailing list