Hi,
this patch permits inlining across flag_strict_aliasing this is hopefully
safe because te memory accesses in -fstrict-aliasing should have alias
set 0.

This should alllow to build packages that currently fail on always_inline
because of use of explicit optimization attributes and hopefully also solve the
performance issues with Firefox and LTO+FDO build that crept in shortly before
release.

Bootstrapped/regtested x86_64-linux, will commit it to mainline and to branch
later next week if no problems shows up.

Honza

        PR ipa/65873
        * ipa-inline.c (can_inline_edge_p): It is safe to inline across
        -fstrict-aliasing boundaries.
Index: ipa-inline.c
===================================================================
--- ipa-inline.c        (revision 222620)
+++ ipa-inline.c        (working copy)
@@ -439,9 +439,6 @@ can_inline_edge_p (struct cgraph_edge *e
               == !opt_for_fn (callee->decl, optimize) || !always_inline))
          || check_match (flag_wrapv)
          || check_match (flag_trapv)
-         /* Strictly speaking only when the callee contains memory
-            accesses that are not using alias-set zero anyway.  */
-         || check_maybe_down (flag_strict_aliasing)
          /* Strictly speaking only when the callee uses FP math.  */
          || check_maybe_up (flag_rounding_math)
          || check_maybe_up (flag_trapping_math)

Reply via email to