System.out.println(" ****  CALLING SETTOPLEVELSIR **** ");  topLevelSIR = newTop;  StreamItDot.printGraph(topLevelSIR, SpaceDynamicBackend.makeDotFileName("setTLSIR", topLevelSIR));   Iterator fns = flatNodes.iterator(); while (fns.hasNext()) { streamGraph.parentMap.remove(fns.next()); }  graphFlattener = new GraphFlattener(topLevelSIR); topLevel = graphFlattener.top;  setBottomLevel();  updateIOArrays();  updateSSGEdges(); flatNodes = new LinkedList();  topLevel.accept(new FlatVisitor() { public void visitNode(FlatNode node) { flatNodes.add(node); } }, null, true);
System.out.println(" ****  CALLING SETTOPLEVELSIR **** ");
    public void setTopLevelSIR(SIRStream newTop)     {	//can only call this before layout!!	assert streamGraph.getLayout() == null;	System.out.println(" ****  CALLING SETTOPLEVELSIR **** ");		topLevelSIR = newTop;	//dump the graph	StreamItDot.printGraph(topLevelSIR, 			      SpaceDynamicBackend.makeDotFileName("setTLSIR", topLevelSIR));     	//remove the old nodes from the global parent map	Iterator fns = flatNodes.iterator();	while (fns.hasNext()) {	    streamGraph.parentMap.remove(fns.next());	}	//flatten the graph	graphFlattener = new GraphFlattener(topLevelSIR);	topLevel = graphFlattener.top;	//reset bottom level, the sink of this SSG	setBottomLevel();	//update inputs[] and outputs[] to point to the new flatnodes	updateIOArrays();	//update the inter-SSG connections to reference the new flatnodes	updateSSGEdges();	flatNodes = new LinkedList();	//update the flatnodes of this SSG list	topLevel.accept(new FlatVisitor() {		public void visitNode(FlatNode node) 		{		    flatNodes.add(node);		}	    }, null, true);	//update the global parent map	fns = flatNodes.iterator();	while (fns.hasNext()) {	    streamGraph.parentMap.put(fns.next(), this);	}	    }