sebpop accepted this revision. sebpop added a comment. This revision is now accepted and ready to land. I think the current implementation is good: please commit. Thanks for the explanations. https://reviews.llvm.org/D41463