Mercurial > hg > graal-jvmci-8
changeset 3652:aac12c75f805
Merge.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Wed, 16 Nov 2011 23:35:10 +0100 |
parents | a31028282e3e (current diff) 441d68905702 (diff) |
children | 6aef50c6d967 |
files | |
diffstat | 1 files changed, 15 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/GraalCFGFilter.java Wed Nov 16 23:35:03 2011 +0100 +++ b/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/GraalCFGFilter.java Wed Nov 16 23:35:10 2011 +0100 @@ -41,28 +41,34 @@ } public void apply(Diagram d) { - List<Figure> figures = d.getFigures(); Set<Figure> figuresToRemove = new HashSet<Figure>(); Set<Connection> connectionsToRemove = new HashSet<Connection>(); - for (Figure f : figures) { - Properties p = f.getProperties(); - final String prop = p.get("probability"); + for (Figure f : d.getFigures()) { + final String prop = f.getProperties().get("probability"); if (prop == null) { figuresToRemove.add(f); } - + } + d.removeAllFigures(figuresToRemove); + + for (Figure f : d.getFigures()) { + Properties p = f.getProperties(); int predCount = Integer.parseInt(p.get("predecessorCount")); for (InputSlot is : f.getInputSlots()) { - Color color; - if (is.getPosition() >= predCount) { - connectionsToRemove.addAll(is.getConnections()); + if (is.getPosition() >= predCount && !"EndNode".equals(is.getProperties().get("class"))) { + for (Connection c : is.getConnections()) { + if (!"EndNode".equals(c.getOutputSlot().getFigure().getProperties().get("class"))) { + connectionsToRemove.add(c); + } + } } } } - d.removeAllFigures(figuresToRemove); + for (Connection c : connectionsToRemove) { c.remove(); + System.out.println("rm " + c); } } }