int bottleneck = topConfig.get(numTiles, 0);
int bottleneck = topConfig.get(numTiles, 0).getMaxCost();
    private SIRStream calcPartitions(LinkedList partitions, boolean doTransform) {	// debug setup	long start = System.currentTimeMillis();	// build stream config	System.out.println("  Building stream config... ");	DPConfig topConfig = buildStreamConfig();	if (DPConfigContainer.aliases>0) {	    System.out.println("  Aliasing " + DPConfigContainer.aliases + " entries of memo table.");	}	// rebuild our work estimate, since we might have introduced	// identity nodes to make things rectangular	work = WorkEstimate.getWorkEstimate(str);	// build up tables.	System.out.println("  Calculating partition info...");	int bottleneck = topConfig.get(numTiles, 0);	int tilesUsed = numTiles;	// decrease the number of tiles to the fewest that we need for	// a given bottleneck.  This is in an attempt to decrease	// synchronization and improve utilization.	/*	while (tilesUsed>1 && bottleneck==topConfig.get(tilesUsed-1, 0)) {	    tilesUsed--;	}	if (tilesUsed<numTiles) {	    System.err.println("Decreased tile usage from " + numTiles + " to " + tilesUsed + " without increasing bottleneck.");	}	*/		if (KjcOptions.debug && topConfig instanceof DPConfigContainer) {	    ((DPConfigContainer)topConfig).printArray();	}	// expand config stubs that were shared for symmetry optimizations	if (SHARING_CONFIGS) {	    expandSharedConfigs();	}		// build up list of partitions 	partitions.clear();	PartitionRecord curPartition = new PartitionRecord();	partitions.add(curPartition);	System.out.println("  Tracing back...");	// first just get partitions	/*	transformOnTraceback = false;	topConfig.traceback(partitions, curPartition, tilesUsed, 0, str);	// debug output	PartitionUtil.printTileWork(partitions, numTiles);	PartitionDot.printPartitionGraph(str, "partitions.dot", PartitionRecord.asMap(partitions));	Utils.assert(partitions.size()<=numTiles, "Assigned " + partitions.size() + " tiles, but we only have " + numTiles);	System.out.println("Dynamic programming partitioner took " + 			   (System.currentTimeMillis()-start)/1000 + " secs to calculate partitions.");	*/	// then do transformations.  This will mess up <partitions>	// and <curPartition> but it doesn't matter.	SIRStream result;	if (doTransform) {	    transformOnTraceback = true;	    result = topConfig.traceback(partitions, curPartition, tilesUsed, 0, str);	} else {	    result = null;	}	/* This is no longer the case because of estimating fusion overhead.	Utils.assert(bottleneck==PartitionUtil.getMaxWork(partitions),		     "bottleneck=" + bottleneck + " but PartitionUtil.getMaxWork(partitions)=" + PartitionUtil.getMaxWork(partitions));	*/	return result;    }