This commit is a mass re-application of the following commits: 7d15ece7 e0ec7a02 02197f7e a175a965 Those were temporarily reverted in 057028ed, and never re-applied. Re-committed by @ldionne (author edited for credit). Differential Revision: https://reviews.llvm.org/D90168