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, i386] Optionally use %xmm0 to return float and/or double values (take 3)


On Wed, Jan 26, 2005 at 04:03:25PM +0100, Paolo Bonzini wrote:
> gcc:
> 2005-01-25  Paolo Bonzini  <bonzini@gnu.org>
> 
> 	* config/i386/i386-protos.h (ix86_function_value): Accept two
> 	arguments, like the target macro.
> 	* config/i386/i386.h (FUNCTION_VALUE): Pass both arguments.
> 	* config/i386/i386.c (ix86_function_value): Accept the second
> 	argument of the target macro.
> 	(ix86_function_ok_for_sibcall): Pass a function pointer to
> 	ix86_function_value.
> 	(ix86_function_value, ix86_libcall_value) [!TARGET_64BIT]: Adjust
> 	call to ix86_value_regno).
> 	(ix86_value_regno): Add support for returning floating point values
> 	in SSE registers.

This one doesn't compile:
> +  if (func && SSE_FLOAT_MODE_P (mode) && TARGET_SSE_MATH)
> +    {
> +      struct cgraph_local_info *i = cgraph_local_info (func);
> +      if (k && i && i->local)

k is not defined here.  If I s/k && //, I get these numbers with
povray 3.6.1 benchmark:

Using " -pipe -O3 -msse -mfpmath=sse -msse2 -march=k8 -mtune=k8
-malign-double -minline-all-stringops -m32 -ffast-math -D__NO_MATH_INLINES
-fomit-frame-pointer -funroll-loops " for C compiler options.

GCC 3.4.3-RH:
  Parse Time:    0 hours  0 minutes  1 seconds (1 seconds)
  Photon Time:   0 hours  0 minutes 43 seconds (43 seconds)
  Render Time:   0 hours 30 minutes  2 seconds (1802 seconds)
  Total Time:    0 hours 30 minutes 46 seconds (1846 seconds)
HEAD:
  Parse Time:    0 hours  0 minutes  2 seconds (2 seconds)
  Photon Time:   0 hours  0 minutes 42 seconds (42 seconds)
  Render Time:   0 hours 31 minutes 37 seconds (1897 seconds)
  Total Time:    0 hours 32 minutes 21 seconds (1941 seconds)
HEAD+your patch:
  Parse Time:    0 hours  0 minutes  1 seconds (1 seconds)
  Photon Time:   0 hours  0 minutes 42 seconds (42 seconds)
  Render Time:   0 hours 31 minutes 26 seconds (1886 seconds)
  Total Time:    0 hours 32 minutes  9 seconds (1929 seconds)

which is 0.7% speedup, but 4.4% slowdown from 3.4.x.
Though, your patch would be probably more visible with -O2 instead of -O3.

	Jakub


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