This is the mail archive of the 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: LEA-splitting improvement patch.

On Tue, Aug 14, 2012 at 2:28 PM, Yuri Rumyantsev <> 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  <>
>         * config/i386/i386-protos.h (ix86_split_lea_for_addr) : Add
>         additional argument.
>         * config/i386/ (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.

Just say:

(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);
+	      return;

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.


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