This is the mail archive of the
mailing list for the GCC project.
Re: LEA-splitting improvement patch.
On Tue, Aug 14, 2012 at 2:28 PM, Yuri Rumyantsev <email@example.com> wrote:
> Thanks a lot forr your comments.
> I prepared new patch and ChangeLog. Testing of x32 is in progress.
> It it OK for trunk?
> 2012-08-14 Yuri Rumyantsev <firstname.lastname@example.org>
> * config/i386/i386-protos.h (ix86_split_lea_for_addr) : Add
> additional argument.
> * config/i386/i386.md (ix86_split_lea_for_addr) : Add
> additional argument curr_insn.
> * config/i386/i386.c (ix86_split_lea_for_addr): Do instructions
> reodering to get opportunities for better scheduling.
> (ix86_lea_outperforms): Do more aggressive lea splitting.
You are not doing splitting in ix86_lea_outperforms.
> (find_nearest_reg-def): New function. Find nearest register
> definition used in address.
(find_nearest_reg_def): New function.
+ emit_insn (gen_rtx_SET (VOIDmode, target, tmp));
+ if (parts.disp && parts.disp != const0_rtx)
+ ix86_emit_binop (PLUS, mode, target, parts.disp);
+ ix86_emit_binop (PLUS, mode, target, tmp1);
Can you explain, why you have to duplicate this code? Here you
generate the same sequence as in the code below. Use tmp and tmp1 in
the way that it will fit existing code.