A compiler is a pipeline of transformations over trees and graphs: ASTs, control-flow graphs, dependency graphs. Most of the interesting analyses reduce to problems from graph-theory — dominator trees, SSA, register allocation as graph coloring.