destroysCallerSavedRegisters and register reference map in DebugInfo

Christian Thalinger christian.thalinger at oracle.com
Tue Jul 23 08:50:32 PDT 2013


On Jul 23, 2013, at 12:44 AM, Doug Simon <doug.simon at oracle.com> wrote:

> 
> 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.

That's what I thought but I wanted to make sure.

> 
>> 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)? 

We can do this (I actually tried this already).  Would this be the right way to it?

-- Chris

> 
>> 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