Quoting Joern Rennecke <joern.renne...@embecosm.com>:
The return value is a pointer to a function, to be used for adjusting instruction length in the place of ADJUST_INSN_LENGTHS - and where it is missing, or zero if no such functionis required. (I first thought of having separate target hooks for everything, but then I realized that'd just be a waste of space in struct gcc_target.)
Hmm, that bit doesn't work too well, because we have earlier optimizers that want to know insn_min_length, and getting a pointer to the adjustment function initialized would be messy. So it's two hooks then, again with a separate adjust_insn_length hooks. Although I'm not sure if it makes sense to apply that during branch shortening on instructions with multiple variants. It's probably better to let the target incorporate that in the variants generation.