public FusionInfo getFusionInfo(int from, int to) {   if (fusion_info[from][to] != null) return fusion_info[from][to];  int work = 0; int work_no_penalty = 0; int code = 0; int data = 0;  int mult[] = new int[cont.size()]; mult[from] = 1;  for (int i = from; i < to; i++) { int push = childConfig(i).getFusionInfo().getPushInt(); int pop = childConfig(i+1).getFusionInfo().getPopInt(); int m = (push * pop) / gcd(push,pop); int xtra = (m / push) / gcd(mult[i], (m / push));  for (int a = from; a <= i; a++) { mult[a] = mult[a] * xtra; } mult[i+1] = (m / pop); }  for (int i = from; i <= to; i++) { CConfig child = childConfig(i);  FusionInfo fi = child.getFusionInfo(); work += fi.getWorkEstimate(); work_no_penalty += fi.getWorkEstimateNoPenalty();  code += fi.getCodeSize() * mult[i]; data += fi.getDataSize();      if (KjcOptions.unroll < mult[i]) work += fi.getWorkEstimate()/2;    }  int to_push = childConfig(to).getFusionInfo().getPushInt(); int from_pop = childConfig(from).getFusionInfo().getPopInt(); int from_peek = childConfig(from).getFusionInfo().getPeekInt();  fusion_info[from][to] = new FusionInfo(work, work_no_penalty, code, data, from_pop * mult[from], from_pop * mult[from] + (from_peek - from_pop), to_push * mult[to], childConfig(from).getFusionInfo().getInputSize(), childConfig(to).getFusionInfo().getOutputSize());  return fusion_info[from][to];
public FusionInfo getFusionInfo() { return getFusionInfo(0, cont.size() - 1);
    public FusionInfo getFusionInfo(int from, int to) {	// check if we have precomputed	if (fusion_info[from][to] != null) return fusion_info[from][to];	int work = 0;	int work_no_penalty = 0;	int code = 0;	int data = 0;	int mult[] = new int[cont.size()];	mult[from] = 1; // init mult. of first item to 1	for (int i = from; i < to; i++) {	    int push = childConfig(i).getFusionInfo().getPushInt();	    int pop = childConfig(i+1).getFusionInfo().getPopInt();	    int m = (push * pop) / gcd(push,pop);	    int xtra = (m / push) / gcd(mult[i], (m / push)); 	    for (int a = from; a <= i; a++) {		mult[a] = mult[a] * xtra; 	    }	    mult[i+1] = (m / pop);	}	for (int i = from; i <= to; i++) {	    CConfig child = childConfig(i);	    FusionInfo fi = child.getFusionInfo();	    work += fi.getWorkEstimate();	    work_no_penalty += fi.getWorkEstimateNoPenalty();	    code += fi.getCodeSize() * mult[i];	    data += fi.getDataSize();// * mult[i]; // removed Nov-15-2004	    // removed Nov-15-2004	    //if (i < to) data += fi.getOutputSize() * fi.getPushInt() * mult[i] * 2;	    // add impossible unroll penalty	    if (KjcOptions.unroll < mult[i]) work += fi.getWorkEstimate()/2;	    // add fusion peek overhead	    /*	    if (i > from && child instanceof CConfigFilter) {		CConfigFilter fc = (CConfigFilter)child;		SIRFilter filter = (SIRFilter)fc.getStream();		if (filter.getPeekInt() > filter.getPopInt()) {		    work += fi.getWorkEstimate()/2;		}	    }	    */	}	int to_push = childConfig(to).getFusionInfo().getPushInt();	int from_pop = childConfig(from).getFusionInfo().getPopInt();	int from_peek = childConfig(from).getFusionInfo().getPeekInt();		fusion_info[from][to] = 	    new FusionInfo(work, work_no_penalty, code, data, 			   from_pop * mult[from],			   from_pop * mult[from] + (from_peek - from_pop),			   to_push * mult[to],			   childConfig(from).getFusionInfo().getInputSize(),			   childConfig(to).getFusionInfo().getOutputSize());	return fusion_info[from][to];    }