Trace scheduling

Trace scheduling is an optimization technique developed by Josh Fisher used in compilers for computer programs.

[1] A compiler often can, by rearranging its generated machine instructions for faster execution, improve program performance.

This can result in large increases in code sizes and poor or erratic performance if program's behavior varies significantly with the input.

Trace scheduling was originally developed for Very Long Instruction Word, or VLIW machines, and is a form of global code motion.

The goal is to have the most common case executed as a sequential set of instructions without branches.