[llvm-commits] [llvm] r63751 - /llvm/trunk/lib/Target/X86/README-SSE.txt

Dan Gohman gohman at apple.com
Wed Feb 4 11:43:48 PST 2009


On Feb 4, 2009, at 11:08 AM, Chris Lattner wrote:

> Author: lattner
> Date: Wed Feb  4 13:08:01 2009
> New Revision: 63751
>
> URL: http://llvm.org/viewvc/llvm-project?rev=63751&view=rev
> Log:
> add a note, this is why we're faster at SciMark-MonteCarlo with
> SSE disabled.
>
> Modified:
>    llvm/trunk/lib/Target/X86/README-SSE.txt
>
> Modified: llvm/trunk/lib/Target/X86/README-SSE.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/README-SSE.txt?rev=63751&r1=63750&r2=63751&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/Target/X86/README-SSE.txt (original)
> +++ llvm/trunk/lib/Target/X86/README-SSE.txt Wed Feb  4 13:08:01 2009
> @@ -912,3 +912,43 @@
> Consider using movlps instead of movsd to implement  
> (scalar_to_vector (loadf64))
> when code size is critical. movlps is slower than movsd on core2 but  
> it's one
> byte shorter.
> +
> +// 
> = 
> = 
> = 
> --------------------------------------------------------------------- 
> ===//
> +
> +We should use a dynamic programming based approach to tell when  
> using FPStack
> +operations is cheaper than SSE.  SciMark montecarlo contains code  
> like this
> +for example:
> +
> +double MonteCarlo_num_flops(int Num_samples) {
> +    return ((double) Num_samples)* 4.0;
> +}

This looks like a capital opportunity for inlining.  It seems that  
this kind of thing
only really matters in small functions when the compiler is hemmed in  
by the
ABI. If code like this is hot, inlining it would probably yield a much  
better result
than the best x87 boondoggle could achieve.

Dan




More information about the llvm-commits mailing list