changeset 22454:2f6d931cd4be

TraceRA: no more need to replace remaining ShadowedRegisterValues.
author Josef Eisl <josef.eisl@jku.at>
date Thu, 13 Aug 2015 13:30:27 +0200
parents 9149dd8d7343
children ec2a1d0000dd
files graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/trace/TraceRegisterAllocationPhase.java
diffstat 1 files changed, 0 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/trace/TraceRegisterAllocationPhase.java	Thu Aug 13 13:28:35 2015 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/trace/TraceRegisterAllocationPhase.java	Thu Aug 13 13:30:27 2015 +0200
@@ -28,7 +28,6 @@
 import java.util.*;
 
 import jdk.internal.jvmci.code.*;
-import jdk.internal.jvmci.meta.*;
 import jdk.internal.jvmci.options.*;
 
 import com.oracle.graal.compiler.common.alloc.*;
@@ -37,7 +36,6 @@
 import com.oracle.graal.debug.*;
 import com.oracle.graal.debug.Debug.Scope;
 import com.oracle.graal.lir.*;
-import com.oracle.graal.lir.LIRInstruction.*;
 import com.oracle.graal.lir.StandardOp.MoveOp;
 import com.oracle.graal.lir.gen.*;
 import com.oracle.graal.lir.gen.LIRGeneratorTool.SpillMoveFactory;
@@ -99,17 +97,6 @@
             if (replaceStackToStackMoves(lir, spillMoveFactory)) {
                 Debug.dump(lir, "After fixing stack to stack moves");
             }
-            InstructionValueProcedure removeShadowedValuesProc = new InstructionValueProcedure() {
-                public Value doValue(LIRInstruction op, Value value, OperandMode mode, EnumSet<OperandFlag> flags) {
-                    try (Indent i = Debug.logAndIndent("Fixup operand %s", value)) {
-                        if (TraceUtil.isShadowedRegisterValue(value)) {
-                            Debug.log("Replace ShadowedRegister value %s in instruction %s with register %s", value, op, TraceUtil.asShadowedRegisterValue(value).getRegister());
-                            return TraceUtil.asShadowedRegisterValue(value).getRegister();
-                        }
-                    }
-                    return value;
-                }
-            };
             /*
              * Incoming Values are needed for the RegisterVerifier, otherwise SIGMAs/PHIs where the
              * Out and In value matches (ie. there is no resolution move) are falsely detected as
@@ -123,18 +110,6 @@
                         assert lir.getControlFlowGraph().getStartBlock().equals(block);
                     }
                     SSIUtil.removeOutgoing(lir, block);
-                    /*
-                     * BlockEndOps with real inputs (such as switch or if) might have a
-                     * ShadowedRegisterValue assigned because we can not tell if a values belongs to
-                     * the outgoing array or not. Hear we replace all remaining
-                     * ShadowedRegisterValues with the actual register. Because we only introduced
-                     * ShadowedRegisterValues for OperandMode.ALIVE there is no need to look at
-                     * other values.
-                     */
-                    LIRInstruction blockEndOp = SSIUtil.outgoingInst(lir, block);
-                    try (Indent i1 = Debug.logAndIndent("Fixup Instruction %s", blockEndOp)) {
-                        blockEndOp.forEachAlive(removeShadowedValuesProc);
-                    }
                 }
             }
         }