public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Doug Evans <dje@sebabeach.org>
To: Dave Korn <dave.korn.cygwin@googlemail.com>
Cc: cgen@sourceware.org
Subject: Re: new do-count rtl
Date: Fri, 28 Aug 2009 02:37:00 -0000	[thread overview]
Message-ID: <4A9742F7.8090503@sebabeach.org> (raw)
In-Reply-To: <4A973D3A.3010703@gmail.com>

Dave Korn wrote:
> 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.
>>     
>
>   I don't speak scheme or guile, but I'm learning, so forgive me in advance if
> this is a dumb question:  Does this differ from using a .map on an .iota when
> generating a parameter to an rtl s-expr?
>
>     cheers,
>       DaveK
>
>   

If one knows the number of iterations in advance, yes, they're 
essentially equivalent.  do-count means less rtl, which can be useful, 
but that's it.
[As it turns out I need to be able to make the number of iterations an 
expression, and not just a constant.]

  reply	other threads:[~2009-08-28  2:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-26 16:45 Doug Evans
2009-08-27 21:35 ` Doug Evans
2009-08-28  1:59   ` Dave Korn
2009-08-28  2:37     ` Doug Evans [this message]
2009-08-28  6:31   ` Doug Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A9742F7.8090503@sebabeach.org \
    --to=dje@sebabeach.org \
    --cc=cgen@sourceware.org \
    --cc=dave.korn.cygwin@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).