if (node.contents instanceof SIRTwoStageFilter) { JMethodDeclaration init_work = ((SIRTwoStageFilter)node.contents).getInitWork(); if (((SIRFilter)node.contents).getMethods()[i].equals(init_work)) { continue; } }
    public static void generateCode(FlatNode node)     {	FlatIRToCluster toC = new FlatIRToCluster((SIRFilter)node.contents);	//FieldInitMover.moveStreamInitialAssignments((SIRFilter)node.contents);	//FieldProp.doPropagate((SIRFilter)node.contents);	//Optimizations	if(!KjcOptions.nofieldprop)	    System.out.println		("Optimizing "+		 ((SIRFilter)node.contents).getName()+"...");		Set destroyed_vars = new HashSet();	//ArrayDestroyer arrayDest=new ArrayDestroyer();	for (int i = 0; i < ((SIRFilter)node.contents).getMethods().length; i++) {	    // do not optimize init work function	    //if (node.contents instanceof SIRTwoStageFilter) {	    //	JMethodDeclaration init_work = ((SIRTwoStageFilter)node.contents).getInitWork();	    //	if (((SIRFilter)node.contents).getMethods()[i].equals(init_work)) {	    //	    continue;	    //	}	    //}	    if (!KjcOptions.nofieldprop) {				Unroller unroller;		do {		    do {			//System.out.println("Unrolling..");			unroller = new Unroller(new Hashtable());			((SIRFilter)node.contents).getMethods()[i].accept(unroller);		    } while(unroller.hasUnrolled());		    //System.out.println("Constant Propagating..");		    ((SIRFilter)node.contents).getMethods()[i].accept(new Propagator(new Hashtable()));		    //System.out.println("Unrolling..");		    unroller = new Unroller(new Hashtable());		    ((SIRFilter)node.contents).getMethods()[i].accept(unroller);		} while(unroller.hasUnrolled());		//System.out.println("Flattening..");		((SIRFilter)node.contents).getMethods()[i].accept(new BlockFlattener());		//System.out.println("Analyzing Branches..");		//((SIRFilter)node.contents).getMethods()[i].accept(new BranchAnalyzer());		//System.out.println("Constant Propagating..");		((SIRFilter)node.contents).getMethods()[i].accept(new Propagator(new Hashtable()));	    } else		((SIRFilter)node.contents).getMethods()[i].accept(new BlockFlattener());	    if (KjcOptions.destroyfieldarray) {		ArrayDestroyer arrayDest = new ArrayDestroyer();		((SIRFilter)node.contents).getMethods()[i].accept(arrayDest);		arrayDest.addDestroyedLocals(destroyed_vars);	    }	    ((SIRFilter)node.contents).getMethods()[i].accept(new VarDeclRaiser());	}	//if(KjcOptions.destroyfieldarray) {	//   arrayDest.destroyFieldArrays((SIRFilter)node.contents);	//}	DeadCodeElimination.doit((SIRFilter)node.contents);	if (KjcOptions.rename2 && KjcOptions.destroyfieldarray) {	    RenameDestroyedVars.renameDestroyedVars((SIRFilter)node.contents, destroyed_vars);	    DeadCodeElimination.doit((SIRFilter)node.contents);	}        IterFactory.createFactory().createIter((SIRFilter)node.contents).accept(toC);    }