This is the mail archive of the 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, Paolo Bonzini <> wrote:
> > 1) the old RTL loop optimizer could use them to move loop invariant libcalls.
> > Since the old RTL loop optimizer is no more, this is no longer a
> > reason to keep the old-style libcall notes.
> >
> > 2) the old DCE in flow.c could remove entire libcall sequences if the
> > libcall result was dead.
> > The new DCE uses REG_LIBCALL_ID notes, so again the reason to have
> > REG_LIBCALL and REG_RETVAL is gone here.
> >
> > 3) The pre-regalloc scheduling pass used to move libcall blocks as a whole.
> 4) When -ftrapv is in effect, libcalls are "necessary" so that the
> results of an operation can be propagated without making the call to the
> libgcc functions dead.  The attached patch causes a failure in pr30286.c.

If the libcall is not pure/const, it should not be removed. If the
libcall is pure/const with -ftrapv, that's your bug. It seems
backwards that libcall notes now suddenly also exist to _avoid_
removing library calls...


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