This is the mail archive of the gcc@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: Dropping of old loop optimizer


Hi,

On Thu, 27 Feb 2003, Daniel Berlin wrote:

> Now consider trying to set a piece of a register
>
> we would do:
>
> (set (subreg:SI (reg:DI 51)) (reg:SI 50))
>
> while they would do:
> (set:DISI (reg 51) (reg 50))
>
> which is still a full def, and easy to rename.

But those compiler would need to do magic for other than the lowest part,
i.e. the difference between (subreg:SI (reg:DI) 0) and
(subreg:SI (reg:DI) 4).  And especially when setting a full DImode reg
really piecewise (i.e. when the set's indeed are just partial and do not
clobber the whole underlying reg).  They basically need to set two SImode
regs, and then do a parallel copy of those two regs into one DImode reg
(one in the low, one in the high part), and then rely on something like
coalescing and the reg allocator to allocate one of the SImode regs to the
low and the other to the high part of an register (i.e. a limited form of
bitwidth aware allocation).

It's not clear to me, if one approach is really better than the other,
they both have their issues.


Ciao,
Michael.


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