Mercurial > hg > graal-compiler
changeset 14878:d786bfc78196
IGV: repair Graal CFG only filter
author | Andreas Woess <andreas.woess@jku.at> |
---|---|
date | Fri, 28 Mar 2014 17:51:46 +0100 |
parents | fdb912b1eb7b |
children | 69375786ef70 |
files | src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/GraalCFGFilter.java |
diffstat | 1 files changed, 20 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/GraalCFGFilter.java Fri Mar 28 15:44:10 2014 +0100 +++ b/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/GraalCFGFilter.java Fri Mar 28 17:51:46 2014 +0100 @@ -29,11 +29,12 @@ import com.sun.hotspot.igv.graph.Diagram; import com.sun.hotspot.igv.graph.Figure; import com.sun.hotspot.igv.graph.InputSlot; +import com.sun.hotspot.igv.graph.OutputSlot; import java.util.HashSet; import java.util.Set; public class GraalCFGFilter extends AbstractFilter { - + @Override public String getName() { return "Graal CFG Filter"; @@ -41,16 +42,8 @@ @Override public void apply(Diagram d) { - Set<Figure> figuresToRemove = new HashSet<>(); Set<Connection> connectionsToRemove = new HashSet<>(); - 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; @@ -72,10 +65,25 @@ } } } - + for (Connection c : connectionsToRemove) { c.remove(); - System.out.println("rm " + c); } + + Set<Figure> figuresToRemove = new HashSet<>(); + next: for (Figure f : d.getFigures()) { + for (InputSlot is : f.getInputSlots()) { + if (!is.getConnections().isEmpty()) { + continue next; + } + } + for (OutputSlot os : f.getOutputSlots()) { + if (!os.getConnections().isEmpty()) { + continue next; + } + } + figuresToRemove.add(f); + } + d.removeAllFigures(figuresToRemove); } }