The use of subresolution assist features (SRAFs) in the photo mask is one of resolution enhancement techniques in photolithography, which can minimize linewidth variation caused by proximity effect. However, the process latitude with SRAFs through various pitches is not uniform. From the point of view of lithography, pitches with low process latitude, called forbidden areas, should be avoided. These forbidden areas exist often in the layout after routing since they are larger than the minimum clearance required in the design rules. In this paper, a pitch optimization method applied in the post-routing phase is proposed to avoid the forbidden areas. Experimental data of lithography techniques and geometric constraints from the layout are formulated into a constrained quadratic optimization problem. By using the spacing technique, wire segments in the affected area are adjusted to their new locations obtained from solving the optimization problem by quadratic programming. Examples show that the proposed method can avoid most forbidden areas in the layout after normal routing.