MIPS 74K support patch

Joseph S. Myers joseph@codesourcery.com
Fri Apr 13 19:20:00 GMT 2007


On Fri, 13 Apr 2007, Eric Christopher wrote:

> > +/* Integer multiply-accumulate instructions should be generated.  */
> > +#define GENERATE_MADD_MSUB      (ISA_HAS_MADD_MSUB && !TUNE_74K)
> 
> This has me curious though...

The original patch had much more complicated changes to discourage use of 
these instructions conditional on TARGET_74K.  This is a simpler approach 
and it's clearly a tuning matter so TUNE_74K rather than TARGET_74K is 
appropriate.

The original ChangeLog for that part of the changes, and the only 
explanation I have for them, was:

2007-01-23  David Ung  <davidu@mips.com>

        * mti-sched-mult-madd.diff: Define 74k specific pattens in
        mips.md: mulsi3_74k, mul_acc_si_74k and mul_sub_si_74k.  These
        patterns does not allow the "l" constraint so that the compiler
        won't allocate the LO register at all.  This effectively turns off
        any use of mult/madd/msub. (The assumption that the delay of
        mul->madd->madd->mflo->use is 15, while
        mul->mul->add->mul->add->use re-schedule becomes
        mul->mul->mul->add->add->use is 11.  So the use of mul+add is
        almost always better than madd)  
        Note there are some new splitters such that it will split the
        multiply-add/sub patterns before sched1/register allocation
        (previous done only after reload_completed, which causes
        overlapping register allocations).

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list