This is the mail archive of the gcc-patches@gcc.gnu.org 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]

Re: [Patch]: Fix pb in libcall_dead_p


Hi!

Richard Kenner a écrit :
> 
>     The reload_{in,out}si are necessary if you use secondary reloads.
>     I don't use them.  I've tried some day, but it turns out the (clobber)
>     was better.
> 
> The clobber *is* a secondary reload.
> 
>     I don't have the reload_{in,out} patterns.
> 
> I don't see how it can work, then.

I don't define SECONDARY_*_RELOAD_CLASS.  So the reload code does not
call gen_reload but the normal reloading (with standard move-insns).

> 
>     The scratch registers corresponds to a RELOAD_INSN in the reload pass.
>     Their processing does not involve the reload_xxx patterns.  It is not
>     necessary to reload in/out anything in them.
> 
> Right.  The reload of movsi is fine.  But that's not the problem.
> 
> Suppose you have, e.g., an addsi3 insn where one of the operands is a
> pseudo that didn't get a hard reg and I'm assuming the machine can't
> add from memory.  So reload will try to make a movsi to do the reload
> of the operand.  *That* needs a CLOBBER, which needs a register, which
> is what is called a "secondary reload".

Ok, I think I understand what you mean.

In fact, what happens is that when a movsi reload is made, either the
source or the destination is a hard register.  In that case, I don't
need a scratch.  I've tried to follow a set of rules in definition
of the machine description so that this is always the case.

I have a few DI operations also.  But for them, I've defined a clobber
and I've tried to make sure reloading of operands does not happen.

	Stephane

-----------------------------------------------------------------------
         Home                               Office
E-mail: stcarrez@worldnet.fr               Stephane.Carrez@sun.com
WWW:    http://home.worldnet.fr/stcarrez   http://www.sun.com
Mail:   17, rue Foucher Lepelletier        6, avenue Gustave Eiffel
        92130 Issy Les Moulineaux          78182 Saint Quentin en Yvelines
        France

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