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: [PATCH] Fix DCE REG_LIBCALL note moving from noop move insns (PR rtl-optimization/33644)


> 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


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