This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [cfg-branch]: Software Trace Cache


> +	    if (e->probability > max_prob 
> +		|| (e->probability == max_prob
> +		    && e->dest->frequency < best_edge->dest->frequency))

One extra issue - when the probabilities and frequencies are equivalent, choose
the block that followed the block orriginally, so we don't reorder the code
for no obvious purpose.

Another trick may be to relax the e->probability == max_prob to accept "nearly
equivalent" probabilities. This will make nearly balanced if statements to be
organized in a way that then is on line saving one jump.  I guess we can accept
+-10% in such case.  Most of the BB reordering algorithms I've seen implemented
speccases this situation even when I didn't seen it mentioned in any paper.

Honza


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]