Skip to content
  1. Feb 03, 2008
  2. Feb 02, 2008
  3. Feb 01, 2008
  4. Jan 31, 2008
  5. Jan 30, 2008
  6. Jan 29, 2008
    • Evan Cheng's avatar
      Work in progress. This patch *fixes* x86-64 calls which are modelled as... · 084a1cdc
      Evan Cheng authored
      Work in progress. This patch *fixes* x86-64 calls which are modelled as StructRet but really should be return in registers, e.g. _Complex long double, some 128-bit aggregates. This is a short term solution that is necessary only because llvm, for now, cannot model i128 nor call's with multiple results.
      Status: This only works for direct calls, and only the caller side is done. Disabled for now.
      
      llvm-svn: 46527
      084a1cdc
    • Duncan Sands's avatar
      Use getPreferredAlignmentLog or getPreferredAlignment · 05837eda
      Duncan Sands authored
      to get the alignment of global variables, rather than
      using hand-made versions.
      
      llvm-svn: 46495
      05837eda
    • Dale Johannesen's avatar
      Handle 'X' constraint in asm's better. · 2b3bc304
      Dale Johannesen authored
      llvm-svn: 46485
      2b3bc304
    • Scott Michel's avatar
      Overhaul Cell SPU's addressing mode internals so that there are now · ceae3bbf
      Scott Michel authored
      only two addressing mode nodes, SPUaform and SPUindirect (vice the
      three previous ones, SPUaform, SPUdform and SPUxform). This improves
      code somewhat because we now avoid using reg+reg addressing when
      it can be avoided. It also simplifies the address selection logic,
      which was the main point for doing this.
      
      Also, for various global variables that would be loaded using SPU's
      A-form addressing, prefer D-form offs[reg] addressing, keeping the
      base in a register if the variable is used more than once.
      
      llvm-svn: 46483
      ceae3bbf
  7. Jan 28, 2008
  8. Jan 27, 2008
  9. Jan 26, 2008
  10. Jan 25, 2008
  11. Jan 24, 2008
    • Chris Lattner's avatar
      Significantly simplify and improve handling of FP function results on x86-32. · a91f77ea
      Chris Lattner authored
      This case returns the value in ST(0) and then has to convert it to an SSE
      register.  This causes significant codegen ugliness in some cases.  For 
      example in the trivial fp-stack-direct-ret.ll testcase we used to generate:
      
      _bar:
      	subl	$28, %esp
      	call	L_foo$stub
      	fstpl	16(%esp)
      	movsd	16(%esp), %xmm0
      	movsd	%xmm0, 8(%esp)
      	fldl	8(%esp)
      	addl	$28, %esp
      	ret
      
      because we move the result of foo() into an XMM register, then have to
      move it back for the return of bar.
      
      Instead of hacking ever-more special cases into the call result lowering code
      we take a much simpler approach: on x86-32, fp return is modeled as always 
      returning into an f80 register which is then truncated to f32 or f64 as needed.
      Similarly for a result, we model it as an extension to f80 + return.
      
      This exposes the truncate and extensions to the dag combiner, allowing target
      independent code to hack on them, eliminating them in this case.  This gives 
      us this code for the example above:
      
      _bar:
      	subl	$12, %esp
      	call	L_foo$stub
      	addl	$12, %esp
      	ret
      
      The nasty aspect of this is that these conversions are not legal, but we want
      the second pass of dag combiner (post-legalize) to be able to hack on them.
      To handle this, we lie to legalize and say they are legal, then custom expand
      them on entry to the isel pass (PreprocessForFPConvert).  This is gross, but
      less gross than the code it is replacing :)
      
      This also allows us to generate better code in several other cases.  For 
      example on fp-stack-ret-conv.ll, we now generate:
      
      _test:
      	subl	$12, %esp
      	call	L_foo$stub
      	fstps	8(%esp)
      	movl	16(%esp), %eax
      	cvtss2sd	8(%esp), %xmm0
      	movsd	%xmm0, (%eax)
      	addl	$12, %esp
      	ret
      
      where before we produced (incidentally, the old bad code is identical to what
      gcc produces):
      
      _test:
      	subl	$12, %esp
      	call	L_foo$stub
      	fstpl	(%esp)
      	cvtsd2ss	(%esp), %xmm0
      	cvtss2sd	%xmm0, %xmm0
      	movl	16(%esp), %eax
      	movsd	%xmm0, (%eax)
      	addl	$12, %esp
      	ret
      
      Note that we generate slightly worse code on pr1505b.ll due to a scheduling 
      deficiency that is unrelated to this patch.
      
      llvm-svn: 46307
      a91f77ea
    • Evan Cheng's avatar
      Let each target decide byval alignment. For X86, it's 4-byte unless the... · 35abd840
      Evan Cheng authored
      Let each target decide byval alignment. For X86, it's 4-byte unless the aggregare contains SSE vector(s). For x86-64, it's max of 8 or alignment of the type.
      
      llvm-svn: 46286
      35abd840
Loading