gcc-patches@gcc.gnu.org
[Top] [All Lists]

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

Subject: Re: [PATCH] Exploiting dual mode operation, implementation.
From: Leehod Baruch
Date: Mon, 1 Aug 2005 16:17:21 +0300
Hello,

> I'm not sure this is difficult at all.  Extend to the max mode,
> when all modes are not larger than word_mode.  Extensions to 
> larger modes generally aren't free, and so aren't really the
> target of your operation.
I can't see how it can be done easily.
Suppose I have a web with more than one pair of modes, like this one:

                         def1            def2
                          se1            se2
                            \           /
                             \         /
                              \       / 
                               \     /
                                \   / 
                                 \ / 
                                use2 
 
def1 + se1: 
set ((reg:SI 10) (..def1rhs..))
set ((reg:DI 100) (sign_extend:DI (reg:SI 10)))

def2 + se2:
set ((reg:HI 20) (..def2rhs..))
set ((reg:DI 100) (sign_extend:DI (reg:HI 20)))

use2:
set ((...) (reg:DI 100))

And suppode that the use can be done on any mode.
This is the optimal result:

                         def1            def2
                          se1            se2
                                         se3 
                            \           /
                             \         /
                              \       / 
                               \     /
                                \   / 
                                 \ / 
                                 se4
                                 use2 
 
def1: 
set ((reg:SI 10) (..def1rhs..))

def2 + se3:
set ((reg:HI 20) (..def2rhs..))
set ((reg:SI 10) (sign_extend:DI (reg:HI 20)))

use2:
set ((reg:DI 100) (sign_extend:DI (reg:SI 10)))
set ((...) (reg:DI 100))

But I can't see how it could be done using redundancy elimination.
This is why I want to deal with webs that the sources of the 
sign-extensions have the same mode.
On the other hand, the target mode of the sign-extensions in the same 
web always has the same mode (because they reaches the same uses).
This is why I want to deal with webs that has one pair of modes.

Thanks,
Leehod.

<Prev in Thread] Current Thread [Next in Thread>