This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Exploiting dual mode operation, implementation.
- From: Mircea Namolaru <NAMOLARU at il dot ibm dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Leehod Baruch <LEEHOD at il dot ibm dot com>, Leehod Baruch <sleehodb at t2 dot technion dot ac dot il>, stevenb at suse dot de
- Date: Fri, 5 Aug 2005 14:25:56 +0200
- Subject: 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