Skip to content
  1. May 09, 2005
  2. May 08, 2005
  3. May 07, 2005
  4. May 06, 2005
  5. May 05, 2005
  6. May 04, 2005
    • Chris Lattner's avatar
      Instcombine: cast (X != 0) to int, cast (X == 1) to int -> X iff X has only the low bit set. · 809dfac4
      Chris Lattner authored
      This implements set.ll:test20.
      
      This triggers 2x on povray, 9x on mesa, 11x on gcc, 2x on crafty, 1x on eon,
      6x on perlbmk and 11x on m88ksim.
      
      It allows us to compile these two functions into the same code:
      
      struct s { unsigned int bit : 1; };
      unsigned foo(struct s *p) {
        if (p->bit)
          return 1;
        else
          return 0;
      }
      unsigned bar(struct s *p) { return p->bit; }
      
      llvm-svn: 21690
      809dfac4
    • Reid Spencer's avatar
      Implement the IsDigitOptimization for simplifying calls to the isdigit · 282d0574
      Reid Spencer authored
      library function:
        isdigit(chr) -> 0 or 1 if chr is constant
        isdigit(chr) -> chr - '0' <= 9 otherwise
      
      Although there are many calls to isdigit in llvm-test, most of them are
      compiled away by macros leaving only this:
      
      2 MultiSource/Applications/hexxagon
      
      llvm-svn: 21688
      282d0574
    • Reid Spencer's avatar
      * Correct the function prototypes for some of the functions to match the · 1e520fd6
      Reid Spencer authored
        actual spec (int -> uint)
      * Add the ability to get/cache the strlen function prototype.
      * Make sure generated values are appropriately named for debugging purposes
      * Add the SPrintFOptimiation for 4 casts of sprintf optimization:
          sprintf(str,cstr) -> llvm.memcpy(str,cstr) (if cstr has no %)
          sprintf(str,"")   -> store sbyte 0, str
          sprintf(str,"%s",src) -> llvm.memcpy(str,src) (if src is constant)
          sprintf(str,"%c",chr) -> store chr, str   ; store sbyte 0, str+1
      
      The sprintf optimization didn't fire as much as I had hoped:
      
        2 MultiSource/Applications/SPASS
        5 MultiSource/Benchmarks/McCat/18-imp
       22 MultiSource/Benchmarks/Prolangs-C/TimberWolfMC
        1 MultiSource/Benchmarks/Prolangs-C/assembler
        6 MultiSource/Benchmarks/Prolangs-C/unix-smail
        2 MultiSource/Benchmarks/mediabench/mpeg2/mpeg2dec
      
      llvm-svn: 21679
      1e520fd6
  7. May 03, 2005
Loading