Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(59)

Issue 4806053: [google] Fix lipo regression test failures after merge from trunk

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 2 months ago by davidxl
Modified:
10 years, 9 months ago
Reviewers:
CC:
gcc-patches_gcc.gnu.org
Base URL:
svn+ssh://gcc.gnu.org/svn/gcc/branches/google/main/gcc/
Visibility:
Public.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -15 lines) Patch
M cgraphunit.c View 1 chunk +2 lines, -1 line 0 comments Download
M ipa-inline.c View 1 chunk +3 lines, -0 lines 0 comments Download
M l-ipo.c View 2 chunks +3 lines, -1 line 0 comments Download
M testsuite/gcc.dg/tree-prof/lipo/val-prof-2_0.c View 1 chunk +1 line, -1 line 0 comments Download
M value-prof.c View 1 chunk +1 line, -12 lines 0 comments Download

Messages

Total messages: 1
davidxl
14 years, 2 months ago (2011-07-26 19:48:47 UTC) #1
The patch is committed to google/main to fix lipo test regressions after trunk
merge.

2011-07-26  David Li  <davidxl@google.com>

	* value-prof.c (gimple_value_profile_transformations): Remove redundant code.
	* cgraphunit.c (cgraph_mark_functions_to_output): Fix assertion in lipo mode.
	* ipa-inline.c (early_inliner): Check fake edge.
	* l-ipo.c (pop_module_scope): Process alias node.
	(cgraph_unify_type_alias_sets): Skip empty function.
	* testsuite/gcc.dg/tree-prof/lipo/val-prof-2_0.c: update test case

Index: value-prof.c
===================================================================
--- value-prof.c	(revision 176763)
+++ value-prof.c	(working copy)
@@ -613,18 +613,7 @@ gimple_value_profile_transformations (vo
     }
 
   if (changed)
-    {
-      counts_to_freqs ();
-      /* Value profile transformations may change inline parameters
-         a lot (e.g., indirect call promotion introduces new direct calls).
-         The update is also needed to avoid compiler ICE -- when MULTI
-         target icall promotion happens, the caller's size may become
-         negative when the promoted direct calls get promoted.  */
-      /* Guard this for LIPO for now.  */
-      if (L_IPO_COMP_MODE)
-        compute_inline_parameters (cgraph_get_node (current_function_decl),
-				   false);
-    }
+    counts_to_freqs ();
 
   return changed;
 }
Index: cgraphunit.c
===================================================================
--- cgraphunit.c	(revision 176763)
+++ cgraphunit.c	(working copy)
@@ -1531,7 +1531,8 @@ cgraph_mark_functions_to_output (void)
 	  gcc_assert (node->global.inlined_to
 		      || !gimple_has_body_p (decl)
 		      || node->in_other_partition
-		      || DECL_EXTERNAL (decl));
+		      || DECL_EXTERNAL (decl)
+                      || cgraph_is_auxiliary (node->decl));
 
 	}
 
Index: testsuite/gcc.dg/tree-prof/lipo/val-prof-2_0.c
===================================================================
--- testsuite/gcc.dg/tree-prof/lipo/val-prof-2_0.c	(revision 176763)
+++ testsuite/gcc.dg/tree-prof/lipo/val-prof-2_0.c	(working copy)
@@ -26,7 +26,7 @@ main ()
 /* { dg-final-use { scan-ipa-dump "Mod power of 2 transformation on insn"
"profile" } } */
 /* This is part of code checking that n is power of 2, so we are sure that the
transformation
    didn't get optimized out.  */
-/* { dg-final-use { scan-tree-dump "n_\[0-9\]* \\+ 0xffff" "optimized"} } */
+/* { dg-final-use { scan-tree-dump "n_\[0-9\]* \\+ (4294967295|0x0*ffffffff)"
"optimized"} } */
 /* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */
 /* { dg-final-use { cleanup-tree-dump "optimized" } } */
 /* { dg-final-use { cleanup-ipa-dump "profile" } } */
Index: ipa-inline.c
===================================================================
--- ipa-inline.c	(revision 176763)
+++ ipa-inline.c	(working copy)
@@ -2008,6 +2008,9 @@ early_inliner (void)
 	  for (edge = node->callees; edge; edge = edge->next_callee)
 	    {
 	      struct inline_edge_summary *es = inline_edge_summary (edge);
+
+	      if (!edge->call_stmt)
+	        continue;
 	      es->call_stmt_size
 		= estimate_num_insns (edge->call_stmt, &eni_size_weights);
 	      es->call_stmt_time
Index: l-ipo.c
===================================================================
--- l-ipo.c	(revision 176763)
+++ l-ipo.c	(working copy)
@@ -390,6 +390,7 @@ pop_module_scope (void)
     primary_module_last_loc = input_location;
 
   at_eof = 1;
+  cgraph_process_same_body_aliases ();
   lang_hooks.l_ipo.process_pending_decls (input_location);
   lang_hooks.l_ipo.clear_deferred_fns ();
   at_eof = 0;
@@ -1067,7 +1068,8 @@ cgraph_unify_type_alias_sets (void)
         {
           push_cfun (DECL_STRUCT_FUNCTION (node->decl));
           current_function_decl = node->decl;
-          cgraph_collect_type_referenced ();
+          if (gimple_has_body_p (current_function_decl))
+            cgraph_collect_type_referenced ();
           current_function_decl = NULL;
           pop_cfun ();
         }

--
This patch is available for review at http://codereview.appspot.com/4806053
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b