freedreno/ir3: refactor NIR IR handling