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/18/07, Jakub Jelinek <jakub@redhat.com> wrote:
> On Thu, Oct 18, 2007 at 08:03:26AM -0400, Kenneth Zadeck wrote:
> > I actually did not know that there were such optimizations.  I thought
> > that most of the back end treated libcalls as black boxes.
>
> AFAIK that's definitely not the case, most passes treat insns in libcall
> sequences as any other insns.

That's not true for at least all passes in gcse.c and for the RTL loop
optimizers. They all have to do special things for libcalls.  In the
case of PRE and hoisting, the "special thing" they do is to punt.  I
don't know about other passes.


> dce.c treats them as if an insn is part of libcall sequence, it must not be
> deleted.

If an insn is part of a libcall *and* the insn is necessary, I
suppose?  Blindly marking all libcall insns as necessary would be
quite dumb.

(But then again, how often can GCC really delete a libcall?  My bet:
almost never.)

Gr.
Steven


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