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: [PATCH Atom] Fix for PR target/50962 (bad AGU stall avoidance)


Hi,

2011/11/5 Richard Henderson <rth@redhat.com>:
>> + ?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}";
>
> We're now getting the insn type and thus length wrong.
>
> Seems like a better change is
>
>
> ? ? ? ?...
> ? ? ? ? ? ?(eq_attr "alternative" "16,17")
> ? ? ? ? ? ? ?(const_string "ssecvt")
> ? ? ? ? ? ?(match_operand 1 "pic_32bit_operand" "")
> ? ? ? ? ? ? ?(const_string "lea")
> + ? ? ? ? ? (match_test "ix86_use_lea_for_mov (insn)")
> + ? ? ? ? ? ? (const_string "lea")
> ? ? ? ? ? ]

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?

> (Or something; can't be bothered to double-check that match_test is
> the right thing to use here.)
>
> Which will automatically use the proper mnemonic, and also get the
> instruction length right.
>
>
> r~
>

Ilya


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