davidxl accepted this revision. davidxl added a comment. This revision is now accepted and ready to land. Indeed. The original one is O(N^2). LGTM. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62262/new/ https://reviews.llvm.org/D62262