]> granicus.if.org Git - llvm/commit
[MergeICmps] MergeICmps is a new optimization pass that turns chains of integer
authorClement Courbet <courbet@google.com>
Fri, 1 Sep 2017 09:07:05 +0000 (09:07 +0000)
committerClement Courbet <courbet@google.com>
Fri, 1 Sep 2017 09:07:05 +0000 (09:07 +0000)
commit930b028c65350900f7b987958f8c3bc763860af2
tree18f84e570be314375525ab3a0fee92f35a76fab2
parent8481f03defd9a4c9f59a17124beff1732def8e9f
[MergeICmps] MergeICmps is a new optimization pass that turns chains of integer
comparisons into memcmp.

Thanks to recent improvements in the LLVM codegen, the memcmp is typically
inlined as a chain of efficient hardware comparisons.
This typically benefits C++ member or nonmember operator==().

For now this is disabled by default until:
 - https://bugs.llvm.org/show_bug.cgi?id=33329 is complete
 - Benchmarks show that this is always useful.

Differential Revision:
https://reviews.llvm.org/D33987

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312315 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/InitializePasses.h
include/llvm/LinkAllPasses.h
include/llvm/Transforms/Scalar.h
lib/CodeGen/TargetPassConfig.cpp
lib/Transforms/Scalar/CMakeLists.txt
lib/Transforms/Scalar/MergeICmps.cpp [new file with mode: 0644]
lib/Transforms/Scalar/Scalar.cpp
test/Transforms/MergeICmps/pair-int32-int32.ll [new file with mode: 0644]
test/Transforms/MergeICmps/tuple-four-int8.ll [new file with mode: 0644]
test/Transforms/MergeICmps/volatile.ll [new file with mode: 0644]