SIMPLE: A language-independent tree IR
James Mansion
james@westongold.com
Mon Jan 7 15:05:00 GMT 2002
>> Z = A + B + C + D
...
>Ah, yes - I see. The obvious way to parse both expressions would be
>
> t1 = A + B
> t2 = t1 + C
> Z = t2 + D
Isn't that, exactly, the source of the problem?
If the language really makes no statement about the required ordering
then the 'obvious' parse form is very bad because invented temporaries
t1, t2 doencode an ordering and the 3-address code is the big problem.
How committed must one be to 3-address representations at this
level?
Having, for my sins, once done work with Occam, I'd be inclined
to suggest that we need both:
- a way to record that A, B, C, D can be computed in parallel
- we want to sum the vector [A,B,C,D] in any order
I'd also be interested to know whether there is a desire or
intent to do common sub expression optimisations at
this level close to source?
James
More information about the Gcc
mailing list