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]

Re: Better handling for multi-word values?


On Fri, Sep 04, 1998 at 01:41:08PM +0200, Bernd Schmidt wrote:
> I added a new rtx code, MULTIWORD, which represents a value that consists of
> multiple word-sized parts.  The idea is that instead of a DImode pseudo, two
> SImode pseudos are allocated and put inside of a MULTIWORD:
> 
> (multiword:DI
>  [(reg:SI 93)
>   (reg:SI 94)])

I worked on the problem briefly about 2-3 years ago, using a different
approach.  I've lost the code, this is what I think I can remember ;-)

I added a pass that generated a pair of SImode pseudos for each DImode
pseudo.  Then, for each insn reading a DImode pseudo, a new DImode
pseudo was generated (just for that insn).  The SImode pair was loaded
into the short-term DImode pseudo before the insn.  For each DImode
pseudo written, the result was loaded back into the SImode pair.

This added a lot of loads and stores, mostly redundant.  However they
almost all got eliminated by later passes, especially CSE.

This didn't remove the requirement for DImode regs to be contiguous
SImode ones, and it didn't help code quality much.  But it did mean that
there were no long-lived DImode regs.

The real intent, though, was to then begin converting the insn patterns
in the i386 machine description to use pairs of SImode regs directly,
instead of DImode ones.

Starting with load/store operations, of course.

-- Jamie


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