[llvm-commits] [PATCH 0/3] Start moving lib call simplifications to instcombine

Meador Inge meadori at codesourcery.com
Mon Oct 8 08:25:48 PDT 2012


Hi All,

This patch set is the first stage in migrating the library call simplication
optimizations from the simplify-libcalls pass to instcombine.  The general
outline of the migration was described before here [1].

The first patch implements the new LibCallSimplifier utility class and adds
the fortified library call simplifiers to the implementation.  This patch has
already been posted once [2] and the review feedback from Eric Christopher
has been fixed.  I also did some LLVM coding convention clean ups.

The second two patches migrate library call simplifier optimizations from
the old LibCallSimplifier class to the new one along with covering test cases.

My plan going forward is to migrate each optimization from the old
LibCallSimplifier class to the new one in the same manner as I have done
in patches 2 and 3.  After this patch series gets approved I will just
start committing the remaining migrations without waiting for an explicit
OK.

OK?

[1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-August/052283.html
[2] http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121001/152462.html

Meador Inge (3):
  Implement new LibCallSimplifier class
  instcombine: Migrate strcat and strncat optimizations
  instcombine: Migrate strchr and strrchr optimizations

 include/llvm/Transforms/Utils/SimplifyLibCalls.h   |   43 ++
 lib/Transforms/InstCombine/InstCombine.h           |    2 +
 lib/Transforms/InstCombine/InstCombineCalls.cpp    |   40 +-
 .../InstCombine/InstructionCombining.cpp           |    3 +
 lib/Transforms/Scalar/SimplifyLibCalls.cpp         |  191 --------
 lib/Transforms/Utils/CMakeLists.txt                |    1 +
 lib/Transforms/Utils/SimplifyLibCalls.cpp          |  481 ++++++++++++++++++++
 test/Transforms/InstCombine/strcat-1.ll            |   38 ++
 test/Transforms/InstCombine/strcat-2.ll            |   32 ++
 test/Transforms/InstCombine/strcat-3.ll            |   22 +
 test/Transforms/InstCombine/strchr-1.ll            |   54 +++
 test/Transforms/InstCombine/strchr-2.ll            |   21 +
 test/Transforms/InstCombine/strncat-1.ll           |   37 ++
 test/Transforms/InstCombine/strncat-2.ll           |   53 +++
 test/Transforms/InstCombine/strncat-3.ll           |   22 +
 test/Transforms/InstCombine/strrchr-1.ll           |   54 +++
 test/Transforms/InstCombine/strrchr-2.ll           |   21 +
 test/Transforms/SimplifyLibCalls/StrCat.ll         |   33 --
 test/Transforms/SimplifyLibCalls/StrChr.ll         |   26 --
 test/Transforms/SimplifyLibCalls/StrNCat.ll        |   31 --
 test/Transforms/SimplifyLibCalls/StrRChr.ll        |   23 -
 21 files changed, 888 insertions(+), 340 deletions(-)
 create mode 100644 include/llvm/Transforms/Utils/SimplifyLibCalls.h
 create mode 100644 lib/Transforms/Utils/SimplifyLibCalls.cpp
 create mode 100644 test/Transforms/InstCombine/strcat-1.ll
 create mode 100644 test/Transforms/InstCombine/strcat-2.ll
 create mode 100644 test/Transforms/InstCombine/strcat-3.ll
 create mode 100644 test/Transforms/InstCombine/strchr-1.ll
 create mode 100644 test/Transforms/InstCombine/strchr-2.ll
 create mode 100644 test/Transforms/InstCombine/strncat-1.ll
 create mode 100644 test/Transforms/InstCombine/strncat-2.ll
 create mode 100644 test/Transforms/InstCombine/strncat-3.ll
 create mode 100644 test/Transforms/InstCombine/strrchr-1.ll
 create mode 100644 test/Transforms/InstCombine/strrchr-2.ll
 delete mode 100644 test/Transforms/SimplifyLibCalls/StrCat.ll
 delete mode 100644 test/Transforms/SimplifyLibCalls/StrChr.ll
 delete mode 100644 test/Transforms/SimplifyLibCalls/StrNCat.ll
 delete mode 100644 test/Transforms/SimplifyLibCalls/StrRChr.ll

-- 
1.7.10.2 (Apple Git-33)




More information about the llvm-commits mailing list