This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: function-at-a-time processing in C
- To: Mark Mitchell <mark at codesourcery dot com>
- Subject: Re: function-at-a-time processing in C
- From: Diego Novillo <dnovillo at redhat dot com>
- Date: Thu, 15 Jun 2000 11:05:35 -0400 (EDT)
- cc: per at bothner dot com, chelf at codesourcery dot com, gcc-patches at gcc dot gnu dot org
On Thu, 15 Jun 2000, Mark Mitchell wrote:
> Third, why are there separate FOR_STMT, WHILE_STMT, DO_STMT?
> They are all variants of each other. In fact, they are all special
> cases of LOOP_EXPR. Using separate tree codes means useless extra code,
> and more difficulty writing optimizers.
>
> It also means a representation that looks more like the source
> program. That's essential in some cases (templates), and useful for
> folks who want to write other tools based on the front-ends that
> aren't compilers. Of course, when these become RTL, they do all
> become the same thing.
>
Having FOR_STMT as a separate entity is also useful for doing
high-level loop transformations. In particular if the FOR_STMT
structure includes information like index variable, bounds and
trip counts.
I am not sure if FOR_STMT actually includes all that information,
but it would be very handy.
Diego.