Fixes spam in the common case when linking together
many modules produced by the same compiler version.
Well the linker API only exposes linking one module into one other at at time, so I don't know. Currently we have the AMDGPUUnifyMetadata pass as a workaround which cleans these up in a pass over the fully linked module, so that avoids revisiting for each module but it would make more sense if the linker dealt with this.
I wonder whether it would be generally useful to support SetVectors in named metadata nodes. I'm not sure what the textual IR syntax would be, but I believe debug info would use it too.
Do you need to reach inside to the strings? Why not just compare the nodes themselves?