This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] remove duplicate inline parameter calculation


Hi, 

I've noticed that inlining parameter calculation is expensive, and done 3 
times where at most twice is enough. From discussion with Honza on IRC we've 
determined that this is an accidental left-over. 

The patch below gives ~ 1% performance gain. regtested on x86_64-suse-linux 
with default languages (mainline from just before the libtool breakage). 

Ok?

Dirk

2007-05-29  Dirk Mueller  <dmueller@suse.de>

	* cgraphunit.c (cgraph_analyze_function): Remove 
	computation of inline parameters.


--- cgraphunit.c	(revision 125030)
+++ cgraphunit.c	(working copy)
@@ -761,19 +761,6 @@ cgraph_analyze_function (struct cgraph_n
   push_cfun (DECL_STRUCT_FUNCTION (decl));
   cgraph_lower_function (node);
 
-  node->local.estimated_self_stack_size = estimated_stack_frame_size ();
-  node->global.estimated_stack_size = node->local.estimated_self_stack_size;
-  node->global.stack_frame_offset = 0;
-  node->local.inlinable = tree_inlinable_function_p (decl);
-  if (!flag_unit_at_a_time)
-    node->local.self_insns = estimate_num_insns (decl, &eni_inlining_weights);
-  if (node->local.inlinable)
-    node->local.disregard_inline_limits
-      = lang_hooks.tree_inlining.disregard_inline_limits (decl);
-  if (flag_really_no_inline && !node->local.disregard_inline_limits)
-    node->local.inlinable = 0;
-  /* Inlining characteristics are maintained by the cgraph_mark_inline.  */
-  node->global.insns = node->local.self_insns;
   if (!flag_unit_at_a_time)
     {
       bitmap_obstack_initialize (NULL);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]