RemoveDeadLoops.doit(node, toC.doloops);
RemoveDeadDoLoops.doit(node, toC.doloops);
    public static void generateCode(FlatNode node)     {	FlatIRToRS toC = new FlatIRToRS((SIRFilter)node.contents);			//optimizations...	System.out.println	    ("Optimizing SIR ...");	ArrayDestroyer arrayDest=new ArrayDestroyer();	//iterate over all the methods, calling the magic below...	for (int i = 0; i < ((SIRFilter)node.contents).getMethods().length; i++) {	    JMethodDeclaration method=((SIRFilter)node.contents).getMethods()[i];	    	    	    if (!KjcOptions.nofieldprop) {		Unroller unroller;		do {		    do {			unroller = new Unroller(new Hashtable());			method.accept(unroller);		    } while (unroller.hasUnrolled());		    		    method.accept(new Propagator(new Hashtable()));		    unroller = new Unroller(new Hashtable());		    method.accept(unroller);		} while(unroller.hasUnrolled());				method.accept(new BlockFlattener());		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) 	     {	     }	*/	//remove unused variables...	RemoveUnusedVars.doit(node);	//remove array initializers and remember them for placement later...	toC.arrayInits = new ConvertArrayInitializers(node);	//find all do loops, 	toC.doloops = IDDoLoops.doit(node);	//remove unnecessary do loops	RemoveDeadLoops.doit(node, toC.doloops);	//now iterate over all the methods and generate the c code.        IterFactory.createFactory().createIter((SIRFilter)node.contents).accept(toC);    }