https://github.com/walter-erquinigo commented: This looks great overall! Could you split this PR into two? One with the refactoring and another one with the new features? That would make reviewing easier https://github.com/llvm/llvm-project/pull/81541