Re: [google] Propagate profile information to RTL level during switch expansion

2012-02-01 Thread Xinliang David Li
thanks. ok for google/gcc_46 branch. David On Wed, Feb 1, 2012 at 11:52 AM, Easwaran Raman wrote: > On Tue, Jan 31, 2012 at 10:16 PM, Xinliang David Li > wrote: >> Ok for google branch with minor changes below. >> >> thanks, >> >> David >> +#define case_probability(x, y) ((y) ? ((x) * REG

Re: [google] Propagate profile information to RTL level during switch expansion

2012-02-01 Thread Easwaran Raman
On Tue, Jan 31, 2012 at 10:16 PM, Xinliang David Li wrote: > Ok for google branch with minor changes below. > > thanks, > > David > >>> +#define case_probability(x, y) ((y) ? ((x) * REG_BR_PROB_BASE  / (y))  : >>> -1) >>> + > > Using upper case for macro? From http://gcc.gnu.org/codingconventions

Re: [google] Propagate profile information to RTL level during switch expansion

2012-01-31 Thread Xinliang David Li
Ok for google branch with minor changes below. thanks, David >> +static bool non_zero_profile_counts ( VEC(edge,gc) *edges) { static bool non_zero_profile_counts(...) Please also provide function documentation. >> +  edge e; >> +  edge_iterator ei; >> +  FOR_EACH_EDGE(e, ei, edges) >> +    {