This is part of the series started by D68484.
Rebase of D9403
I suspect we'd want to do this as a twine so that it only allocates 1x?
Yes, see D68521. (I try to not modify Hal's original patches in the 'rebase' version)
For review convenience, all changes related to the original local restrict patches have now been incorporated in the full restrict patch series.