https://github.com/jayfoad commented: Seems reasonable but it would be easier to review if you can separate out the refactoring, the bug fix and the optimization. https://github.com/llvm/llvm-project/pull/98450