Safepoints at backward branches in c2

Gary Benson gbenson at redhat.com
Tue May 13 00:53:33 PDT 2008


Jonathan Springer wrote:
> Gary Benson wrote:

> > I've been looking through the c2 code and I noticed that safepoint
> > checks are inserted before backward branches but not forward
> > branches.  Why is this?
> 
> I believe that safepoints should be executed within a bounded amount
> of computation.  Placing them at all backwards branches (and calls)
> guarantees that there are no loops without at least one safepoint.

Interesting.  Where should the safepoints be in calls?  I know the
C++ interpreter puts one before every return, but is there somewhere
else I should be putting one too?

Cheers,
Gary

-- 
http://gbenson.net/



More information about the hotspot-compiler-dev mailing list