1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
llvm-mirror/lib/Transforms
Clement Courbet 4f713f8431 [SelectionDAG] Allow the user to specify a memeq function.
Summary:
Right now, when we encounter a string equality check,
e.g. `if (memcmp(a, b, s) == 0)`, we try to expand to a comparison if `s` is a
small compile-time constant, and fall back on calling `memcmp()` else.

This is sub-optimal because memcmp has to compute much more than
equality.

This patch replaces `memcmp(a, b, s) == 0` by `bcmp(a, b, s) == 0` on platforms
that support `bcmp`.

`bcmp` can be made much more efficient than `memcmp` because equality
compare is trivially parallel while lexicographic ordering has a chain
dependency.

Subscribers: fedor.sergeev, jyknight, ckennelly, gchatelet, llvm-commits

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

llvm-svn: 355672
2019-03-08 09:07:45 +00:00
..
AggressiveInstCombine Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Coroutines [opaque pointer types] Pass value type to LoadInst creation. 2019-02-01 20:44:24 +00:00
Hello Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstCombine [InstCombine] Fold add nsw + sadd.with.overflow 2019-03-06 18:30:00 +00:00
Instrumentation [msan] Instrument x86 BMI intrinsics. 2019-03-04 22:58:20 +00:00
IPO [PGO] Context sensitive PGO (part 3) 2019-03-04 20:21:27 +00:00
ObjCARC [opaque pointer types] Pass function type for CallBase::setCalledFunction. 2019-02-01 20:44:54 +00:00
Scalar [LSR] Attempt to increase the accuracy of LSR's setup cost 2019-03-07 13:44:40 +00:00
Utils [SelectionDAG] Allow the user to specify a memeq function. 2019-03-08 09:07:45 +00:00
Vectorize Hide two unused debugging methods, NFCI. 2019-03-01 17:15:21 +00:00
CMakeLists.txt Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00