Skip to content
  1. Sep 13, 2011
  2. Sep 12, 2011
  3. Jul 18, 2011
  4. Jul 15, 2011
  5. Jun 28, 2011
  6. May 22, 2011
  7. May 04, 2011
  8. Mar 14, 2011
  9. Mar 07, 2011
  10. Feb 21, 2011
  11. Feb 19, 2011
    • Chris Lattner's avatar
      rewrite the memset_pattern pattern generation stuff to accept any 2/4/8/16-byte · 72a35fb9
      Chris Lattner authored
      constant, including globals.  This makes us generate much more "pretty" pattern
      globals as well because it doesn't break it down to an array of bytes all the
      time.
      
      This enables us to handle stores of relocatable globals.  This kicks in about
      48 times in 254.gap, giving us stuff like this:
      
      @.memset_pattern40 = internal constant [2 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*] [%struct.TypHeader* (%struct.TypHeader*, %struct
      .TypHeader*)* @IsFalse, %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)* @IsFalse], align 16
      
      ...
        call void @memset_pattern16(i8* %scevgep5859, i8* bitcast ([2 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]* @.memset_pattern40 to i8*
      ), i64 %tmp75) nounwind
      
      llvm-svn: 126044
      72a35fb9
    • Chris Lattner's avatar
      Implement rdar://9009151, transforming strided loop stores of · 0f4a6401
      Chris Lattner authored
      unsplatable values into memset_pattern16 when it is available
      (recent darwins).  This transforms lots of strided loop stores
      of ints for example, like 5 in vpr:
      
        Formed memset:   call void @memset_pattern16(i8* %4, i8* getelementptr inbounds ([16 x i8]* @.memset_pattern9, i32 0, i32 0), i64 %tmp25)
          from store to: {%3,+,4}<%11> at:   store i32 3, i32* %scevgep, align 4, !tbaa !4
      
      llvm-svn: 126040
      0f4a6401
  12. Feb 18, 2011
  13. Feb 15, 2011
  14. Jan 04, 2011
  15. Jan 03, 2011
  16. Jan 02, 2011
  17. Jan 01, 2011
  18. Dec 28, 2010
  19. Dec 27, 2010
    • Chris Lattner's avatar
      fix some issues Frits noticed, add AliasAnalysis as a dependency · cb18bfa3
      Chris Lattner authored
      llvm-svn: 122585
      cb18bfa3
    • Chris Lattner's avatar
      have loop-idiom nuke instructions that feed stores that get removed. · b9fe685b
      Chris Lattner authored
      llvm-svn: 122574
      b9fe685b
    • Chris Lattner's avatar
      implement enough of the memset inference algorithm to recognize and insert · 29e14edc
      Chris Lattner authored
      memsets.  This is still missing one important validity check, but this is enough
      to compile stuff like this:
      
      void test0(std::vector<char> &X) {
        for (std::vector<char>::iterator I = X.begin(), E = X.end(); I != E; ++I)
          *I = 0;
      }
      
      void test1(std::vector<int> &X) {
        for (long i = 0, e = X.size(); i != e; ++i)
          X[i] = 0x01010101;
      }
      
      With:
       $ clang t.cpp -S -o - -O2 -emit-llvm | opt -loop-idiom | opt -O3 | llc 
      
      to:
      
      __Z5test0RSt6vectorIcSaIcEE:            ## @_Z5test0RSt6vectorIcSaIcEE
      ## BB#0:                                ## %entry
      	subq	$8, %rsp
      	movq	(%rdi), %rax
      	movq	8(%rdi), %rsi
      	cmpq	%rsi, %rax
      	je	LBB0_2
      ## BB#1:                                ## %bb.nph
      	subq	%rax, %rsi
      	movq	%rax, %rdi
      	callq	___bzero
      LBB0_2:                                 ## %for.end
      	addq	$8, %rsp
      	ret
      ...
      __Z5test1RSt6vectorIiSaIiEE:            ## @_Z5test1RSt6vectorIiSaIiEE
      ## BB#0:                                ## %entry
      	subq	$8, %rsp
      	movq	(%rdi), %rax
      	movq	8(%rdi), %rdx
      	subq	%rax, %rdx
      	cmpq	$4, %rdx
      	jb	LBB1_2
      ## BB#1:                                ## %for.body.preheader
      	andq	$-4, %rdx
      	movl	$1, %esi
      	movq	%rax, %rdi
      	callq	_memset
      LBB1_2:                                 ## %for.end
      	addq	$8, %rsp
      	ret
      
      llvm-svn: 122573
      29e14edc
  20. Dec 26, 2010
Loading