JIntLiteral(filter.getPeekInt() - 1));
JIntLiteral(filter.getPeekInt() - filter.getPopInt()  - 1  ));
    private static List makeFilterInfo(List filterList) {	// make the result	List result = new LinkedList();	// construct a schedule for <filterList>	Schedule schedule = getSchedule(filterList);	// get the schedules	List initSched = schedule.getInitSchedule();	List steadySched = schedule.getSteadySchedule();	// DEBUGGING OUTPUT	SIRScheduler.printSchedule(initSched, "initialization");	SIRScheduler.printSchedule(steadySched, "steady state");	// for each filter...	ListIterator it = filterList.listIterator();	for (int i=0; it.hasNext(); i++) {	    // the filter	    SIRFilter filter = (SIRFilter)it.next();	    // the peek buffer	    JVariableDefinition peekBufferVar = 		new JVariableDefinition(null,					at.dms.kjc.Constants.ACC_FINAL,					new CArrayType(voidToInt(filter.						       getInputType()), 						       1 /* dimension */ ),					PEEK_BUFFER_NAME + "_" + i,					null);	    JFieldDeclaration peekBuffer = new JFieldDeclaration(null,								 peekBufferVar,								 null,								 null);	    	    // number of executions (num[0] is init, num[1] is steady)	    int[] num = new int[2];	    // for now, guard against empty/incomplete schedules	    // by assuming a count of zero.  Talk to Michal about	    // have entries of zero-weight in schedule?  FIXME.	    if (initSched.size()>i) {		num[0] = ((SchedRepSchedule)initSched.get(i)).		    getTotalExecutions().intValue();	    } else {		num[0] = 0;	    }	    // do the same for the steady schedule	    if (steadySched.size()>i) {		num[1] = ((SchedRepSchedule)steadySched.get(i)).		    getTotalExecutions().intValue();	    } else {		num[1] = 0;	    }	    	    // get ready to make rest of phase-specific info	    JVariableDefinition popBuffer[] = new JVariableDefinition[2];	    JVariableDefinition popCounter[] = new JVariableDefinition[2];	    JVariableDefinition pushCounter[] = new JVariableDefinition[2];	    JVariableDefinition loopCounter[] = new JVariableDefinition[2];	    	    for (int j=0; j<2; j++) {		// the pop buffer		popBuffer[j] = makePopBuffer(filter, num[j], i);		// the pop counter.		popCounter[j] = 		    new JVariableDefinition(null, 0, CStdType.Integer,					    POP_INDEX_NAME + "_" + j + "_" + i,					    new					    JIntLiteral(filter.getPeekInt()							- 1));	    		// the push counter.  In the steady state, the initial		// value of the push counter is the first slot after		// the peek values are restored, which is peek-pop.		// In the inital work function, the push counter		// starts at zero.		int pushInit = 		    j==0 ? 0 : filter.getPeekInt() - filter.getPopInt();		pushCounter[j] = 		    new JVariableDefinition(null, 0, CStdType.Integer,					    PUSH_INDEX_NAME + "_" + j + "_" +i,					    new JIntLiteral(pushInit));		// the exec counter		loopCounter[j] = 		    new JVariableDefinition(null, 0, CStdType.Integer,					    COUNTER_NAME + "_" + j + "_" +i,					    null);	    }	    // add a filter info to <result>	    result.add(new 		       FilterInfo(filter, peekBuffer, 				  new PhaseInfo(num[0], 						popBuffer[0], 						popCounter[0], 						pushCounter[0],						loopCounter[0]),				  new PhaseInfo(num[1], 						popBuffer[1],						popCounter[1], 						pushCounter[1],						loopCounter[1])				  ));	}	// return result	return result;    }