question about bci in LIRFrameState for DeoptimizeOp

Deneau, Tom tom.deneau at amd.com
Wed Nov 20 12:17:39 PST 2013


I was looking at the AMD64DeoptimizeOp.emitCode routine which is
        AMD64Call.directCall(tasm, masm, tasm.foreignCalls.lookupForeignCall(UNCOMMON_TRAP), null, false, info);

When I look at the LIRFrameState info which is passed to UNCOMMON_TRAP, the bci always seems to be 0.
Why is that?

For example, compiling this small snippet thru AMD64 backend
    public int intFromArray(int[] ary, int idx) {
        return ary[idx];
    }

with bytecodes
  public int intFromArray(int[], int);
    Code:
       0: aload_1       
       1: iload_2       
       2: iaload        
       3: ireturn       

when I get to AMD64DeoptimizeOp.emitCode, I see
info = "at com.oracle.graal.compiler.test.BasicTest2.intFromArray(BasicTest2.java:46) [bci: 0]
            |0  |1     |2    
   locals:  |-  |v0|a  |v1|i "

I would have expected the bci in this case to be 2, referring to the iaload instruction.

-- Tom




More information about the graal-dev mailing list