Bug in value-prof.c:visit_hist
There appears to be a bug in value-prof.c:visit_hist rev 121554. This function always returns 0, which causes htab_traverse to exit early. This means that only the first histogram that appears in cfun- >value_histograms->entries is ever checked, so verify_histograms will only indicate an error if the first histogram is unreachable. The attached patch changes the return value to ensure that all histograms are checked. This patch bootstraps and passes make check on x86_64. Robert Kidd [EMAIL PROTECTED] Index: gcc/value-prof.c === --- gcc/value-prof.c(revision 121671) +++ gcc/value-prof.c(working copy) @@ -353,8 +353,9 @@ visit_hist (void **slot, void *data) dump_histogram_value (stderr, hist); debug_generic_stmt (hist->hvalue.stmt); error_found = true; + return 0; } - return 0; + return 1; } /* Verify sanity of the histograms. */
GCC superblock and region formation support
As a quick introduction, my name is Robert Kidd, and I'm working with the Gelato Federation to improve the performance of GCC on Itanium. In particular, I'm looking into improving GCC's superblock support, hopefully bringing over some of what we have learned with the IMPACT compiler project. After studying GCC's current tail duplication and extended basic block scheduling code, I'm thinking about ways to improve GCC's representation. I'm aiming for a more concrete form than a basic block trace. Steven Bosscher pointed me in the direction of the region formation project by Daniel Berlin and Kenneth Zadeck, which sounds like a good basis for a superblock representation. What is the status of this project? Has any documentation or code been released? Thanks Robert Kidd [EMAIL PROTECTED]
[ia64-improvements] Moved Superblock formation to Tree-SSA
I checked a patch into the ia64-improvements branch to move Superblock formation to the Tree-SSA level. This patch also brings an update to the trace formation pass. When building a trace inside a loop, we now follow the backedge once to add the loop header to the trace. This allows tail duplication to form a superblock loop that can be processed by the loop unroller later on. 2006-02-17 Robert Kidd <[EMAIL PROTECTED]> * tracer.c (mark_bb_seen): New function. (bb_seen_p): New function. (count_insns): Use estimate_num_insns instead of counting RTL instructions. (find_trace): Tracing a loop now traverses the back edge once to duplicate the loop header. (tail_duplicate): Phi nodes are fixed after duplicating blocks. (layout_superblocks): Remove function. (execute_tracer): CFG layout stuff is not needed at the tree level. (rest_of_handle_tracer): Remove function. * bb-reorder.c (rest_of_handle_reorder_blocks): Removed call to RTL level tracer. * passes.c (init_optimization_passes): Moved pass_tracer from after pass_rtl_ifcvt to after pass_build_ssa. Robert Kidd [EMAIL PROTECTED]