This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] Fix problem with loop notes emitted by targets


In message <20031206222847.GA23400@atrey.karlin.mff.cuni.cz>, Zdenek Dvorak wri
tes:
 >Hello,
 >
 >some targets (s390, maybe other) produce loops when expanding
 >builtins; this causes problems as create_loop_notes does not like
 >the notes created by them.  This patch makes the functions that expand
 >loops work without creating the notes.  It also removes
 >NOTE_INSN_LOOP_CONT, since it is not produced anywhere.
 >
 >Bootstrapped and regtested on i686, bootstrap on s390 in progress.
 >
 >Zdenek
 >
 >	* cfglayout.c (duplicate_insn_chain): Don't handle NOTE_INSN_LOOP_CONT.
 >	* cfgrtl.c (rtl_delete_block): Ditto.
 >	* final.c (final_scan_insn): Ditto.
 >	* jump.c (squeeze_notes): Ditto.
 >	* loop.c (find_and_verify_loops, for_each_insn_in_loop): Ditto.
 >	* unroll.c (copy_loop_body): Ditto.
 >	* rtl.c (note_insn_name): Remove NOTE_INSN_LOOP_CONT.
 >	* rtl.h (enum insn_note): Ditto.
 >	* stmt.c (expand_start_loop, expand_loop_continue_here,
 >	expand_end_loop): Don't create loop notes.
Rather than removing LOOP_CONT notes, leave them unused.  We can remove them
when we merge with the mainline.  Removing them now just adds to the headaches
when we merge from the mainline.

It's also the case that if we get to a point where we want to merge to the
mainline, but don't have a new RTL loop optimizer, then we'll probably
be stuck trying to rewrite LOOP_CONT notes since they're reasonably
important to the old loop optimizer.


The changes to stmt.c to note create any loop notes are fine assuming
things bootstrap on the s390.


jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]