Skip to content
  1. Feb 03, 2009
  2. Feb 02, 2009
  3. Jan 31, 2009
    • Chris Lattner's avatar
      Simplify and generalize the SROA "convert to scalar" transformation to · ec99c46d
      Chris Lattner authored
      be able to handle *ANY* alloca that is poked by loads and stores of 
      bitcasts and GEPs with constant offsets.  Before the code had a number
      of annoying limitations and caused it to miss cases such as storing into
      holes in structs and complex casts (as in bitfield-sroa) where we had
      unions of bitfields etc.  This also handles a number of important cases
      that are exposed due to the ABI lowering stuff we do to pass stuff by
      value.
      
      One case that is pretty great is that we compile 
      2006-11-07-InvalidArrayPromote.ll into:
      
      define i32 @func(<4 x float> %v0, <4 x float> %v1) nounwind {
      	%tmp10 = call <4 x i32> @llvm.x86.sse2.cvttps2dq(<4 x float> %v1)
      	%tmp105 = bitcast <4 x i32> %tmp10 to i128
      	%tmp1056 = zext i128 %tmp105 to i256	
      	%tmp.upgrd.43 = lshr i256 %tmp1056, 96
      	%tmp.upgrd.44 = trunc i256 %tmp.upgrd.43 to i32	
      	ret i32 %tmp.upgrd.44
      }
      
      which turns into:
      
      _func:
      	subl	$28, %esp
      	cvttps2dq	%xmm1, %xmm0
      	movaps	%xmm0, (%esp)
      	movl	12(%esp), %eax
      	addl	$28, %esp
      	ret
      
      Which is pretty good code all things considering :).
      
      One effect of this is that SROA will start generating arbitrary bitwidth 
      integers that are a multiple of 8 bits.  In the case above, we got a 
      256 bit integer, but the codegen guys assure me that it can handle the 
      simple and/or/shift/zext stuff that we're doing on these operations.
      
      This addresses rdar://6532315
      
      llvm-svn: 63469
      ec99c46d
  4. Jan 28, 2009
  5. Jan 12, 2009
  6. Jan 09, 2009
  7. Jan 08, 2009
    • Chris Lattner's avatar
      This implements the second half of the fix for PR3290, handling · c518dfd1
      Chris Lattner authored
      loads from allocas that cover the entire aggregate.  This handles
      some memcpy/byval cases that are produced by llvm-gcc.  This triggers
      a few times in kc++ (with std::pair<std::_Rb_tree_const_iterator
      <kc::impl_abstract_phylum*>,bool>) and once in 176.gcc (with %struct..0anon).
      
      llvm-svn: 61915
      c518dfd1
  8. Jan 07, 2009
  9. Nov 04, 2008
  10. Oct 06, 2008
  11. Sep 04, 2008
  12. Aug 23, 2008
  13. Jun 23, 2008
  14. Jun 22, 2008
    • Chris Lattner's avatar
      Fix PR2369 by making scalarrepl more careful about promoting · 6ff85681
      Chris Lattner authored
      structures.  Its default threshold is to promote things that are
      smaller than 128 bytes, which is sane.  However, it is not sane
      to do this for things that turn into 128 *registers*.  Add a cap
      on the number of registers introduced, defaulting to 128/4=32.
      
      llvm-svn: 52611
      6ff85681
  15. Jun 05, 2008
  16. Jun 04, 2008
    • Duncan Sands's avatar
      Change packed struct layout so that field sizes · fc3c489b
      Duncan Sands authored
      are the same as in unpacked structs, only field
      positions differ.  This only matters for structs
      containing x86 long double or an apint; it may
      cause backwards compatibility problems if someone
      has bitcode containing a packed struct with a
      field of one of those types.
      The issue is that only 10 bytes are needed to
      hold an x86 long double: the store size is 10
      bytes, but the ABI size is 12 or 16 bytes (linux/
      darwin) which comes from rounding the store size
      up by the alignment.  Because it seemed silly not
      to pack an x86 long double into 10 bytes in a
      packed struct, this is what was done.  I now
      think this was a mistake.  Reserving the ABI size
      for an x86 long double field even in a packed
      struct makes things more uniform: the ABI size is
      now always used when reserving space for a type.
      This means that developers are less likely to
      make mistakes.  It also makes life easier for the
      CBE which otherwise could not represent all LLVM
      packed structs (PR2402).
      Front-end people might need to adjust the way
      they create LLVM structs - see following change
      to llvm-gcc.
      
      llvm-svn: 51928
      fc3c489b
  17. May 23, 2008
  18. May 16, 2008
  19. May 13, 2008
  20. Apr 06, 2008
  21. Feb 29, 2008
  22. Feb 10, 2008
  23. Jan 30, 2008
  24. Dec 29, 2007
  25. Nov 06, 2007
  26. Nov 05, 2007
  27. Nov 04, 2007
    • Duncan Sands's avatar
      Change uses of getTypeSize to getABITypeSize, getTypeStoreSize · 399d9798
      Duncan Sands authored
      or getTypeSizeInBits as appropriate in ScalarReplAggregates.
      The right change to make was not always obvious, so it would
      be good to have an sroa guru review this.  While there I noticed
      some bugs, and fixed them: (1) arrays of x86 long double have
      holes due to alignment padding, but this wasn't being spotted
      by HasStructPadding (renamed to HasPadding).  The same goes
      for arrays of oddly sized ints.  Vectors also suffer from this,
      in fact the problem for vectors is much worse because basic
      vector assumptions seem to be broken by vectors of type with
      alignment padding.   I didn't try to fix any of these vector
      problems.  (2) The code for extracting smaller integers from
      larger ones (in the "int union" case) was wrong on big-endian
      machines for integers with size not a multiple of 8, like i1.
      Probably this is impossible to hit via llvm-gcc, but I fixed
      it anyway while there and added a testcase.  I also got rid of
      some trailing whitespace and changed a function name which
      had an obvious typo in it.
      
      llvm-svn: 43672
      399d9798
  28. Sep 28, 2007
  29. Sep 04, 2007
    • David Greene's avatar
      · c656cbb8
      David Greene authored
      Update GEP constructors to use an iterator interface to fix
      GLIBCXX_DEBUG issues.
      
      llvm-svn: 41697
      c656cbb8
Loading