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] Reduce cost of Athlon multiplication sequences


> On Fri, Jan 06, 2006 at 08:41:07AM +0100, Jan Hubicka wrote:
> >   1) Remove TARGET_DECOMPOSE_LEA and leave us with some fixed cost for
> >   LEA (probably 2).  At the moment we never consider rtx_cost for other
> >   leas than add+shift/add+add sequences so this would do resonable job.
> >   (on P4 add+shift is more expensive than add+add)
> 
> Given that we don't really do too much else tuning for p4, I suspect
> that we can't measure the difference.  Let's just remove it.

I am testing the attached patch and will commit it as obvious once it
passes.

Honza

2006-01-10  Jan Hubicka  <jh@suse.cz>
	* i386.h (TARGET_DECOMPOSE_LEA): Kill.
	* i386.c (x86_decompose_lea): Kill.
	(ix86_rtx_costs): Kill.
Index: config/i386/i386.h
===================================================================
*** config/i386/i386.h	(revision 109553)
--- config/i386/i386.h	(working copy)
*************** extern int x86_prefetch_sse;
*** 209,215 ****
  #define TARGET_MEMORY_MISMATCH_STALL (x86_memory_mismatch_stall & TUNEMASK)
  #define TARGET_PROLOGUE_USING_MOVE (x86_prologue_using_move & TUNEMASK)
  #define TARGET_EPILOGUE_USING_MOVE (x86_epilogue_using_move & TUNEMASK)
- #define TARGET_DECOMPOSE_LEA (x86_decompose_lea & TUNEMASK)
  #define TARGET_PREFETCH_SSE (x86_prefetch_sse)
  #define TARGET_SHIFT1 (x86_shift1 & TUNEMASK)
  #define TARGET_USE_FFREEP (x86_use_ffreep & TUNEMASK)
--- 209,214 ----
Index: config/i386/i386.c
===================================================================
*** config/i386/i386.c	(revision 109553)
--- config/i386/i386.c	(working copy)
*************** const int x86_memory_mismatch_stall = m_
*** 640,646 ****
  const int x86_accumulate_outgoing_args = m_ATHLON_K8 | m_PENT4 | m_NOCONA | m_PPRO;
  const int x86_prologue_using_move = m_ATHLON_K8 | m_PPRO;
  const int x86_epilogue_using_move = m_ATHLON_K8 | m_PPRO;
- const int x86_decompose_lea = m_PENT4 | m_NOCONA;
  const int x86_shift1 = ~m_486;
  const int x86_arch_always_fancy_math_387 = m_PENT | m_PPRO | m_ATHLON_K8 | m_PENT4 | m_NOCONA;
  const int x86_sse_partial_reg_dependency = m_PENT4 | m_NOCONA | m_PPRO;
--- 648,653 ----
*************** ix86_rtx_costs (rtx x, int code, int out
*** 16423,16429 ****
  	      return false;
  	    }
  	  if ((value == 2 || value == 3)
- 	      && !TARGET_DECOMPOSE_LEA
  	      && ix86_cost->lea <= ix86_cost->shift_const)
  	    {
  	      *total = ix86_cost->lea;
--- 16430,16435 ----


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