nir: non-ssa shader instruction pass helper

Emma Anholt requested to merge anholt/mesa:nir-shader-pass-helper into master

In refactoring some nir-to-tgsi, I got frustrated with typing out the function/block/instruction walking loop yet again and decided to put together a helper. The diffstat is not what I hoped it would be, but using the helper results in automatically preventing a collection of minor bugs, so it seems worth it.

Merge request reports