Skip to content
  1. May 18, 2011
  2. May 14, 2011
  3. Apr 29, 2011
  4. Apr 14, 2011
    • Chris Lattner's avatar
      rework FoldBranchToCommonDest to exit earlier when there is a bonus · fba5cdfc
      Chris Lattner authored
      instruction around, reducing work.
      
      Greatly simplify handling of debug instructions.  There is no need to
      build up a vector of them and then move them into the one predecessor
      if we're processing a block.  Instead just rescan the block and *copy*
      them into the pred.  If a block gets merged into multiple preds, this
      will retain more debug info.
      
      llvm-svn: 129502
      fba5cdfc
  5. Apr 12, 2011
  6. Apr 08, 2011
  7. Apr 07, 2011
  8. Mar 30, 2011
  9. Mar 15, 2011
  10. Mar 09, 2011
  11. Feb 28, 2011
  12. Feb 25, 2011
  13. Feb 24, 2011
  14. Feb 07, 2011
  15. Feb 03, 2011
  16. Feb 02, 2011
    • Benjamin Kramer's avatar
      SimplifyCFG: Turn switches into sub+icmp+branch if possible. · f4ea1d5f
      Benjamin Kramer authored
      This makes the job of the later optzn passes easier, allowing the vast amount of
      icmp transforms to chew on it.
      
      We transform 840 switches in gcc.c, leading to a 16k byte shrink of the resulting
      binary on i386-linux.
      
      The testcase from README.txt now compiles into
        decl  %edi
        cmpl  $3, %edi
        sbbl  %eax, %eax
        andl  $1, %eax
        ret
      
      llvm-svn: 124724
      f4ea1d5f
  17. Jan 29, 2011
  18. Jan 28, 2011
  19. Jan 11, 2011
  20. Dec 18, 2010
  21. Dec 17, 2010
    • Benjamin Kramer's avatar
      e5f49c4f
    • Chris Lattner's avatar
      improve switch formation to handle small range · d14b0f1d
      Chris Lattner authored
      comparisons formed by comparisons.  For example,
      this:
      
      void foo(unsigned x) {
        if (x == 0 || x == 1 || x == 3 || x == 4 || x == 6) 
          bar();
      }
      
      compiles into:
      
      _foo:                                   ## @foo
      ## BB#0:                                ## %entry
      	cmpl	$6, %edi
      	ja	LBB0_2
      ## BB#1:                                ## %entry
      	movl	%edi, %eax
      	movl	$91, %ecx
      	btq	%rax, %rcx
      	jb	LBB0_3
      
      instead of:
      
      _foo:                                   ## @foo
      ## BB#0:                                ## %entry
      	cmpl	$2, %edi
      	jb	LBB0_4
      ## BB#1:                                ## %switch.early.test
      	cmpl	$6, %edi
      	ja	LBB0_3
      ## BB#2:                                ## %switch.early.test
      	movl	%edi, %eax
      	movl	$88, %ecx
      	btq	%rax, %rcx
      	jb	LBB0_4
      
      This catches a bunch of cases in GCC, which look like this:
      
       %804 = load i32* @which_alternative, align 4, !tbaa !0
       %805 = icmp ult i32 %804, 2
       %806 = icmp eq i32 %804, 3
       %or.cond121 = or i1 %805, %806
       %807 = icmp eq i32 %804, 4
       %or.cond124 = or i1 %or.cond121, %807
       br i1 %or.cond124, label %.thread, label %808
      
      turning this into a range comparison.
      
      llvm-svn: 122045
      d14b0f1d
  22. Dec 15, 2010
  23. Dec 14, 2010
Loading