diff mbox

[google-4_6] fix profile mismatch in stream LIPO (issue6194059)

Message ID 20120508165345.A86FAC15B9@rong.mtv.corp.google.com
State New
Headers show

Commit Message

Rong Xu May 8, 2012, 4:53 p.m. UTC
Hi,

This patch is for google-4_6 branch only.

It fixes a profile mismatch in streaming LIPO and recovers the performance loss
due to this.

Tested with google internal benchmarks.

Thanks,

2012-05-08   Rong Xu  <xur@google.com>

	* ipa-inline.c (fixed_arg_function_p):
	(better_inline_comdat_function_p): match lipo_gen in stream LIPO.


--
This patch is available for review at http://codereview.appspot.com/6194059

Comments

Xinliang David Li May 8, 2012, 4:55 p.m. UTC | #1
Ok.

David

On Tue, May 8, 2012 at 9:53 AM, Rong Xu <xur@google.com> wrote:
> Hi,
>
> This patch is for google-4_6 branch only.
>
> It fixes a profile mismatch in streaming LIPO and recovers the performance loss
> due to this.
>
> Tested with google internal benchmarks.
>
> Thanks,
>
> 2012-05-08   Rong Xu  <xur@google.com>
>
>        * ipa-inline.c (fixed_arg_function_p):
>        (better_inline_comdat_function_p): match lipo_gen in stream LIPO.
>
> Index: ipa-inline.c
> ===================================================================
> --- ipa-inline.c        (revision 187275)
> +++ ipa-inline.c        (working copy)
> @@ -658,7 +658,7 @@ fixed_arg_function_p (tree fndecl)
>  static bool
>  better_inline_comdat_function_p (struct cgraph_node *node)
>  {
> -  return (profile_arc_flag && flag_dyn_ipa
> +  return (profile_arc_flag && (flag_dyn_ipa || flag_ripa_stream)
>           && DECL_COMDAT (node->decl)
>           && node->global.size <= PARAM_VALUE (PARAM_MAX_INLINE_INSNS_SINGLE)
>           && fixed_arg_function_p (node->decl));
>
> --
> This patch is available for review at http://codereview.appspot.com/6194059
diff mbox

Patch

Index: ipa-inline.c
===================================================================
--- ipa-inline.c	(revision 187275)
+++ ipa-inline.c	(working copy)
@@ -658,7 +658,7 @@  fixed_arg_function_p (tree fndecl)
 static bool
 better_inline_comdat_function_p (struct cgraph_node *node)
 {
-  return (profile_arc_flag && flag_dyn_ipa
+  return (profile_arc_flag && (flag_dyn_ipa || flag_ripa_stream)
           && DECL_COMDAT (node->decl)
           && node->global.size <= PARAM_VALUE (PARAM_MAX_INLINE_INSNS_SINGLE)
           && fixed_arg_function_p (node->decl));