# HG changeset patch # User Matthias Grimmer # Date 1387274238 -3600 # Node ID 5a7508f1a7ffbca5c4d5176a81e6af64cd77a18a # Parent 0e5c4f9fa9a5a434868b94047287818ce305dabb Fix LIR assertion (distance between an operation with an exception edge and the last introduction of a LIR block) diff -r 0e5c4f9fa9a5 -r 5a7508f1a7ff graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIR.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIR.java Mon Dec 16 23:33:40 2013 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIR.java Tue Dec 17 10:57:18 2013 +0100 @@ -166,15 +166,15 @@ /** * The maximum distance an operation with an {@linkplain #getExceptionEdge(LIRInstruction) - * exception edge} can be from the last instruction of a LIR block. The value of 2 is based on a - * non-void call operation that has an exception edge. Such a call op will have a move op after - * it to put the return value into the result variable. + * exception edge} can be from the last instruction of a LIR block. The value of 3 is based on a + * non-void call operation that has an exception edge. Such a call may move the result to + * another register and then spill it. *

* The rationale for such a constant is to limit the search for an insertion point when adding * move operations at the end of a block. Such moves must be inserted before all control flow * instructions. */ - public static final int MAX_EXCEPTION_EDGE_OP_DISTANCE_FROM_END = 2; + public static final int MAX_EXCEPTION_EDGE_OP_DISTANCE_FROM_END = 3; public static boolean verifyBlock(LIR lir, Block block) { List ops = lir.lir(block);