This is the mail archive of the 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: [RFC] Contributing tree-ssa to mainline

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.


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