This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Reassociation
- To: tprince at cat dot e-mail dot com
- Subject: Re: Reassociation
- From: Jeffrey A Law <law at hurl dot cygnus dot com>
- Date: Wed, 16 Dec 1998 21:06:48 -0700
- cc: bosch at gnat dot com, burley at gnu dot org, egcs at cygnus dot com, hjstein at bfr dot co dot il, jbuck at Synopsys dot COM, moshier at mediaone dot net
- Reply-To: law at cygnus dot com
In message <4.19981216.22.37.12.633453@cat.e-mail.com>you write:
> Therefore, we should make the *back end* work properly in a language-
> independent sense. If people want the gcc to produce slower code than
> g77, that's okay -- they can have gcc explicitly group the operations for
> consumption by the back end, something Fortran doesn't generally need to
> do.
GCC's backend is supposed to be language independent. Before implementing
any of the optimizations I mentioned we've have to have a reasonable way to
describe in the tree structures what reassociations are permitted and which
are not.
The obvious way to do that in this case is:
* Introduce the concept of parens into the tree nodes for
expressions.
* Honor parens and perform no associations across them.
* If a language does not allow reassociations, then it can make the
implicit parents explicit in the tree structure.