FlatIRToC toC = new FlatIRToC((SIRFilter)node.contents);
SIRFilter str = (SIRFilter)node.contents;    RemoveMultiPops.doit(str);  FlatIRToC toC = new FlatIRToC(str);
    public static void generateCode(StaticStreamGraph SSG, FlatNode node)    {        assert Layout.assignToATile(node);        FlatIRToC toC = new FlatIRToC((SIRFilter)node.contents);        toC.flatNode = node;        toC.ssg = SSG;        toC.layout = SSG.getStreamGraph().getLayout();        toC.dynamicOutput = toC.ssg.isOutput(node);        toC.dynamicInput = toC.ssg.isInput(node);            //FieldInitMover.moveStreamInitialAssignments((SIRFilter)node.contents);        //FieldProp.doPropagate((SIRFilter)node.contents);        //Optimizations                        if(!KjcOptions.nofieldprop)            System.out.println                ("Optimizing "+                 ((SIRFilter)node.contents).getName()+"...");        ArrayDestroyer arrayDest=new ArrayDestroyer();        for (int i = 0; i < ((SIRFilter)node.contents).getMethods().length; i++) {            JMethodDeclaration method=((SIRFilter)node.contents).getMethods()[i];                        if(!(method.getName().startsWith("work")||method.getName().startsWith("initWork"))) {                 //Already in __RAWMAIN__                if (!KjcOptions.nofieldprop) {                    Unroller unroller;                    do {                        do {                            //System.out.println("Unrolling..");                            unroller = new Unroller(new Hashtable());                            method.accept(unroller);                        } while(unroller.hasUnrolled());                        //System.out.println("Constant Propagating..");                        method.accept(new Propagator(new Hashtable()));                        //System.out.println("Unrolling..");                        unroller = new Unroller(new Hashtable());                        method.accept(unroller);                    } while(unroller.hasUnrolled());                    //System.out.println("Flattening..");                    method.accept(new BlockFlattener());                    //System.out.println("Analyzing Branches..");                    //method.accept(new BranchAnalyzer());                    //System.out.println("Constant Propagating..");                    method.accept(new Propagator(new Hashtable()));                } else                    method.accept(new BlockFlattener());                method.accept(arrayDest);                method.accept(new VarDeclRaiser());            }        }        if(KjcOptions.destroyfieldarray)           arrayDest.destroyFieldArrays((SIRFilter)node.contents);           /*             try {            SIRPrinter printer1 = new SIRPrinter();            IterFactory.createFactory().createIter((SIRFilter)node.contents).accept(printer1);            printer1.close();        }        catch (Exception e)             {            }        */        //      RemoveUnusedVars.doit(node);                //remove dead code               DeadCodeElimination.doit((SIRFilter)node.contents);        //convert pop() statements that aren't assigned to anything to be         //assigned to a dummy variable        ConvertLonelyReceives.doit(toC.ssg, toC.flatNode);        /*        SIRPrinter printer1 = new SIRPrinter("sir" + node + ".out");        IterFactory.createFactory().createIter(node.getFilter()).accept(printer1);        printer1.close();        */        IterFactory.createFactory().createIter((SIRFilter)node.contents).accept(toC);    }