Skip to content
  1. Oct 16, 2009
  2. Oct 15, 2009
    • Victor Hernandez's avatar
      Fix bug where array malloc with unexpected computation of the size argument... · 13020b1f
      Victor Hernandez authored
      Fix bug where array malloc with unexpected computation of the size argument resulted in MallocHelper 
      identifying the malloc as a non-array malloc.  This broke GlobalOpt's optimization of stores of mallocs 
      to global variables.
      
      The fix is to classify malloc's into 3 categories:
      1. non-array mallocs
      2. array mallocs whose array size can be determined
      3. mallocs that cannot be determined to be of type 1 or 2 and cannot be optimized
      
      getMallocArraySize() returns NULL for category 3, and all users of this function must avoid their 
      malloc optimization if this function returns NULL.
      
      Eventually, currently unexpected codegen for computing the malloc's size argument will be supported in
      isArrayMalloc() and getMallocArraySize(), extending malloc optimizations to those examples.
      
      llvm-svn: 84199
      13020b1f
    • Chris Lattner's avatar
      only try to fold constantexpr operands when the worklist is first populated, · c855b45b
      Chris Lattner authored
      don't bother every time going around the main worklist.  This speeds up a 
      release-asserts opt -std-compile-opts on 403.gcc by about 4% (1.5s).  It
      seems to speed up the most expensive instances of instcombine by ~10%.
      
      llvm-svn: 84171
      c855b45b
    • Chris Lattner's avatar
      don't bother calling ConstantFoldInstruction unless there is a use of the · dd1f68a1
      Chris Lattner authored
      instruction (which disqualifies stores, unreachable, etc) and at least the
      first operand is a constant.  This filters out a lot of obvious cases that
      can't be folded.  Also, switch the IRBuilder to a TargetFolder, which tries
      harder.
      
      llvm-svn: 84170
      dd1f68a1
  3. Oct 14, 2009
  4. Oct 13, 2009
  5. Oct 12, 2009
  6. Oct 11, 2009
Loading