This is the mail archive of the java@gcc.gnu.org mailing list for the Java 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: eliminating null pointer checks on mmu-less machines


On 13 Sep 2003, Tom Tromey wrote:
> How good a job does the optimizer do at eliminating redundant checks?

The RTL optimizers do pretty well recognizing redundant scalar checks, but
lose on COMPONENT_REF.  This is already fixed on tree-ssa.

Gcj still needs to somehow tell the optimizers about methods that never
return null (_Jv_AllocObject etc.) before the null check elimination will
be very effective.

> If it doesn't do so well, then I wonder whether the VRP pass (which,
> as far as I know, still hasn't gone in) would help.

VRP ought to help with bounds checking, but null checks are currently
handled in a separate pass.

Jeff


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