aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2006-12-13 14:02:06 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2006-12-13 13:02:06 +0000
commit6946b3f7f5a9f6c33b3563a5923b78d9c91a93e1 (patch)
tree00bc2fa411be3a6cb147ee807dd73158ea8f60d1 /gcc/tree-cfg.c
parenta22831b13c3aa9d3cecad957175b1d3b9491d161 (diff)
downloadgcc-6946b3f7f5a9f6c33b3563a5923b78d9c91a93e1.zip
gcc-6946b3f7f5a9f6c33b3563a5923b78d9c91a93e1.tar.gz
gcc-6946b3f7f5a9f6c33b3563a5923b78d9c91a93e1.tar.bz2
Makefile.in: Add dependencies.
* Makefile.in: Add dependencies. * tree-pretty-print.c: Include value-prof.h (dump_generic_bb_buff): Dump histograms * value-prof.c: Include pointer-set.h (gimple_alloc_histogram_value, histogram_hash, histogram_eq, set_histogram_value, gimple_histogram_value, gimple_add_histogram_value, gimple_remove_histogram_value, gimple_histogram_value_of_type, dump_histogram_value, dump_histograms_for_stmt, gimple_remove_stmt_histograms, gimple_duplicate_stmt_histograms, visit_hist, verify_histograms): New functions. (tree_value_profile_transformations): Update for new histogram API. (tree_divmod_fixed_value): Update for new histogram API. (tree_divmod_fixed_value_transform): Update for new histogram API. (tree_mod_pow2): Update for new histogram API. (tree_mod_pow2_value_transform): Update for new histogram API. (tree_mod_subtract): Update for new histogram API. (tree_mod_subtract_transform): Update for new histogram API. (tree_stringops_transform): Update for new histogram API. (tree_divmod_values_to_profile): Update for new histogram API. (tree_stringops_values_to_profile): Update for new histogram API. (tree_find_values_to_profile): Update for new histogram API. * value-prof.h (gimple_histogram_value): Declare. (gimple_histogram_value_of_type): Declare. (gimple_add_histogram_value): Declare. (gimple_remove_histogram_value): Declare. (dump_histograms_for_stmt): Declare. (gimple_remove_histogram_value): Declare. (gimple_remove_stmt_histograms): Declare. (gimple_duplicate_stmt_histograms): Declare. (verify_histograms): Declare. * function.h (struct funrction): Add value_histograms hash. (VALUE_HISTOGRAMS): New macro. * profile.c (compute_value_histograms): update for new API. * tree-inline.c: Include value-prof.h (copy_bb): Update histograms. * tree-flow.h (struct stmt_ann_d): Do not contain pointer to histograms; reorder to get smaller memory layout. * tree-cfg.c: Include value-prof.h (bsi_remove): Update histograms. (bsi_replace): Update histograms. (verify_stmts): Call histogram verifier. (tree_duplicate_bb): Update histograms. (move_block_to_fn): Update histograms. From-SVN: r119829
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 26aa262..b85e38e 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -46,6 +46,7 @@ Boston, MA 02110-1301, USA. */
#include "cfglayout.h"
#include "hashtab.h"
#include "tree-ssa-propagate.h"
+#include "value-prof.h"
/* This file contains functions for building the Control Flow Graph (CFG)
for a function tree. */
@@ -2871,7 +2872,10 @@ bsi_remove (block_stmt_iterator *i, bool remove_eh_info)
tsi_delink (&i->tsi);
mark_stmt_modified (t);
if (remove_eh_info)
- remove_stmt_from_eh_region (t);
+ {
+ remove_stmt_from_eh_region (t);
+ gimple_remove_stmt_histograms (cfun, t);
+ }
}
@@ -2934,6 +2938,8 @@ bsi_replace (const block_stmt_iterator *bsi, tree stmt, bool update_eh_info)
{
remove_stmt_from_eh_region (orig_stmt);
add_stmt_to_eh_region (stmt, eh_region);
+ gimple_duplicate_stmt_histograms (cfun, stmt, cfun, orig_stmt);
+ gimple_remove_stmt_histograms (cfun, orig_stmt);
}
}
@@ -3671,6 +3677,7 @@ verify_stmts (void)
internal_error ("verify_stmts failed");
htab_delete (htab);
+ verify_histograms ();
timevar_pop (TV_TREE_STMT_VERIFY);
}
@@ -4342,6 +4349,7 @@ tree_duplicate_bb (basic_block bb)
region = lookup_stmt_eh_region (stmt);
if (region >= 0)
add_stmt_to_eh_region (copy, region);
+ gimple_duplicate_stmt_histograms (cfun, copy, cfun, stmt);
/* Create new names for all the definitions created by COPY and
add replacement mappings for each new name. */
@@ -4785,6 +4793,8 @@ move_block_to_fn (struct function *dest_cfun, basic_block bb,
{
add_stmt_to_eh_region_fn (dest_cfun, stmt, region + eh_offset);
remove_stmt_from_eh_region (stmt);
+ gimple_duplicate_stmt_histograms (dest_cfun, stmt, cfun, stmt);
+ gimple_remove_stmt_histograms (cfun, stmt);
}
}
}