Skip to content
  1. Jan 25, 2008
  2. Jan 24, 2008
    • Chris Lattner's avatar
      Don't dump the function! · 8d83271b
      Chris Lattner authored
      llvm-svn: 46320
      8d83271b
    • Chris Lattner's avatar
      getUnderlyingObject can return null, handle this. · 23dd0551
      Chris Lattner authored
      llvm-svn: 46318
      23dd0551
    • Chris Lattner's avatar
      Teach basicaa that 'byval' arguments define a new memory location that · 9104d712
      Chris Lattner authored
      can't be aliased to other known objects.  This allows us to know that byval 
      pointer args don't alias globals, etc.
      
      llvm-svn: 46315
      9104d712
    • Chris Lattner's avatar
      e30f09d0
    • Chris Lattner's avatar
      clarify a comment, thanks Duncan. · 34ed27c4
      Chris Lattner authored
      llvm-svn: 46313
      34ed27c4
    • 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
    • Chris Lattner's avatar
      Fix this buggy transformation. Two observations: · e97fa8cd
      Chris Lattner authored
      1. we already know the value is dead, so don't bother replacing 
         it with undef.
      2. The very case the comment describes actually makes the load
         live which asserts in deletenode.  If we do the replacement
         and the node becomes live, just treat it as new.  This fixes
         a failure on X86/2008-01-16-InvalidDAGCombineXform.ll with
         some local changes in my tree.
      
      llvm-svn: 46306
      e97fa8cd
    • Chris Lattner's avatar
      The dag combiner is missing revisiting nodes that it really should, and thus leaving · d66eac62
      Chris Lattner authored
      dead stuff around.  This gets fed into the isel pass and causes certain foldings from
      happening because nodes have extraneous uses floating around.  For example, if we turned
      foo(bar(x)) -> baz(x), we sometimes left bar(x) around.
      
      llvm-svn: 46305
      d66eac62
    • Chris Lattner's avatar
      fold fp_round(fp_round(x)) -> fp_round(x). · 0feb1b0f
      Chris Lattner authored
      llvm-svn: 46304
      0feb1b0f
    • Anton Korobeynikov's avatar
      Fix potential buffer overflow · a4f27608
      Anton Korobeynikov authored
      llvm-svn: 46296
      a4f27608
    • Owen Anderson's avatar
      Move some functionality for adding flags to MachineInstr's into methods on... · 2a8a4856
      Owen Anderson authored
      Move some functionality for adding flags to MachineInstr's into methods on MachineInstr rather than LiveVariables.
      
      llvm-svn: 46295
      2a8a4856
    • Evan Cheng's avatar
      Forgot these. · ec3da554
      Evan Cheng authored
      llvm-svn: 46292
      ec3da554
    • 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
  3. Jan 23, 2008
  4. Jan 22, 2008
  5. Jan 21, 2008
  6. Jan 20, 2008
  7. Jan 19, 2008
Loading