[CFG] Loop unrolling

Zdenek Dvorak rakdver@atrey.karlin.mff.cuni.cz
Mon Mar 18 12:22:00 GMT 2002


Hello.

> > + /* The maximum number of insns of an unrolled loop.  */
> > + DEFPARAM(MAX_UNROLLED_INSNS,
> > + 	"max-unrolled-insns",
> > + 	"The maximum number of insns of an unrolled loop",
> > + 	200)
> > + /* The maximum number of unrollings of a single loop.  */
> > + DEFPARAM(MAX_UNROLL_TIMES,
> > + 	"max-unroll-times",
> > + 	"The maximum number of unrollings of a single loop",
> > + 	3)
> 
> Concerning the unrolling heuristics, we really should try to keep
> the factor of unrolling power of 2 to keep the loop straddles and
> friends easilly computable, so value if 3 is somewhat curious.

It in fact means 4 (it is, it means maximum number of duplicates of loop
created); it is a bit counterintuitive, I will change it.

> Lets set it to 4 or 8 and implement the code to keep power of two
> if possible (for known number of iterations it is of course not always
> maitainable).

OK.

Zdenek



More information about the Gcc-patches mailing list