This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix DCE REG_LIBCALL note moving from noop move insns (PR rtl-optimization/33644)
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 13 Oct 2007 16:58:47 +0200
- Subject: Re: [PATCH] Fix DCE REG_LIBCALL note moving from noop move insns (PR rtl-optimization/33644)
- References: <20071011184906.GB2625@devserv.devel.redhat.com>
> I believe it is not a bug to have non-REG_LIBCALL_ID insns within
> a libcall sequence as long as they are either useless or something needed
> by the libcall sequence insns (i.e. they can be deleted whenever the whole
> libcall sequence is killed, but can be also deleted if they are not needed
> individually).
I think this demonstrates that REG_LIBCALL_ID is a bad idea: we now have insns
between REG_LIBCALL and REG_RETVAL notes that don't seem to be part of the
libcall sequence. AFAICS it is used by a unique pass (dce.c) so I think the
pass should be rewritten to deal with libcalls like the other passes.
> If so, attached are two possible patches which fix this, one will move the
> REG_LIBCALL note to the first insn that is actually not going to be deleted,
> the other to the first REG_LIBCALL_ID insn (which is supposed to be marked
> by mark_libcall). I prefer the latter patch.
Given the above remark, I'd say that the former patch is more correct though.
--
Eric Botcazou