1. A method of optimizing an intermediate representation of source code, comprising: generating a graph from the intermediate representation, wherein the graph comprises a plurality of nodes; selecting a node in the graph; applying an optimization to the selected node; recognizing a bounded subgraph based on the selected node; and propagating the optimization to nodes in the bounded subgraph.