[PATCH] Fix DCE REG_LIBCALL note moving from noop move insns (PR rtl-optimization/33644)

Steven Bosscher stevenb.gcc@gmail.com
Thu Oct 18 12:51:00 GMT 2007


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



More information about the Gcc-patches mailing list