An embodiment performs dummy fill in a design layout to achieve a target
density that is within a narrow range of target densities. During
operation, the system can receive a design layout that includes a region
whose density is not within a desired range of target densities. Next,
the system can receive a set of dummy-fill cells which can be used to
place a dummy-fill array to fill an arbitrarily sized rectangle. The set
of dummy-fill cells may contain assist features and optical proximity
corrections which cause the dummy shapes to print properly regardless of
the size of the dummy-fill array. The system may then determine a polygon
in the design layout to fill with dummy-fill cells. Next, the system may
fracture the polygon into a set of rectangles. The system may use the set
of dummy-fill cells to place a dummy-fill array that fills a rectangle.