OSDN Git Service

* ipa-struct-reorg.c (update_cgraph_with_malloc_call): Fix profile
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 17 Nov 2009 21:18:49 +0000 (21:18 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 17 Nov 2009 21:18:49 +0000 (21:18 +0000)
info.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154271 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/ipa-struct-reorg.c

index 8d26038..c19ae95 100644 (file)
@@ -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 147610a..65777f5 100644 (file)
@@ -1690,7 +1690,10 @@ update_cgraph_with_malloc_call (gimple malloc_stmt, tree context)
   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