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 emit_library_call_value to not use virtual stack regs after expand

On Wed, Jun 24, 2009 at 2:47 PM, Maxim Kuvyrkov<> wrote:
>> It was my understanding that the expanders should never be used after
>> 'expand', but to get this libcall you have to go through an expander,
>> right?
> I don't think I understand you on this. ?Most instructions emitted after the
> expand pass are emitted via expand_<op>, so expanders are used, and quite
> extensively, after the expand pass; and there also are functions like
> expand_binop -- this one is being used in RTL loop optimizer to generate a
> divide. ?I suppose you mean something under 'expander'.

I mean instructions that don't come from a gen_* functions, or things
that don't have a define_insn*.  Expanders are the define_expands for
example.  The reason to avoid this, is exactly because you end up in
code paths that assume virtual regs haven't been replaced and
inserting new (lib)calls is all fine and dandy -- and it is not ;-)

Anyway, calling expand_binop in the loop optimizer is a hack, but I
guess Honza's comment explained already why it's done that way...


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