DBG_VALUES vs bundling


I work with an out-of-tree backend for a VLIW architecture and we use bundling extensively. We have opted to put DBG_VALUES inside bundles to keep them together with their originating instructions. However, as no (in-tree) backends do this to our knowledge, we have recently started to question if that’s a wise approach. Several patches are needed to make bundled DBG_VALUEs work and since others don’t do it, we’re vulnerable to upstream changes that breaks things. Also, any DBG_VALUE inside a bundle eventually has to be interpreted as if it’s after the bundle, when the labels for ranges are inserted by the asmprinter. However, sinking them to after bundles will encounter asserts that disallow DBG_VALUEs after terminator instructions.

Any insights would be valuable. Bundle DBG_VALUEs or not?

BR /Jesper