radeonsi/nir/tgsi: move the nir -> tgsi info scanner to common code.
For llvmpipe NIR support this scanner is pretty much required at least for initial transitioning, lets move to shared code and reformat it.
For llvmpipe NIR support this scanner is pretty much required at least for initial transitioning, lets move to shared code and reformat it.