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.


> 3. Isn't it (different types of extensions) a rare case? Don't
> forget that we are trying to solve the common problem of 32 bit
> computation on 64 architecture therefore most of the extensions
> are from 32 bit to 64 bit.

> Don't forget that when manipulating 8 and 16-bit quantities they
> usually extended to some wider mode before they are manipulated.
> So a load followed by an extension is extremely common.  We want
> to make sure that we don't wind up with two such extensions -- one
> to SImode and a second to DImode.
>
> Of course, I have no hard data on how often this occurs.

The question is how often there are different type of sign 
extension *in the same web*. I suspect that this is a very rare 
occurrence for the simple reason that writing a C test case that 
exhibits this behavior is not at all straightforward. For a 
variable appearing in C code all its definitions initially have
the same type of sign extension. In some cases some optimizations 
may change this, or temporary variables generated by the compiler 
may have different sign extension - but anyway it seems a very 
rare occurrence (leaving aside cases when a constant is assigned 
to a variable and the sign extension is discarded by constant 
folding - but such cases are handled by the algorithm). And 
if indeed it is such a rare occurrence why a solution to not 
apply the optimization to webs with different sign extension 
is not satisfactory ?.

Mircea



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