A method for software pipelining of irregular conditional control loops including
pre-processing the loops so they can be safely software pipelined. The pre-processing
step ensures that each original instruction in the loop body can be over-executed
as many times as necessary. During the pre-processing stage, each instruction in
the loop body is processing in turn (N4). If the instruction can be safely
speculatively executed, it is left alone (N6). If it could be safely speculatively
executed except that it modifies registers that are live out of the loop, then
the instruction can be pre-processed using predication or register copying (N7,
N8, N9). Otherwise, predication must be applied (N10). Predication
is the process of guarding an instruction. When the guard condition is true, the
instruction executes as though it were unguarded. When the guard condition is false,
the instruction is nullified.