nir: Get some patches out of my internal tree
This is a bunch of mostly unrelated patches that I'm carrying around in an internal project tree right now. It'd be nice to shrink the stack and land some of them.
- @cwabbott0 and @karolherbst as the most obvious reviewers.