Add X86_TUNE_AVOID_LEA_FOR_ADDR
ix86_split_lea_for_addr transforms a single LEA instruction into a series of MOV and ADD instructions. For lea 0x400(%edx, %ecx, 8), %edx we get mov %ecx, %edx add %ecx, %edx add %ecx, %edx add %ecx, %edx add %ecx, %edx add %ecx, %edx add %ecx, %edx add %ecx, %edx add $0x400, %edx For -mtune=intel, we want to turn on X86_TUNE_OPT_AGU, but avoid ix86_split_lea_for_addr to optimize for both Haswell and Silvermont. This patch adds X86_TUNE_AVOID_LEA_FOR_ADDR and PROCESSOR_INTEL. We keep PROCESSOR_INTEL the same as PROCESSOR_SILVERMONT, except that X86_TUNE_AVOID_LEA_FOR_ADDR isn't turned on for PROCESSOR_INTEL. * config/i386/i386-c.c (ix86_target_macros_internal): Handle PROCESSOR_INTEL. Treat like PROCESSOR_GENERIC. * config/i386/i386.c (intel_memcpy): New. Duplicate slm_memcpy. (intel_memset): New. Duplicate slm_memset. (intel_cost): New. Duplicate slm_cost. (m_INTEL): New macro. (processor_target_table): Add "intel". (ix86_option_override_internal): Replace PROCESSOR_SILVERMONT with PROCESSOR_INTEL for "intel". (ix86_lea_outperforms): Support PROCESSOR_INTEL. Duplicate PROCESSOR_SILVERMONT. (ix86_avoid_lea_for_addr): Check TARGET_AVOID_LEA_FOR_ADDR instead of TARGET_OPT_AGU. (ix86_issue_rate): Likewise. (ix86_adjust_cost): Likewise. (ia32_multipass_dfa_lookahead): Likewise. (swap_top_of_ready_list): Likewise. (ix86_sched_reorder): Likewise. * config/i386/i386.h (TARGET_INTEL): New. (TARGET_AVOID_LEA_FOR_ADDR): Likewise. (processor_type): Add PROCESSOR_INTEL. * config/i386/x86-tune.def: Support m_INTEL. Duplicate m_SILVERMONT. Add X86_TUNE_AVOID_LEA_FOR_ADDR. From-SVN: r206717
Showing
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to comment