destroysCallerSavedRegisters and register reference map in DebugInfo

Doug Simon doug.simon at oracle.com
Tue Jul 23 00:44:40 PDT 2013


On Jul 23, 2013, at 6:07 AM, Christian Thalinger <christian.thalinger at oracle.com> wrote:

> Quick question about this code in LinearScan:
> 
>    private void computeDebugInfo(IntervalWalker iw, final LIRInstruction op, LIRFrameState info) {
>        BitSet registerRefMap = op.destroysCallerSavedRegisters() ? null : frameMap.initRegisterRefMap();
>        BitSet frameRefMap = frameMap.initFrameRefMap();
>        computeOopMap(iw, op, registerRefMap, frameRefMap);
> 
> Why are we not creating a register reference map if we destroy caller saved registers?

Because all live registers will be spilled around the call and so there are no live values in registers during the call.

>  I'm having trouble with this logic on SPARC because computeOopMap wants to store a register in the map (a local register).

Wouldn't we just ensure that op.destroysCallerSavedRegisters() returns false for all SPARC ops (given that local registers are never killed by a callee)? 

> Would there be a downside if we always would create and empty map and just pass it on except a little bit of overhead?  Or am I missing something here?

This should be easy to measure - remove the ternary and measure the difference in compilation time.

-Doug


More information about the graal-dev mailing list