This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Simplify initial RTL for loops
- From: Roger Sayle <roger at www dot eyesopen dot com>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 14 Jan 2003 22:42:37 -0700 (MST)
- Subject: Re: [PATCH] Simplify initial RTL for loops
On Tue, 14 Jan 2003, Zack Weinberg wrote:
> Roger Sayle <roger@www.eyesopen.com> writes:
> > genrtl_while_stmt (t)
> > tree t;
> > {
> > ! tree cond;
> > emit_nop ();
>
> Hmm, what is the point of that emit_nop()? Why do we even have
> such a thing?
I think the clue is that the only uses of emit_nop are in
c-semantics.c, and all four instances are immediately followed
by a call to emit_line_note. Perhaps at some point in the
past emit_line_note attached the line number information to
the last/previous instruction. The implementation of emit_nop
in stmt.c certainly looks bizarre enough!
> void
> emit_nop ()
> {
> rtx last_insn;
>
> last_insn = get_last_insn ();
> if (!optimize
> && (GET_CODE (last_insn) == CODE_LABEL
> || (GET_CODE (last_insn) == NOTE
> && prev_real_insn (last_insn) == 0)))
> emit_insn (gen_nop ());
> }
Like Zack, I too would be interested in hearing from anyone
that understands (the history of) this code. Is it safe to
just delete this function, and its 4 uses in c-semantics.c?
Roger
--