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]

Fix ipa-struct-reorg failures


Hi,
my patch adding sanity checking also uncovered problem in ipa-struct-reorg
that is adding new edges with wrong profile info.

Honza

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 154267)
+++ ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2009-11-17  Jan Hubicka  <jh@suse.cz>
+
+	* ipa-struct-reorg.c (update_cgraph_with_malloc_call): Fix profile
+	info.
+
 2009-11-17  Eric Botcazou  <ebotcazou@adacore.com>
 
 	* toplev.c (process_options): Remove dead code.
Index: ipa-struct-reorg.c
===================================================================
--- ipa-struct-reorg.c	(revision 154267)
+++ ipa-struct-reorg.c	(working copy)
@@ -1690,7 +1690,10 @@ update_cgraph_with_malloc_call (gimple m
   src = cgraph_node (context);
   dest = cgraph_node (malloc_fn_decl);
   cgraph_create_edge (src, dest, malloc_stmt, 
-		      0, 0, gimple_bb (malloc_stmt)->loop_depth);
+		      gimple_bb (malloc_stmt)->count,
+		      compute_call_stmt_bb_frequency
+		        (context, gimple_bb (malloc_stmt)),
+		      gimple_bb (malloc_stmt)->loop_depth);
 }
 
 /* This function generates set of statements required 


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