This is the mail archive of the
mailing list for the GCC project.
Re: [RFC] Contributing tree-ssa to mainline
- From: Andrew Haley <aph at redhat dot com>
- To: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Cc: hubicka at ucw dot cz, gcc at gcc dot gnu dot org
- Date: Mon, 19 Jan 2004 12:38:34 +0000
- Subject: Re: [RFC] Contributing tree-ssa to mainline
- References: <10401191226.AA27734@vlsi1.ultra.nyu.edu>
Richard Kenner writes:
> A case I know about in Ada is check elimination. Because the
> default for Ada is enabling checking, it's quite important to
> eliminate checks that can be proven not to fail. Theoretically, a
> lot this could be language-independent optimizers by value range
> propagation and related optimizations. But the front-end can do a
> much better job because it has information only it knows.
> Moreover, by suppressing the check before generating any code for
> it, compilation time is reduced. I think this is clearly the
> proper place for that optimization.
I would reject this approach on the grounds of parsimony: Java needs
to generate (and remove) these checks as well, and if we do
optimization in the front end we'll have multiple optimizers
essentially doing the same thing, probably using the same algorithms.
We'll have separate implementations of the same algorithms -- with
disjoint sets of errors.
On the other hand, if Ada can really do the job of its check
elimination so much better than a generic optimizer, fair enough. But
range check elimination using VRP is a sufficiently generic problem
that many languages will benefit.
And of course there are other things: escape analysis, for example.
Sure, I could do that in the Java front end, but I'd rather not.