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)


On 10/13/07, Eric Botcazou <ebotcazou@libertysurf.fr> wrote:
> > 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.

Which is simply a bug, not indicitative bad idea.

>  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.

It's only a bad idea if you think doing linear walks all the time to
figure out whether an INSN is part of a libcall is a good idea.
IMHO, REG_LIBCALL and REG_RETVAL is the real bad idea.

Rewriting DCE to deal with libcalls like "every other pass" will add
several O(n) walks in bad places.


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