IT lexicon › Programming › Software pipelining

Software pipelining

Programming På svenska → Updated: 2026-11-05

The compiler overlaps successive loop iterations, so iteration n+1 starts loading data while iteration n is still computing.

A loop body that loads, multiplies and stores leaves the processor waiting at every step. Software pipelining reshapes the loop so its new kernel holds the store from one iteration, the multiply from the next and the load from a third. A prologue fills the pipeline beforehand and an epilogue drains it afterwards — the same picture as a hardware pipeline, only built by the compiler.

The standard method is modulo scheduling, described by Bob Rau in 1981 and carried to Cydrome and later HP. Itanium got rotating registers and dedicated loop branches precisely so compilers could skip the prologue and epilogue. On ordinary out-of-order cores the hardware does much of this on its own, which is why GCC's -fmodulo-sched rarely gets switched on.

← Back to the lexicon