craig.topper added a comment. Other than it not being "const" is there any reason you couldn't use FindNodeOrInsertPos to implement contains? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99362/new/ https://reviews.llvm.org/D99362