Zdenek Dvorak wrote:
Hello,
here is a proposal for the patch to remove loop notes (I still need to
benchmark it, and probably split into smaller parts). However, I do not
understand some of the code from that it removes loop note usage, so I
would appreciate comments on them:
cse.c:cse_end_of_basic_block -- something related to jump following.
Steven, you had some patches towards removing this, right?
While the unreviewed fwprop patches make jump following unnecessary, I
probably won't argue for its removal until 4.3.
The code in question is just looking for the last instruction in the
preceding basic block. If it does not find a NOTE_INSN_LOOP_END note,
it will find a non-note just before it. If you really want to be sure,
you may want to look for a NOTE_INSN_BASIC_BLOCK_BEG note instead.
For the -fcse-follow-jumps case, we'll find a BARRIER after the LOOP_END
note. For the -fcse-skip-blocks case, we're only looking for a
non-label and in this case the basic-block-beginning note should do the
same function as the LOOP_END note.
CCing Joern because he seems to have used this stuff in the SH back-end,
and can probably help understanding this code too.
Paolo