https://github.com/ssahasra approved this pull request. The overall shape of things looks good to me. I didn't think through the details of the implementation. Please do give other reviewers a chance to comment. https://github.com/llvm/llvm-project/pull/201470