Hans-Peter Nilsson <h...@axis.com> writes: > [...] > (Not-so-)fun fact: add_insn_after takes a bb parameter which > reorg.cc always passes as NULL. But - the argument is > *always ignored* and the bb in the "after" insn is used. > I traced that ignored parameter as far as > r0-81421-g6fb5fa3cbc0d78 "Merge dataflow branch into > mainline" when is was added. I *guess* it's an artifact > left over from some idea explored on that branch. Ripe for > obvious cleanup by removal everywhere.
Heh. I wondered whether there'd be some direct callers of add_insn_after_nobb that relied on the block *not* being updated for some reason, but thankfully not. The only two callers seem to be add_insn_after and emit_note_after. But then emit_note_after handles notes slightly differently from add_insn_after, even though logically, emitting an existing note should work in the same way as emitting a new note. So yeah, like you say, ripe for cleanup :) Richard