A technique to apply loop peeling based on the forward path profile
Original Publication Date: 2003-May-21
Included in the Prior Art Database: 2003-May-21
A loop optimization technique for compilers is disclosed that applies a loop peeling optimization selectively based on forward path profiles. In the disclosed technique, after collecting forward path profiles, three indices for each loop are calculated by using the forward path profiles: the number of loop iterations, the execution-time probability of termination of the loop at the first iteration, and the differences in the hot paths between the first iteration and the later iterations. These indices are then compared with their corresponding thresholds to decide whether or not loop peeling is applied to each loop.