hvdijk wrote: Rebased to address a conflict with changes that have gone in since I first submitted this, the PR remains otherwise identical and waiting to be reviewed. https://github.com/llvm/llvm-project/pull/94229