kbarton added a comment. Only one minor comment - do we care about collecting any statistics for this? It seems that it might be useful to know whether this is doing anything, at least for debugging. Aside from that, LGTM. Repository: rL LLVM http://reviews.llvm.org/D14080