Optimized PrecedenceGraph.