A method includes adding direction to interference edges of a register interference graph and choosing a node of the register interference graph to spill based upon a pass degree of the node. By using the pass degree, the node that caused the greatest interference with allocation of the variables to the physical registers is preferentially chosen to be spilled.
展开▼