+2004-08-09 Steven Bosscher <stevenb@suse.de>
+
+ * timevar.def (TV_CPROP1, TV_CPROP2, TV_PRE, TV_HOIST, TV_LSM):
+ New timers.
+ * gcse.c: Include timevar.h.
+ (const_prop_count, copy_prop_count): Rename to global_const_prop_count
+ and global_copy_prop_count.
+ (local_const_prop_count, local_copy_prop_count): New static globals.
+ (gcse_main): Set the right timevar for each pass.
+ (cprop_jump): Increment global_const_prop_count when a constant is
+ propagated. Add "GLOBAL" to dump output.
+ (cprop_insn): Increment global_const_prop_count when a constant is
+ propagated, or global_copy_prop_count when a copy is propagated.
+ (do_local_cprop): Likewise for local_const_prop_count and
+ local_copy_prop_count.
+ (one_cprop_pass): Initialize const/cprop counters to zero.
+ Print out results of local and global const/cprop separately.
+ (bypass_block): Break over-length line.
+
2004-08-09 Paolo Bonzini <bonzini@gnu.org>
* Makefile.in (GTFILES): Remove stmt.c
2004-08-06 Roman Zippel <zippel@linux-m68k.org>
- * config/m68k/m68k.c (post_inc_operand,pre_dec_operand): New.
- * config/m68k/m68k.h (PREDICATE_CODES): add post_inc_operand,
- pre_dec_operand.
- * config/m68k/m68k.md (zero_extend*2): delay the splitting of the
- pattern until reload is finished to allow better code generation
- and split them completely into separate instrunctions.
- (*andsi3_split): New pattern.
+ * config/m68k/m68k.c (post_inc_operand,pre_dec_operand): New.
+ * config/m68k/m68k.h (PREDICATE_CODES): add post_inc_operand,
+ pre_dec_operand.
+ * config/m68k/m68k.md (zero_extend*2): delay the splitting of the
+ pattern until reload is finished to allow better code generation
+ and split them completely into separate instrunctions.
+ (*andsi3_split): New pattern.
2004-08-05 Mark Mitchell <mark@codesourcery.com>
gcse.o : gcse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \
hard-reg-set.h $(FLAGS_H) real.h insn-config.h $(GGC_H) $(RECOG_H) $(EXPR_H) \
$(BASIC_BLOCK_H) function.h output.h toplev.h $(TM_P_H) $(PARAMS_H) \
- except.h gt-gcse.h $(TREE_H) cselib.h
+ except.h gt-gcse.h $(TREE_H) cselib.h $(TIMEVAR_H)
resource.o : resource.c $(CONFIG_H) $(RTL_H) hard-reg-set.h $(SYSTEM_H) coretypes.h \
$(TM_H) $(BASIC_BLOCK_H) $(REGS_H) $(FLAGS_H) output.h $(RESOURCE_H) function.h toplev.h \
$(INSN_ATTR_H) except.h $(PARAMS_H) $(TM_P_H)
$(PARAMS_H) $(TARGET_H) $(CFGLOOP_H) $(COVERAGE_H)
lists.o: lists.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) toplev.h $(RTL_H) $(GGC_H)
bb-reorder.o : bb-reorder.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
- $(RTL_H) $(BASIC_BLOCK_H) $(FLAGS_H) timevar.h output.h $(CFGLAYOUT_H) $(FIBHEAP_H) \
+ $(RTL_H) $(BASIC_BLOCK_H) $(FLAGS_H) $(TIMEVAR_H) output.h $(CFGLAYOUT_H) $(FIBHEAP_H) \
$(TARGET_H)
tracer.o : tracer.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
- $(BASIC_BLOCK_H) hard-reg-set.h output.h $(CFGLAYOUT_H) $(FLAGS_H) timevar.h \
+ $(BASIC_BLOCK_H) hard-reg-set.h output.h $(CFGLAYOUT_H) $(FLAGS_H) $(TIMEVAR_H) \
$(PARAMS_H) $(COVERAGE_H)
cfglayout.o : cfglayout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(TREE_H) insn-config.h $(BASIC_BLOCK_H) hard-reg-set.h output.h \
#include "cselib.h"
#include "intl.h"
#include "obstack.h"
+#include "timevar.h"
/* Propagate flow information through back edges and thus enable PRE's
moving loop invariant calculations out of loops.
static int gcse_subst_count;
/* Number of copy instructions created. */
static int gcse_create_count;
-/* Number of constants propagated. */
-static int const_prop_count;
-/* Number of copys propagated. */
-static int copy_prop_count;
+/* Number of local constants propagated. */
+static int local_const_prop_count;
+/* Number of local copys propagated. */
+static int local_copy_prop_count;
+/* Number of global constants propagated. */
+static int global_const_prop_count;
+/* Number of global copys propagated. */
+static int global_copy_prop_count;
\f
/* For available exprs */
static sbitmap *ae_kill, *ae_gen;
/* Don't allow constant propagation to modify jumps
during this pass. */
+ timevar_push (TV_CPROP1);
changed = one_cprop_pass (pass + 1, 0, 0);
+ timevar_pop (TV_CPROP1);
if (optimize_size)
/* Do nothing. */ ;
else
{
+ timevar_push (TV_PRE);
changed |= one_pre_gcse_pass (pass + 1);
/* We may have just created new basic blocks. Release and
recompute various things which are sized on the number of
alloc_reg_set_mem (max_reg_num ());
compute_sets (f);
run_jump_opt_after_gcse = 1;
+ timevar_pop (TV_PRE);
}
if (max_pass_bytes < bytes_used)
for space, we don't run the partial redundancy algorithms). */
if (optimize_size)
{
+ timevar_push (TV_HOIST);
max_gcse_regno = max_reg_num ();
alloc_gcse_mem (f);
changed |= one_code_hoisting_pass ();
if (max_pass_bytes < bytes_used)
max_pass_bytes = bytes_used;
+ timevar_pop (TV_HOIST);
}
if (file)
max_gcse_regno = max_reg_num ();
alloc_gcse_mem (f);
/* This time, go ahead and allow cprop to alter jumps. */
+ timevar_push (TV_CPROP2);
one_cprop_pass (pass + 1, 1, 0);
+ timevar_pop (TV_CPROP2);
free_gcse_mem ();
if (file)
allocate_reg_info (max_reg_num (), FALSE, FALSE);
if (!optimize_size && flag_gcse_sm)
- store_motion ();
+ {
+ timevar_push (TV_LSM);
+ store_motion ();
+ timevar_pop (TV_LSM);
+ }
/* Record where pseudo-registers are set. */
return run_jump_opt_after_gcse;
run_jump_opt_after_gcse = 1;
- const_prop_count++;
+ global_const_prop_count++;
if (gcse_file != NULL)
{
fprintf (gcse_file,
- "CONST-PROP: Replacing reg %d in jump_insn %d with constant ",
+ "GLOBAL CONST-PROP: Replacing reg %d in jump_insn %d with constant ",
REGNO (from), INSN_UID (jump));
print_rtl (gcse_file, src);
fprintf (gcse_file, "\n");
if (constprop_register (insn, reg_used->reg_rtx, src, alter_jumps))
{
changed = 1;
- const_prop_count++;
+ global_const_prop_count++;
if (gcse_file != NULL)
{
fprintf (gcse_file, "GLOBAL CONST-PROP: Replacing reg %d in ", regno);
if (try_replace_reg (reg_used->reg_rtx, src, insn))
{
changed = 1;
- copy_prop_count++;
+ global_copy_prop_count++;
if (gcse_file != NULL)
{
fprintf (gcse_file, "GLOBAL COPY-PROP: Replacing reg %d in insn %d",
print_rtl (gcse_file, newcnst);
fprintf (gcse_file, "\n");
}
- const_prop_count++;
+ local_const_prop_count++;
return true;
}
else if (newreg && newreg != x && try_replace_reg (x, newreg, insn))
REGNO (x), INSN_UID (insn));
fprintf (gcse_file, " with reg %d\n", REGNO (newreg));
}
- copy_prop_count++;
+ local_copy_prop_count++;
return true;
}
}
{
int changed = 0;
- const_prop_count = 0;
- copy_prop_count = 0;
+ global_const_prop_count = local_const_prop_count = 0;
+ global_copy_prop_count = local_copy_prop_count = 0;
local_cprop_pass (cprop_jumps);
{
fprintf (gcse_file, "CPROP of %s, pass %d: %d bytes needed, ",
current_function_name (), pass, bytes_used);
- fprintf (gcse_file, "%d const props, %d copy props\n\n",
- const_prop_count, copy_prop_count);
+ fprintf (gcse_file, "%d local const props, %d local copy props\n\n",
+ local_const_prop_count, local_copy_prop_count);
+ fprintf (gcse_file, "%d global const props, %d global copy props\n\n",
+ global_const_prop_count, global_copy_prop_count);
}
/* Global analysis may get into infinite loops for unreachable blocks. */
if (changed && cprop_jumps)
if (gcse_file != NULL)
{
- fprintf (gcse_file, "JUMP-BYPASS: Proved reg %d in jump_insn %d equals constant ",
+ fprintf (gcse_file, "JUMP-BYPASS: Proved reg %d "
+ "in jump_insn %d equals constant ",
regno, INSN_UID (jump));
print_rtl (gcse_file, SET_SRC (set->expr));
fprintf (gcse_file, "\nBypass edge from %d->%d to %d\n",
max_gcse_regno = max_reg_num ();
alloc_gcse_mem (get_insns ());
- changed = one_cprop_pass (1, 1, 1);
+ changed = one_cprop_pass (MAX_GCSE_PASSES + 2, 1, 1);
free_gcse_mem ();
if (file)