Mercurial > hg > graal-compiler
changeset 3148:a32be743f046
Delete framestate along with statesplit nodes if the framestate is not re-used somewhere
author | Gilles Duboscq <gilles.duboscq@oracle.com> |
---|---|
date | Tue, 05 Jul 2011 11:39:40 +0200 |
parents | 33794640fc14 |
children | 03aca60eb99f |
files | graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/StateSplit.java graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/DeadCodeEliminationPhase.java src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/StandardGroupOrganizer.java |
diffstat | 3 files changed, 14 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/StateSplit.java Mon Jul 04 17:44:07 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/StateSplit.java Tue Jul 05 11:39:40 2011 +0200 @@ -76,6 +76,17 @@ } @Override + public void delete() { + FrameState stateAfter = stateAfter(); + super.delete(); + if (stateAfter != null) { + if (stateAfter.usages().isEmpty()) { + stateAfter.delete(); + } + } + } + + @Override public Iterable< ? extends Node> dataInputs() { final Iterator< ? extends Node> dataInputs = super.dataInputs().iterator(); return new Iterable<Node>() {
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/DeadCodeEliminationPhase.java Mon Jul 04 17:44:07 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/DeadCodeEliminationPhase.java Tue Jul 05 11:39:40 2011 +0200 @@ -150,10 +150,10 @@ if (node.predecessors().size() > 0) { for (Node pred : node.predecessors()) { TTY.println("!PRED! " + pred + " (" + flood.isMarked(pred) + ")"); - for (int i=0; i<pred.successors().size(); i++) { + for (int i = 0; i < pred.successors().size(); i++) { TTY.println("pred=>succ: " + pred.successors().get(i)); } - for (int i=0; i<pred.usages().size(); i++) { + for (int i = 0; i < pred.usages().size(); i++) { TTY.println("pred=>usage: " + pred.usages().get(i)); } }
--- a/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/StandardGroupOrganizer.java Mon Jul 04 17:44:07 2011 +0200 +++ b/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/StandardGroupOrganizer.java Tue Jul 05 11:39:40 2011 +0200 @@ -50,7 +50,7 @@ for (Group g : groups) { List<Group> children = new ArrayList<Group>(); children.add(g); - if(g.getGraphs().size() == 1) { + if(false && g.getGraphs().size() == 1) { //g.getGraphs().get(0).setName(g.getName() + " / " + g.getGraphs().get(0).getName()); result.add(new Pair<String, List<Group>>("", children)); } else {