destroysCallerSavedRegisters and register reference map in DebugInfo

Christian Thalinger christian.thalinger at
Mon Jul 22 21:07:24 PDT 2013

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?  I'm having trouble with this logic on SPARC because computeOopMap wants to store a register in the map (a local register).

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?

-- Chris

More information about the graal-dev mailing list