summaryrefslogtreecommitdiffstats
path: root/gcc/dbgcnt.c
diff options
context:
space:
mode:
authorzadeck <zadeck@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-21 18:55:13 +0000
committerzadeck <zadeck@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-21 18:55:13 +0000
commitbf1f8fbc605e7217a2793f417e54ef3946a655ad (patch)
tree7a1b19b42f86a47fffcfe11926a453b8d560f7dd /gcc/dbgcnt.c
parent772236db27f9c3dcb7a28a0d26d6134b63dffe18 (diff)
downloadppe42-gcc-bf1f8fbc605e7217a2793f417e54ef3946a655ad.tar.gz
ppe42-gcc-bf1f8fbc605e7217a2793f417e54ef3946a655ad.zip
2008-04-24 Richard Sandiford <rsandifo@nildram.co.uk>
Kenneth Zadeck <zadeck@naturalbridge.com> * dbgcnt.def (ra_byte_scan): Added. * dbgcnt.c (dbg_cnt): Added code to print message to dump_file when the last hit happens for a counter. * timevar.def (TV_DF_BYTE_LR): New variable. * tree-pass.h (pass_fast_rtl_byte_dce): New pass. * passes.c (pass_fast_rtl_byte_dce): New pass. * fwprop.c (update_df): Added mode to call df_ref_create. Renamed DF_REF_WIDTH and DF_REF_OFFSET to DF_REF_EXTRACT_WIDTH and DF_REF_EXTRACT_OFFSET. * df.h (DF_BYTE_LR, DF_BYTE_LR_BB_INFO, DF_BYTE_LR_IN, DF_BYTE_LR_OUT, df_byte_lr): New macro. (df_mm): New enum. (df_ref_extract): Added mode field. (DF_REF_WIDTH, DF_REF_OFFSET) Renamed to DF_REF_EXTRACT_WIDTH and DF_REF_EXTRACT_OFFSET. (DF_REF_EXTRACT_MODE): New macro. (df_byte_lr_bb_info): New structure. (df_print_byte_regset, df_compute_accessed_bytes, df_byte_lr_add_problem, df_byte_lr_get_regno_start, df_byte_lr_get_regno_len, df_byte_lr_simulate_defs, df_byte_lr_simulate_uses, df_byte_lr_simulate_artificial_refs_at_top, df_byte_lr_simulate_artificial_refs_at_end, df_compute_accessed_bytes): New function. (df_ref_create): Add parameter. (df_byte_lr_get_bb_info): New inline function. * df-scan.c (df_ref_record, df_uses_record, df_ref_create_structure): Added mode parameter. (df_ref_create, df_notes_rescan, df_ref_record, df_def_record_1, df_defs_record, df_uses_record, df_get_conditional_uses, df_get_call_refs, df_insn_refs_collect, df_bb_refs_collect, df_entry_block_defs_collect, df_exit_block_uses_collect): Added mode parameter to calls to df_ref_record, df_uses_record, df_ref_create_structure. (df_ref_equal_p, df_ref_compare): Added test for modes. (df_ref_create_structure): Added code to set mode. Renamed DF_REF_WIDTH and DF_REF_OFFSET to DF_REF_EXTRACT_WIDTH and DF_REF_EXTRACT_OFFSET. * df-core.c (df_print_byte_regset): New function. * df-byte-scan.c: New file. * df-problems.c (df_rd_transfer_function): Removed unnecessary calls to BITMAP_FREE. (df_byte_lr_problem_data, df_problem problem_BYTE_LR): New structure. (df_byte_lr_get_regno_start, df_byte_lr_get_regno_len, df_byte_lr_set_bb_info, df_byte_lr_free_bb_info, df_byte_lr_check_regs, df_byte_lr_expand_bitmap, df_byte_lr_alloc, df_byte_lr_reset, df_byte_lr_bb_local_compute, df_byte_lr_local_compute, df_byte_lr_init, df_byte_lr_confluence_0, df_byte_lr_confluence_n, df_byte_lr_transfer_function, df_byte_lr_free, df_byte_lr_top_dump, df_byte_lr_bottom_dump, df_byte_lr_add_problem, df_byte_lr_simulate_defs, df_byte_lr_simulate_uses, df_byte_lr_simulate_artificial_refs_at_top, df_byte_lr_simulate_artificial_refs_at_end): New function. * dce.c (byte_dce_process_block): New function. (dce_process_block): au is now passed in rather than computed locally. Changed loops that look at artificial defs to not look for conditional or partial ones, because there never are any. (fast_dce): Now is able to drive byte_dce_process_block or dce_process_block depending on the kind of dce being done. (rest_of_handle_fast_dce): Add parameter to fast_dce. (rest_of_handle_fast_byte_dce): New function. (rtl_opt_pass pass_fast_rtl_byte_dce): New pass. * Makefile.in (df-byte-scan.o, debugcnt.o): Added dependencies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134523 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dbgcnt.c')
-rw-r--r--gcc/dbgcnt.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/dbgcnt.c b/gcc/dbgcnt.c
index 8ab5fd0ea52..47ba28a9648 100644
--- a/gcc/dbgcnt.c
+++ b/gcc/dbgcnt.c
@@ -23,6 +23,9 @@ See dbgcnt.def for usage information. */
#include "system.h"
#include "coretypes.h"
#include "errors.h"
+#include "tm.h"
+#include "rtl.h"
+#include "output.h"
#include "dbgcnt.h"
@@ -58,6 +61,10 @@ bool
dbg_cnt (enum debug_counter index)
{
count[index]++;
+ if (dump_file && count[index] == limit[index])
+ fprintf (dump_file, "***dbgcnt: limit reached for %s.***\n",
+ map[index].name);
+
return dbg_cnt_is_enabled (index);
}
@@ -132,7 +139,8 @@ dbg_cnt_process_opt (const char *arg)
/* Print name, limit and count of all counters. */
-void dbg_cnt_list_all_counters (void)
+void
+dbg_cnt_list_all_counters (void)
{
int i;
printf (" %-30s %-5s %-5s\n", "counter name", "limit", "value");
OpenPOWER on IntegriCloud