This is the mail archive of the
cgen@sourceware.org
mailing list for the CGEN project.
Re: new do-count rtl
- From: Doug Evans <dje at sebabeach dot org>
- To: cgen at sourceware dot org
- Date: Thu, 27 Aug 2009 14:35:39 -0700
- Subject: Re: new do-count rtl
- References: <4A95669B.8050900@sebabeach.org>
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.