Michael Zolotukhin
d5c7271167
Remove redundant includes from lib/Transforms.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320628 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-13 21:31:01 +00:00
Clement Courbet
4ccf677f27
[CodeGen][ExpandMemcmp] Allow memcmp to expand to vector loads (2).
...
- Targets that want to support memcmp expansions now return the list of
supported load sizes.
- Expansion codegen does not assume that all power-of-two load sizes
smaller than the max load size are valid. For examples, this is not the
case for x86(32bit)+sse2.
Fixes PR34887.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316905 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-30 14:19:33 +00:00
Eugene Zelenko
0dfe884a45
[Transforms] Revert r316630 changes in Scalar/MergeICmps.cpp to fix broken build bots (NFC).
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316634 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-26 01:25:14 +00:00
Eugene Zelenko
46057fe01a
[Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316630 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-26 00:55:39 +00:00
Clement Courbet
cdaf07d82e
Re-land "[MergeICmps] Disable mergeicmps if the target does not want to handle memcmp expansion."
...
(fixed stability issues)
This reverts commit d6492333d3b478a1d88163315002022f8d5e58dc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315281 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-10 08:00:45 +00:00
Clement Courbet
d51f64169e
Revert "[MergeICmps] Disable mergeicmps if the target does not want to handle memcmp expansion."
...
Still a few stability issues on windows.
This reverts commit 67e3db9bc121ba244e20337aabc7cf341a62b545.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315058 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-06 13:02:24 +00:00
Clement Courbet
13426d53c5
Re-land "[MergeICmps] Disable mergeicmps if the target does not want to handle memcmp expansion."
...
(fixed unit tests by making comparisons stable)
This reverts commit 1b2d359ce256fd6737da4e93833346a0bd6d7583.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315056 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-06 12:12:35 +00:00
Clement Courbet
a9a80eaeee
Revert "Re-land "[MergeICmps] Disable mergeicmps if the target does not want to handle memcmp expansion."""
...
broken test on windows
This reverts commit c91479518344fd1fc071c5bd5848f6eb83e53dca.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314985 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-05 14:42:06 +00:00
Clement Courbet
f7ceddc7e6
Re-land "[MergeICmps] Disable mergeicmps if the target does not want to handle memcmp expansion.""
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314980 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-05 12:39:57 +00:00
Clement Courbet
bdbb17febd
Revert "[MergeICmps] Disable mergeicmps if the target does not want to handle memcmp expansion."
...
Breaks
clang-stage1-cmake-RA-incremental/llvm/test/Transforms/MergeICmps/X86/tuple-four-int8.ll
This reverts commit 3038c459d67f8898ffa295d54a013b280690abfa.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314972 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-05 08:03:39 +00:00
Clement Courbet
17f5bd1520
[MergeICmps] Disable mergeicmps if the target does not want to handle memcmp expansion.
...
Summary: This is to avoid e.g. merging two cheap icmps if the target is not going to expand to something nice later.
Reviewers: dberlin, spatel
Subscribers: davide, nemanjai
Differential Revision: https://reviews.llvm.org/D38232
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314970 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-05 07:49:09 +00:00
Clement Courbet
c0d3fd047b
[NFC] clang-format lib/Transforms/Scalar/MergeICmps.cpp
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314906 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-04 15:13:52 +00:00
Clement Courbet
50c7531ed4
[MergeICmps] Fix build of rL312315 on clang-with-thin-lto-windows:
...
MergeICmps.cpp(68,15): error: chosen constructor is explicit in copy-initialization
return {};
APInt.h(339,12): note: explicit constructor declared here
explicit APInt() : BitWidth(1) { U.VAL = 0; }
^
MergeICmps.cpp(56,9): note: in implicit initialization of field 'Offset' with omitted
initializer
APInt Offset;
^
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312326 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 11:51:23 +00:00
Clement Courbet
4855d2de9a
Reland rL312315: [MergeICmps] MergeICmps is a new optimization pass that turns chains of integer
...
Add missing header.
This reverts commit 86dd6335cf7607af22f383a9a8e072ba929848cf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312322 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 10:56:34 +00:00
Clement Courbet
1a4fd5c74c
Revert "[MergeICmps] MergeICmps is a new optimization pass that turns chains of integer"
...
Break build
This reverts commit d07ab866f7f88f81e49046d691a80dcd32d7198b.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312317 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 09:43:08 +00:00
Clement Courbet
930b028c65
[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
2017-09-01 09:07:05 +00:00