[tuples] Tuplify PREDICT_EXPR

Jakub Jelinek jakub@redhat.com
Fri Jul 4 14:31:00 GMT 2008


On Fri, Jul 04, 2008 at 10:17:02AM -0400, Diego Novillo wrote:
> > +/* Build a GIMPLE_PREDICT statement.  */
> > +
> > +gimple
> > +gimple_build_predict (enum br_predictor predictor, enum prediction outcome)
> 
> Need to document PREDICTOR and OUTCOME.

Will fix.

> >    Keep this list sorted.  */
> >  static const unsigned int GF_ASM_INPUT                 = 1 << 0;
> > @@ -107,6 +107,8 @@ static const unsigned int GF_OMP_RETURN_
> >
> >  static const unsigned int GF_OMP_SECTION_LAST          = 1 << 0;
> >
> > +static const unsigned int GF_PREDICT_TAKEN             = 1 << 15;
> > +
> 
> Why 15?  You can start from 0.  These flags are not overlapping.  It's
> not terribly important, though.

The lower bits contain the predictor code.  Currently there are 28 in
predict.def, but they might grow a little bit over time, so I 
thought I'll start with the flags from the top.  Another alternative
is to shift the predictor code up and use GF_PREDICT_TAKEN = 1 << 0,
but then we'd need some macro/const how much we want to shift.

	Jakub



More information about the Gcc-patches mailing list