new do-count rtl

Doug Evans dje@sebabeach.org
Fri Aug 28 06:31:00 GMT 2009


Doug Evans wrote:
> Doug Evans wrote:
>> Hi.
>>
>> What do folks think of adding a new rtl for iterating a specified 
>> number of times.
>>
>> Something like
>>
>> (do-count nr-times iter-var expr1 [expr2 ...])
>>
>> For now the result would always be void, and iter-var would always 
>> have mode INT.
>> The set of expressions is performed nr-times times and iter-var has 
>> values 0 ... nr-times - 1.
>>
>> ?
>>
>
> Checked in.
>
> 2009-08-27  Doug Evans  <dje@sebabeach.org>
>
>        Add do-count rtl function.
>        * rtl-c.scm (s-do-count): New function.
>        (do-count): New rtl handler.
>        * rtl-traverse.scm (-rtx-traverse-iteration): New function.
>        (-rtx-make-traverser-table): Add ITERATION.
>        * rtl.scm (rtx-env-make-iteration-locals): New function.
>        * rtx-funcs.scm (do-count): New rtl function.
>        * cpu/play.cpu: Add do-count-test insn.
>        * doc/rtl.texi: Add docs on do-count.
>

fyi,
I updated the patch to support an rtl expression for the number of 
iterations, and swapped the iteration-var and number-of-iterations 
parameters (felt more consistent with sequence/parallel).



More information about the Cgen mailing list