seranu wrote: > I don't understand why we need to refactor this? During the review for https://github.com/llvm/llvm-project/pull/77918 there was an ask to extract the refactor in a separate PR. https://github.com/llvm/llvm-project/pull/78108