Make GCSE statistics more detailed
Mon Aug 9 15:09:00 GMT 2004
On Mon, 9 Aug 2004, Steven Bosscher wrote:
> * 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
> (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.
You're missing the change to Makefile.in reflecting the dependency of
gcse.o on $(TIMEVAR_H). Ok for mainline with that change.
If you have access to SPEC it might be useful to use your patch to update
the statistics in the comment at the top of gcse.c:
>> A study of spec92 using an unlimited number of passes:
>> [1 pass] = 1208 substitutions,  = 577,  = 202,  = 192,
>>  = 83,  = 34,  = 17,  = 9,  = 4,  = 4,  = 2,
>>  = 2,  = 1,  = 1,  = 2,  = 1
I suspect that tree-ssa completely invalidates these statistics.
More information about the Gcc-patches