Use avx512f across entire checkRangeRead call tree
All checks were successful
Tests / Clang total: 1776, passed: 1776
Clang |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap:
Tests / SIMD fallback total: 1776, passed: 1776
Tests / 32-bit versions total: 1776, passed: 1776
Tests / Release [gcc] total: 1776, passed: 1776
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap:
Tests / Release [gcc,aarch64] total: 1327, passed: 1327
Tests / Coverage total: 1333, passed: 1333
Code Coverage #### Project Overview No changes detected, that affect the code coverage. * Line Coverage: 97.99% (1510/1541) * Branch Coverage: 64.60% (1405/2175) * Complexity Density: 0.00% * Lines of Code: 1541 #### Quality Gates Summary Output truncated.
weaselab/conflict-set/pipeline/head This commit looks good

Keeping the avx fallback
This commit is contained in:
2024-07-01 13:07:34 -07:00
parent 1f421e95ff
commit bb84792cff

View File

@@ -1907,9 +1907,9 @@ bool scan16(const InternalVersionT *vs, const uint8_t *is, int begin, int end,
// //
// always_inline So that we can optimize when begin or end is a constant. // always_inline So that we can optimize when begin or end is a constant.
template <bool kAVX512> template <bool kAVX512>
inline __attribute((always_inline)) bool scan16(const InternalVersionT *vs, inline __attribute__((always_inline)) bool
int begin, int end, scan16(const InternalVersionT *vs, int begin, int end,
InternalVersionT readVersion) { InternalVersionT readVersion) {
assert(0 <= begin && begin < 16); assert(0 <= begin && begin < 16);
assert(0 <= end && end <= 16); assert(0 <= end && end <= 16);
assert(begin <= end); assert(begin <= end);
@@ -2512,6 +2512,33 @@ bool checkRangeReadImpl(Node *n, std::span<const uint8_t> begin,
return checkRangeLeftSide.ok & checkRangeRightSide.ok; return checkRangeLeftSide.ok & checkRangeRightSide.ok;
} }
#ifdef __x86_64__
// Explicitly instantiate with target avx512f attribute so the compiler can
// inline compare16_32bit_avx512, and generally use avx512f within more
// functions
template __attribute__((target("avx512f"))) bool
scan16<true>(const InternalVersionT *vs, const uint8_t *is, int begin, int end,
InternalVersionT readVersion);
template __attribute__((always_inline, target("avx512f"))) bool
scan16<true>(const InternalVersionT *vs, int begin, int end,
InternalVersionT readVersion);
template __attribute__((target("avx512f"))) bool
checkMaxBetweenExclusive<true>(Node *n, int begin, int end,
InternalVersionT readVersion);
template __attribute__((target("avx512f"))) bool
checkRangeStartsWith<true>(Node *n, std::span<const uint8_t> key, int begin,
int end, InternalVersionT readVersion,
ConflictSet::Impl *impl);
template __attribute__((target("avx512f"))) bool
CheckRangeLeftSide<true>::step();
template __attribute__((target("avx512f"))) bool
CheckRangeRightSide<true>::step();
template __attribute__((target("avx512f"))) bool
checkRangeReadImpl<true>(Node *n, std::span<const uint8_t> begin,
std::span<const uint8_t> end,
InternalVersionT readVersion, ConflictSet::Impl *impl);
#endif
#if defined(__SANITIZE_THREAD__) || !defined(__x86_64__) #if defined(__SANITIZE_THREAD__) || !defined(__x86_64__)
bool checkRangeRead(Node *n, std::span<const uint8_t> begin, bool checkRangeRead(Node *n, std::span<const uint8_t> begin,
std::span<const uint8_t> end, InternalVersionT readVersion, std::span<const uint8_t> end, InternalVersionT readVersion,