[PATCH] Fix DCE REG_LIBCALL note moving from noop move insns (PR rtl-optimization/33644)
Eric Botcazou
ebotcazou@libertysurf.fr
Sat Oct 13 14:56:00 GMT 2007
> 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
More information about the Gcc-patches
mailing list