# HG changeset patch # User Lukas Stadler # Date 1354013473 -3600 # Node ID 742ec0f0455993bd24bb99bdef0af7dabfe38ca3 # Parent 52c88c405d07989572ece4207bfb2bdc0ccdc43c PEA: remove shouldRevirtualize logic diff -r 52c88c405d07 -r 742ec0f04559 graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/nodes/MaterializeObjectNode.java --- a/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/nodes/MaterializeObjectNode.java Mon Nov 26 19:30:54 2012 -0800 +++ b/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/nodes/MaterializeObjectNode.java Tue Nov 27 11:51:13 2012 +0100 @@ -102,46 +102,6 @@ @Override public ObjectDesc[] getAllocations(long nextVirtualId, MetaAccessProvider metaAccess) { - if (shouldRevirtualize(this)) { - return new ObjectDesc[] {new ObjectDesc(virtualObject, values.toArray(new ValueNode[values.size()]), lockCount)}; - } - return null; - } - - private boolean shouldRevirtualize(MaterializeObjectNode materializeObjectNode) { - FixedWithNextNode end = materializeObjectNode; - do { - Node next = end.next(); - if (next instanceof MaterializeObjectNode) { - if (!shouldRevirtualize((MaterializeObjectNode) next)) { - return false; - } - end = (FixedWithNextNode) next; - } else if (next instanceof CyclicMaterializeStoreNode) { - end = (FixedWithNextNode) next; - } else { - break; - } - } while (true); - FixedNode suffix = end.next(); - if (suffix instanceof EndNode) { - for (PhiNode phi : ((EndNode) suffix).merge().phis()) { - int materialized = 0; - boolean used = false; - for (Node input : phi.inputs()) { - if (input instanceof MaterializeObjectNode) { - materialized++; - } - if (input == materializeObjectNode) { - used = true; - } - } - if (used && materialized != phi.valueCount()) { - return false; - } - } - } - - return true; + return new ObjectDesc[] {new ObjectDesc(virtualObject, values.toArray(new ValueNode[values.size()]), lockCount)}; } }