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: Why does GCJ generate so many explicit checks for null pointers?


Jeff Sturm writes:
 > On Mon, 28 Jul 2003, David Daney wrote:
 > > Why check before the constructor call?  Is it ever possible for
 > > _Jv_AllocObjectNoFinalizer to return null?
 > 
 > No, but the backend optimizers don't know that, or else DCE would
 > eliminate the test.

 > Currently only a few java-specific optimizations are done by gcj.

Null pointer check elimination isn't really Java specific.  

The plan is to do this optimization in tree-SSA.  With that framework
it isn't very difficult.

Andrew.


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