changeset 17413:0a2e65e74a9c

LRSA: minor clean ups around debugInfoProcedure().
author Josef Eisl <josef.eisl@jku.at>
date Thu, 09 Oct 2014 18:10:35 +0200
parents e28f20279ec8
children abf34bd11ba3
files graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java	Mon Oct 13 09:40:35 2014 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java	Thu Oct 09 18:10:35 2014 +0200
@@ -1632,7 +1632,7 @@
      * Visits all intervals for a frame state. The frame state use this information to build the OOP
      * maps.
      */
-    void markFrameLocations(IntervalWalker iw, LIRInstruction op, LIRFrameState info) {
+    private void markFrameLocations(IntervalWalker iw, LIRInstruction op, LIRFrameState info) {
         Debug.log("creating oop map at opId %d", op.id());
 
         // walk before the current operation . intervals that start at
@@ -1693,7 +1693,13 @@
         return attributes(asRegister(operand)).isCallerSave();
     }
 
-    @SuppressWarnings("unused")
+    /**
+     * @param op
+     * @param operand
+     * @param valueMode
+     * @param flags
+     * @see InstructionValueProcedure#doValue(LIRInstruction, Value, OperandMode, EnumSet)
+     */
     private Value debugInfoProcedure(LIRInstruction op, Value operand, OperandMode valueMode, EnumSet<OperandFlag> flags) {
         int tempOpId = op.id();
         OperandMode mode = OperandMode.USE;
@@ -1736,8 +1742,6 @@
         boolean hasDead = false;
 
         InstructionValueProcedure assignProc = (op, operand, mode, flags) -> isVariable(operand) ? colorLirOperand((Variable) operand, op.id(), mode) : operand;
-        InstructionStateProcedure stateProc = (op, state) -> computeDebugInfo(iw, op, state);
-
         for (int j = 0; j < numInst; j++) {
             final LIRInstruction op = instructions.get(j);
             if (op == null) { // this can happen when spill-moves are removed in eliminateSpillMoves
@@ -1768,7 +1772,7 @@
             op.forEachOutput(assignProc);
 
             // compute reference map and debug information
-            op.forEachState(stateProc);
+            op.forEachState((inst, state) -> computeDebugInfo(iw, inst, state));
 
             // remove useless moves
             if (move != null) {