nir: add and gather shader_info::writes_memory