This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: SIMPLE: A language-independent tree IR


Richard Henderson wrote:

> Yes, we must do something special to represent this.  Otherwise
> we can't tell the difference between
> 
>         Z = A + B + C + D
>         Z = ((A + B) + C) + D
> 
> and, given a pipelined fpu, clearly you want the former rendered as
> 
>         t1 = A + B
>         t2 = C + D
>         Z = t1 + t2

Ah, yes - I see.  The obvious way to parse both expressions would be

      t1 = A + B
      t2 = t1 + C
      Z = t2 + D

while there _is_ a reordering difference between the two.

Still, I feel this is different from the "sequence point" concept of the
C language, but I cannot come up with a simple example that shows it.

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)


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