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]
Other format: [Raw text]

Re: [PATCH] Exploiting dual mode operation, implementation.


> > > Perhaps the setting of PROMOTE_MODE on ppc belies that assumption.
> > > I wonder if the bulk of this problem can be solved simply by using
> > > the PROMOTE_MODE definition from ia64.
> >
> > Do you still think that this is relevant. If so, it may be
> > interesting.
>
> Yes.  I suspect that this definition of PROMOTE_MODE (which is
> shared by Alpha, btw) is what is responsible for the pattern of
> uses that I described.
>
> That is, it will not promote quantities beyond SImode unless
> they are actually used in DImode.  (Leaving aside corner cases
> like DI & small-constant.)

One of the early attempts for sign-extension problem 
was to do a simple backward analysis and to eliminate 
the sign extension if there are no uses that needs it 
(again I will point to the paper mentioned in previous 
posts - this approach and its limitations are discussed 
there). 

Similarly in PROMOTE_MODE the dead code removal will 
eliminate the sign extension if there are no uses 
that needs it. However, in the case when some uses 
needs sign extension and some don't PROMOTE_MODE 
will increase the register pressure. 
 
When the sign extension optimization will be accepted,
there won't be a need for this as these cases are 
handled as well by our optimization.

Anyway, the optimization will work indifferently of 
the PROMOTE_MODE definition.

Leehod & Mircea


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