Looks like it could be placed in its own source file pretty neatly.
I'll remind everyone, given the magnitude of the changes in the largest patch, we still have the alternative of running SM 6 I/O declarations through separate functions. They would be about the size of these patched spirv_compiler_emit_input() and spirv_compiler_emit_output() functions. The downside is it doesn't eliminate most private variables or fix the issue with register relative addressing. Those could still be done another way though. I would still keep the phase elimination.