This is the mail archive of the
mailing list for the GCC project.
Re: Nested libcalls (was: Re: RFC: SMS problem with emit_copy_of_insn_after copying REG_NOTEs)
- From: Jan Hubicka <jh at suse dot cz>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Jan Hubicka <jh at suse dot cz>, Andrew Pinski <pinskia at physics dot uc dot edu>, Ian Lance Taylor <iant at google dot com>, Vladimir Yanovsky <volodyan at gmail dot com>, Jan Hubicka <hubicka at ucw dot cz>, gcc at gcc dot gnu dot org, Vladimir Yanovsky <yanov at il dot ibm dot com>, Ayal Zaks <zaks at il dot ibm dot com>, zadeck at naturalbridge dot com
- Date: Sun, 31 Dec 2006 02:38:51 +0100
- Subject: Re: Nested libcalls (was: Re: RFC: SMS problem with emit_copy_of_insn_after copying REG_NOTEs)
- References: <200612302207.kBUM7aG8023853@localhost.localdomain> <200612302214.kBUMEt3P025579@localhost.localdomain> <20061230235952.GC28965@kam.mff.cuni.cz> <firstname.lastname@example.org>
> On Sunday 31 December 2006 00:59, Jan Hubicka wrote:
> > > Also I should mention, this also fixes a possible bug with libcalls that
> > > are embedded in one another. Before we were just assuming if we have a
> > > REG_RETVAL, then the previous REG_LIBCALL would be the start of the
> > > libcall but that would be incorrect with embedded libcalls.
> > We should not have nested libcalls at all. One level of libcalls is
> > painful enough and we take care to not do this.
> It's unclear whether we can have nested libcalls or not. We expect them
> in some places (especially, see libcall_stack in gcse.c:local_cprop_pass)
> but are bound to fail miserably in others.
> This is something I've been wondering for a while. Maybe someone can
> give a definitive answer: Can libcalls be nested, or not?
My understanding is that libcall should not be nested and there is code
to avoid nesting in emit_libcall_block. I believe this was also outcome
of some disucssions with Rth while back. Historically some code was
written to support nested libcalls but I believe it was never useful but
it got propagated to new code.
If we care, we probably could tweek verify_flow_info to verify that
libcalls are unnested and don't span BB boundary, but I have too many
other verifier related plans right now to be able to promise to get into