This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC 4.2 Status Report (2006-04-19)
On Wed, Apr 19, 2006 at 06:01:54PM -0400, Andrew Pinski wrote:
> > BTW, If anyone is interested in working on SEE for x86-64, please drop
> > me a line.
>
> Why not do the comunication in public?
Sure. Let me give a try.
If I understand it correctly, the current SEE implementation tries to
elimiate SE by better placing SE. My SE proposal for x86-64 is to
replace explicit SE with a pseudo SE and a simple move, using the same
SEE infrastructure.
H.J.
----
Problem description:
--------------------
A 64bit machine may have implicit sign/zero extension instructions
where 32bit register operands are implicitly sign/zero extended to
64bit. Gcc may generate explicit sign/zero extension instructions to
convert a 32bit value into a 64bit value. Depending on the instruction
set of the architecture, some of these explicit extension instructions
may be redundant.
General idea for solution:
--------------------------
Replace the explicit extension with a pseudo extension instruction,
which is similar to the original extension, but a nop for the backend,
and a simple move.
Implementation by example:
--------------------------
Phase 0: Initial code, as currently generated by gcc.
implicit ext
|
...
|
explicit ext
implicit ext:
set ((reg:SI 10) (..defrhs..))
explicit ext:
set ((reg:DI 100) (extend:DI (reg:SI 10)))
Phase 1: We replace the explicit extension with a pseudo extension and
a simple move if there are no updates on the destination of the
original implicit extension before the explicit extension.
implicit ext
|
...
|
pseudo ext
simple move
implicit ext:
set ((reg:SI 10) (..defrhs..))
pseudo ext:
set ((reg:DI 10) (pseudo_extend:DI (reg:SI 10)))
simple move:
set ((reg:DI 100) (reg:DI 10)))
SEE should be enabled only for the backend with pseudo extensions.