This is the mail archive of the gcc-patches@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: [RFC] Tweak reload to const propagate into matching constraint output


On 06/27/2012 10:45 AM, Richard Guenther wrote:
> On Wed, Jun 27, 2012 at 5:02 AM, Richard Henderson <rth@redhat.com> wrote:
>> sometimes not (increased code size):
>>
>> -:      41 bd 01 00 00 00       mov    $0x1,%r13d
>> -:      4d 89 ec                mov    %r13,%r12
>> +:      41 bc 01 00 00 00       mov    $0x1,%r12d
>> +:      41 bd 01 00 00 00       mov    $0x1,%r13d
> 
> I suppose that might be fixed if instead of
> 
> +  /* Only use the constant when it's just as cheap as a reg move.  */
> +  if (set_src_cost (c, optimize_function_for_speed_p (cfun)) == 0)
> +    return c;
> 
> you'd unconditionall use size costs?

I've added some code last year or so in rtl.h to operate on
full_rtx_costs, taking both into account (use the primary cost
comparison, and if that's equal, use the secondary). Would that work here?


Bernd


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