From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9098 invoked by alias); 28 Aug 2009 06:31:02 -0000 Received: (qmail 9084 invoked by uid 22791); 28 Aug 2009 06:31:02 -0000 X-SWARE-Spam-Status: No, hits=-0.0 required=5.0 tests=AWL,BAYES_00,DNS_FROM_RFC_BOGUSMX,J_CHICKENPOX_33 X-Spam-Check-By: sourceware.org Received: from sebabeach.org (HELO sebabeach.org) (64.165.110.50) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 28 Aug 2009 06:30:58 +0000 Received: from dje-macbookpro15.local (localhost.localdomain [127.0.0.1]) by sebabeach.org (Postfix) with ESMTP id 09A6A6E3D0 for ; Thu, 27 Aug 2009 23:30:56 -0700 (PDT) Message-ID: <4A97799F.4020901@sebabeach.org> Date: Fri, 28 Aug 2009 06:31:00 -0000 From: Doug Evans User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 To: cgen@sourceware.org Subject: Re: new do-count rtl References: <4A95669B.8050900@sebabeach.org> <4A96FC2B.8010605@sebabeach.org> In-Reply-To: <4A96FC2B.8010605@sebabeach.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cgen-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sourceware.org X-SW-Source: 2009-q3/txt/msg00082.txt.bz2 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 > > 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).