Flattener.doLinearAnalysis(str);
    public static void run(SIRStream str,			   JInterfaceDeclaration[] 			   interfaces,			   SIRInterfaceTable[]			   interfaceTables,			   SIRStructure[]			   structs) {	System.out.println("Entry to RAW Backend");	structures = structs;		createStructuresIncludeFile(structures);	// set number of columns/rows	RawBackend.rawColumns = KjcOptions.raw;	RawBackend.rawRows = KjcOptions.raw;	//	if (KjcOptions.ratematch)	//    simulator = new RateMatchSim();	//else 	simulator = new FineGrainSimulator();	//this must be run now, FlatIRToC relies on it!!!	RenameAll.renameAllFilters(str);		// move field initializations into init function	System.out.print("Moving initializers into init functions... ");	FieldInitMover.moveStreamInitialAssignments(str);	System.out.println("done.");		// propagate constants and unroll loop	System.out.println("Running Constant Prop and Unroll...");	ConstantProp.propagateAndUnroll(str);	System.out.println("Done Constant Prop and Unroll...");	// construct stream hierarchy from SIRInitStatements	ConstructSIRTree.doit(str);	//SIRPrinter printer1 = new SIRPrinter();	//str.accept(printer1);	//printer1.close();	//VarDecl Raise to move array assignments up	new VarDeclRaiser().raiseVars(str);        // do constant propagation on fields        if (KjcOptions.nofieldprop) {	} else {	    System.out.println("Running Constant Field Propagation...");	    FieldProp.doPropagate(str);	    System.out.println("Done Constant Field Propagation...");	    //System.out.println("Analyzing Branches..");	    //new BlockFlattener().flattenBlocks(str);	    //new BranchAnalyzer().analyzeBranches(str);	}	StreamItDot.printGraph(str, "before.dot");	AdjustGranularity.doit(str, 			       RawBackend.rawRows * 			       RawBackend.rawColumns);	if (KjcOptions.fusion) {	    System.out.println("Running FuseAll...");	    FuseAll.fuse(str);	    System.out.println("Done FuseAll...");	}	if (KjcOptions.partition || KjcOptions.ilppartition || KjcOptions.dppartition) {	    Partitioner.doit(str,			     RawBackend.rawRows *			     RawBackend.rawColumns);	}	if (KjcOptions.sjtopipe) {	    SJToPipe.doit(str);	}	StreamItDot.printGraph(str, "after.dot");	//VarDecl Raise to move array assignments up	new VarDeclRaiser().raiseVars(str);		//VarDecl Raise to move peek index up so	//constant prop propagates the peek buffer index	new VarDeclRaiser().raiseVars(str);       	System.out.println("Flattener Begin...");	executionCounts = SIRScheduler.getExecutionCounts(str);	PartitionDot.printScheduleGraph(str, "schedule.dot", executionCounts);	RawFlattener rawFlattener = new RawFlattener(str);	rawFlattener.dumpGraph("flatgraph.dot");	System.out.println("Flattener End.");	//create the execution counts for other passes	createExecutionCounts(str, rawFlattener);	//see if we can remove any joiners	//JoinerRemoval.run(rawFlattener.top);	// layout the components (assign filters to tiles)		Layout.simAnnealAssign(rawFlattener.top);	//Layout.handAssign(rawFlattener.top);		//Layout.handAssign(rawFlattener.top);	System.out.println("Assign End.");	//Generate the switch code		CalcBufferSize.createBufferSizePow2(rawFlattener.top);	if (KjcOptions.magic_net) {	    MagicNetworkSchedule.generateSchedules(rawFlattener.top);	}	else {	    System.out.println("Switch Code Begin...");	    SwitchCode.generate(rawFlattener.top);	    System.out.println("Switch Code End.");	}		//Generate number gathering simulator code	if (KjcOptions.numbers > 0) {	    SinkUnroller.doit(rawFlattener.top);	    if (!NumberGathering.doit(rawFlattener.top)) {		System.err.println("Could not generate number gathering code.  Exiting...");		System.exit(1);	    }	}		//remove print statements in the original app	//if we are running with decoupled	if (KjcOptions.decoupled)	    RemovePrintStatements.doIt(rawFlattener.top);		//Generate the tile code	RawExecutionCode.doit(rawFlattener.top);	if (KjcOptions.removeglobals) {	    RemoveGlobals.doit(rawFlattener.top);	}			System.out.println("Tile Code begin...");	TileCode.generateCode(rawFlattener.top);	System.out.println("Tile Code End.");	//generate the makefiles	System.out.println("Creating Makefile.");	MakefileGenerator.createMakefile();	System.out.println("Exiting");	System.exit(0);    }