Skip to content
  1. Oct 21, 2009
    • Chris Lattner's avatar
      make GVN work better when TD is not around: · 8ed7bef4
      Chris Lattner authored
      "In the existing code, if the load and the value to replace it with are
      of different types *and* target data is available, it tries to use the
      target data to coerce the replacement value to the type of the load.
      Otherwise, it skips all effort to handle the type mismatch and just
      feeds the wrongly-typed replacement value to replaceAllUsesWith, which
      triggers an assertion.
      
      The patch replaces it with an outer if checking for type mismatch, and
      an inner if-else that checks whether target data is available and, if
      not, returns false rather than trying to replace the load."
      
      Patch by Kenneth Uildriks!
      
      llvm-svn: 84739
      8ed7bef4
    • Devang Patel's avatar
      Do not remove dead metadata for now. · 1d7f7d21
      Devang Patel authored
      llvm-svn: 84731
      1d7f7d21
  2. Oct 20, 2009
  3. Oct 19, 2009
  4. Oct 18, 2009
  5. Oct 17, 2009
  6. Oct 16, 2009
  7. 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
  8. Oct 14, 2009
  9. Oct 13, 2009
  10. Oct 12, 2009
Loading