Re: [PATCH Atom] Fix for PR target/50962 (bad AGU stall avoidance)

2011-11-06 Thread Richard Henderson
On 11/06/2011 02:12 AM, Ilya Enkovich wrote: > It would be great to have computed type here but ix86_use_lea_for_mov > will check types of other instructions and then call > extract_insn_cached. It will cause infinite loop, right? Hum. That does cause a problem. No objection to the patch approve

Re: [PATCH Atom] Fix for PR target/50962 (bad AGU stall avoidance)

2011-11-06 Thread Ilya Enkovich
Hi, 2011/11/5 Richard Henderson : >> +  if (!TARGET_OPT_AGU || optimize_function_for_size_p (cfun)) > > Surely optimize_insn_for_size_p (), so that cold blocks are optimized for > size. OK. >> +      else if (ix86_use_lea_for_mov(insn, operands)) >> +     return "lea{q}\t{%a1, %0|%0, %a1}"; > >

Re: [PATCH Atom] Fix for PR target/50962 (bad AGU stall avoidance)

2011-11-04 Thread Richard Henderson
> + if (!TARGET_OPT_AGU || optimize_function_for_size_p (cfun)) Surely optimize_insn_for_size_p (), so that cold blocks are optimized for size. > + else if (ix86_use_lea_for_mov(insn, operands)) > + return "lea{q}\t{%a1, %0|%0, %a1}"; We're now getting the insn type and thus length wro

Re: [PATCH Atom] Fix for PR target/50962 (bad AGU stall avoidance)

2011-11-04 Thread Ilya Enkovich
2011/11/3 Uros Bizjak : > Hello! > >> Here is a fix for PR 50962. Fix improves AGU stall avoidance >> optimization by adding opportunity to emit lea instead of mov when it >> is profitable. >> >> 2011-11-03  Enkovich Ilya   >> >>       PR target/50962 >>       * config/i386/i386-protos.h (ix86_use_

Re: [PATCH Atom] Fix for PR target/50962 (bad AGU stall avoidance)

2011-11-03 Thread Uros Bizjak
Hello! > Here is a fix for PR 50962. Fix improves AGU stall avoidance > optimization by adding opportunity to emit lea instead of mov when it > is profitable. > > 2011-11-03 Enkovich Ilya > > PR target/50962 > * config/i386/i386-protos.h (ix86_use_lea_for_mov): New. > * config

[PATCH Atom] Fix for PR target/50962 (bad AGU stall avoidance)

2011-11-03 Thread Ilya Enkovich
Hello, Here is a fix for PR 50962. Fix improves AGU stall avoidance optimization by adding opportunity to emit lea instead of mov when it is profitable. Bootstrapped and checked on linux-x86_64. Could please someone review it? Thanks, Ilya --- gcc/ 2011-11-03 Enkovich Ilya PR targe