[PATCH] Add explicit VIS intrinsics for addition and subtraction.

Eric Botcazou ebotcazou@adacore.com
Sat Oct 15 17:02:00 GMT 2011


> About the 1st question.  Before gcc4.7, the only class (allocno class)
> used for coloring can be a cover class.  So it was not possible to use
> GENERAL_OR_EXTRA_FP_REGS in gcc4.6 and older versions.  Starting gcc4.7,
> class used for coloring can be any class which is more profitable than
> memory.  Although there is inaccuracy in cost calculations for -O1
> because only one pass for cost calculations is used (it is very
> expensive pass).  To get better cost evaluations, more passes should be
> used.  But again we don't do more 2 passes because even one pass is not
> cheap.
>
> In brief, I don't see any criminal that the class calculation is
> different for -O1 and -O2.

Fine with me.  I'm going to apply the above patchlet then.

> About the 2nd question.  It seems to me wrong.  I'd remove function
> process_bb_node_for_hard_reg_moves and its call from
> setup_allocno_cover_class_and_costs because function
> process_regs_for_copy is more accurate (it works with subreg).
> Although, I might be miss something here.  There were a lot of problems
> and tunings of cost calculation code.  Generated code *performance* (and
> even generation of *valid* code) is very sensitive to changes in
> ira-costs.c.  So even if such change looks obvious, a lot of testing and
> benchmarking should be done.  I could do that but it will take a week or
> two before committing such change if everything is ok.

Understood.  I essentially wanted to bring this to your attention, since it 
looked like a small oddity to me.  This might be something to play with for 
future improvements, but it's your call of course.

Thanks for the detailed answer.

-- 
Eric Botcazou



More information about the Gcc-patches mailing list