Skip to content
  1. Nov 11, 2012
    • Meador Inge's avatar
      instcombine: Migrate memcmp optimizations · 4d2827c1
      Meador Inge authored
      This patch migrates the memcmp optimizations from the simplify-libcalls
      pass into the instcombine library call simplifier.
      
      llvm-svn: 167683
      4d2827c1
    • Meador Inge's avatar
      instcombine: Migrate strstr optimizations · 56edbc93
      Meador Inge authored
      This patch migrates the strstr optimizations from the simplify-libcalls
      pass into the instcombine library call simplifier.
      
      llvm-svn: 167682
      56edbc93
    • Meador Inge's avatar
      Add method for replacing instructions to LibCallSimplifier · 76fc1a47
      Meador Inge authored
      In some cases the library call simplifier may need to replace instructions
      other than the library call being simplified.  In those cases it may be
      necessary for clients of the simplifier to override how the replacements
      are actually done.  As such, a new overrideable method for replacing
      instructions was added to LibCallSimplifier.
      
      A new subclass of LibCallSimplifier is also defined which overrides
      the instruction replacement method.  This is because the instruction
      combiner defines its own replacement method which updates the worklist
      when instructions are replaced.
      
      llvm-svn: 167681
      76fc1a47
  2. Nov 10, 2012
  3. Nov 08, 2012
  4. Nov 01, 2012
    • Chandler Carruth's avatar
      Revert the series of commits starting with r166578 which introduced the · 7ec5085e
      Chandler Carruth authored
      getIntPtrType support for multiple address spaces via a pointer type,
      and also introduced a crasher bug in the constant folder reported in
      PR14233.
      
      These commits also contained several problems that should really be
      addressed before they are re-committed. I have avoided reverting various
      cleanups to the DataLayout APIs that are reasonable to have moving
      forward in order to reduce the amount of churn, and minimize the number
      of commits that were reverted. I've also manually updated merge
      conflicts and manually arranged for the getIntPtrType function to stay
      in DataLayout and to be defined in a plausible way after this revert.
      
      Thanks to Duncan for working through this exact strategy with me, and
      Nick Lewycky for tracking down the really annoying crasher this
      triggered. (Test case to follow in its own commit.)
      
      After discussing with Duncan extensively, and based on a note from
      Micah, I'm going to continue to back out some more of the more
      problematic patches in this series in order to ensure we go into the
      LLVM 3.2 branch with a reasonable story here. I'll send a note to
      llvmdev explaining what's going on and why.
      
      Summary of reverted revisions:
      
      r166634: Fix a compiler warning with an unused variable.
      r166607: Add some cleanup to the DataLayout changes requested by
               Chandler.
      r166596: Revert "Back out r166591, not sure why this made it through
               since I cancelled the command. Bleh, sorry about this!
      r166591: Delete a directory that wasn't supposed to be checked in yet.
      r166578: Add in support for getIntPtrType to get the pointer type based
               on the address space.
      llvm-svn: 167221
      7ec5085e
  5. Oct 31, 2012
    • Meador Inge's avatar
      instcombine: Migrate strto* optimizations · 05a625a0
      Meador Inge authored
      This patch migrates the strto* optimizations from the simplify-libcalls
      pass into the instcombine library call simplifier.
      
      llvm-svn: 167119
      05a625a0
    • Meador Inge's avatar
      instcombine: Migrate strpbrk optimizations · 6f8e0112
      Meador Inge authored
      This patch migrates the strpbrk optimizations from the simplify-libcalls
      pass into the instcombine library call simplifier.
      
      llvm-svn: 167105
      6f8e0112
    • Meador Inge's avatar
      instcombine: Migrate strlen optimizations · d589ac62
      Meador Inge authored
      This patch migrates the strlen optimizations from the simplify-libcalls
      pass into the instcombine library call simplifier.
      
      llvm-svn: 167103
      d589ac62
    • Meador Inge's avatar
      instcombine: Migrate strncpy optimizations · 067294b3
      Meador Inge authored
      This patch migrates the strncpy optimizations from the simplify-libcalls
      pass into the instcombine library call simplifier.
      
      llvm-svn: 167102
      067294b3
    • Meador Inge's avatar
      instcombine: Migrate stpcpy optimizations · 9a6a1905
      Meador Inge authored
      This patch migrates the stpcpy optimizations from the simplify-libcalls
      pass into the instcombine library call simplifier.  Note that the
      __stpcpy_chk simplifications were migrated in a previous commit.
      
      llvm-svn: 167083
      9a6a1905
    • Meador Inge's avatar
      instcombine: Split out the __stpcpy_chk simplifications from StrCpyChkOpt · cdb2ca54
      Meador Inge authored
      r166198 migrated the strcpy optimization to instcombine.  The strcpy
      simplifier that was migrated from Transforms/Scalar/SimplifyLibCalls.cpp
      was also doing some __strcpy_chk simplifications.  Those fortified
      simplifications were migrated as well, but introduced a bug in the
      __stpcpy_chk simplifier in the process.  This happened because the
      __strcpy_chk and __stpcpy_chk simplifiers were both mapped to StrCpyChkOpt
      which was updated with simplifications that worked for __strcpy_chk, but
      not __stpcpy_chk.
      
      This patch fixes the problem by adding proper test coverage and creating a
      new simplifier for __stpcpy_chk (instead of sharing one with __strcpy_chk).
      
      llvm-svn: 167082
      cdb2ca54
  6. Oct 24, 2012
  7. Oct 18, 2012
    • Meador Inge's avatar
      2332615f
    • Meador Inge's avatar
      instcombine: Migrate strcpy optimizations · 000dbccf
      Meador Inge authored
      This patch migrates the strcpy optimizations from the simplify-libcalls pass
      into the instcombine library call simplifier.  Note also that StrCpyChkOpt
      has been updated with a few simplifications that were being done in the
      simplify-libcalls version of StrCpyOpt, but not in the migrated implementation
      of StrCpyOpt.  There is no reason to overload StrCpyOpt with fortified and
      regular simplifications in the new model since there is already a dedicated
      simplifier for __strcpy_chk.
      
      llvm-svn: 166198
      000dbccf
  8. Oct 15, 2012
  9. Oct 13, 2012
Loading