daniel-petrovic wrote: Most comments are addressed, but I'd like to check some alternative solution and some edge cases too. I'll mark the PR ready for review when I believe it's so far again. https://github.com/llvm/llvm-project/pull/239693