diff graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java @ 2532:3fca504f28ba

Reinsert phi simplifier (does not seem to be optional). Disabled canonicalizer.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 27 Apr 2011 19:00:40 +0200
parents 58c05e4c51e2
children 4a016ff4d2df
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java	Wed Apr 27 18:17:18 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java	Wed Apr 27 19:00:40 2011 +0200
@@ -204,6 +204,8 @@
 
         this.operands = new OperandPool(compilation.target);
 
+        new PhiSimplifier(ir);
+
         // mark the liveness of all instructions if it hasn't already been done by the optimizer
         LivenessMarker livenessMarker = new LivenessMarker(ir);
         C1XMetrics.LiveHIRInstructions += livenessMarker.liveCount();
@@ -1275,7 +1277,7 @@
         if (suxVal instanceof Phi) {
             Phi phi = (Phi) suxVal;
             // curVal can be null without phi being null in conjunction with inlining
-            if (phi.isLive() && curVal != null && curVal != phi) {
+            if (phi.isLive() && !phi.isDeadPhi() && curVal != null && curVal != phi) {
                 assert curVal.isLive() : "value not live: " + curVal + ", suxVal=" + suxVal;
                 assert !phi.isIllegal() : "illegal phi cannot be marked as live";
                 if (curVal instanceof Phi) {
@@ -1349,6 +1351,7 @@
     }
 
     private CiValue operandForPhi(Phi phi) {
+        assert !phi.isDeadPhi();
         if (phi.operand().isIllegal()) {
             // allocate a variable for this phi
             CiVariable operand = newVariable(phi.kind);