https://github.com/ftynse requested changes to this pull request. Please bear with me. This is a rather big and complex patch, I need time to properly re-review this, in particular design comments and tests. https://github.com/llvm/llvm-project/pull/88712