1. A method for designing a system on a target device, comprising: identifying a candidate cluster for a node in the system based on a gain value that quantifies utility for the candidate cluster, wherein the candidate cluster includes programmable resources from the target device; designating the candidate cluster as a final cluster for the node when the candidate cluster has a highest gain value among other candidate clusters for each node in the candidate cluster; generating a data file that describes how the final cluster is placed and routed on the target device; and programming the target device with the data file to physically transform components on the target device to implement the system.