This is the mail archive of the
mailing list for the GCC project.
Re: using emit_library_call
- From: Per Fransson <fransson at cs dot lth dot se>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc <gcc at gcc dot gnu dot org>
- Date: Thu, 8 Aug 2002 12:15:22 +0200 (CEST)
- Subject: Re: using emit_library_call
On Mon, 5 Aug 2002, Richard Henderson wrote:
> On Tue, Aug 06, 2002 at 03:20:54AM +0200, Per Fransson wrote:
> > I've tried using emit_library_call during rtl generation, like this:
> > emit_library_call (fn_rtx, 0,
> > VOIDmode, 2,
> > operand1_rtx, SImode,
> > operand2_rtx, SImode
> > );
> > but it still doesn't work most of the time (more often *with*
> > optimization than without). Do I have to use start_sequence etc?
> If you don't use start_sequence, it will be put at the end of
> the rtl chain, i.e. at the end of the function so far.
> > What if I do this during the preparation of a call to another
> > function when some of the arguments for that function is already in place?
> Boom. No can do.
> > or can it only be done at certain places (how can I tell?)?
> Only certain places. In order to tell, you must understand
> the surrounding code.
What places are those, more than the one I mentioned (already preparing
I'm dealing with that case by making 'currently_expanding_call' in call.c
global and checking whether it's positive. In that case I don't emit my
> You really want to be doing whatever it is you are doing at the
> tree level, not the rtl level. See tree-ssa-20020619-branch.