This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: function-at-a-time processing in C


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]