This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix DCE REG_LIBCALL note moving from noop move insns (PR rtl-optimization/33644)
On 10/18/07, Richard Kenner <email@example.com> wrote:
> > We'd certainly need something to say that a function call instruction is
> > deletable if its value is unused; in general, of course, we assume
> > function calls have important side-effects.
> I thought we have a flag for that now, but I'm not sure I remember which one.
> I agree that it may well be the case that libcalls are ALREADY unnecessary,
> but I'm not quite ready to assert that myself.
The last time this came up, it was pretty much agreed that the main
reason to still have libcalls was to allow dynamic TLS addresses
(which involve calls) to be CSE-ed. I don't know if this actually
works as expected right now, I've never checked that. I don't think
anyone knows if CSE of other libcalls is useful/necessary/happening
for some target.
Otherwise, the tree optimizers should remove almost all dead code, so
the chances of a dead libcall are virtually 0.