Graph TheoryEasyGraph Coloring
Graph Coloring · Easy problem
A compiler must assign registers to five live variables . Variable is live for the whole routine, so it interferes with all four . The are only live in a shifting window, so each interferes only with its immediate neighbor: , , . Two interfering variables cannot share a register. What is the fewest registers needed?