This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: Tweak optabs.c's use of constant rtx_costs
- From: Mark Mitchell <mark at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org, richard at codesourcery dot com
- Date: Thu, 30 Aug 2007 19:56:09 -0700
- Subject: Re: RFA: Tweak optabs.c's use of constant rtx_costs
- References: <87y7gaji3x.fsf@firetop.home> <878x7tzcx2.fsf@firetop.home>
Richard Sandiford wrote:
>> gcc/
>> * optabs.c (shift_optab_p, commutative_optab_p): New functions,
>> split out from expand_binop.
>> (avoid_expensive_constant): New function.
>> (expand_binop_directly): Remove commutative_op argument and
>> call cummutative_optab_p instead. Do not change op0 or op1
>> when swapping xop0 and xop1. Apply avoid_expensive_constant
>> to each argument after potential swapping. Enforce the
>> canonical order of commutative operands.
>> (expand_binop): Use shift_optab_p and commutative_optab_p.
>> Update the calls to expand_binop_directly. Only force constants
>> into registers when widening an operation. Only swap operands
>> once a direct expansion has been rejected.
>> (expand_twoval_binop): Only force constants into registers when
>> using a direct expansion.
OK.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713