https://github.com/llvm-beanz approved this pull request. I have one suggested code simplification which will also require test updates, but in general I think this is good. https://github.com/llvm/llvm-project/pull/92704