From 0df2db7f8ad1baac01c531035c5326795497a80c Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Wed, 20 Nov 2024 19:06:50 -0800 Subject: [PATCH] Remove some bad unlikely annotations found by -Wmisexpect Using a profile from server_bench --- ConflictSet.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ConflictSet.cpp b/ConflictSet.cpp index 8640ab4..9804a44 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -3228,7 +3228,7 @@ template void iter(Job *job, Context *context) { if (n->partialKeyLen > 0) { int commonLen = std::min(n->partialKeyLen, job->begin.size()); int i = longestCommonPrefix(n->partialKey(), job->begin.data(), commonLen); - if (i < commonLen) [[unlikely]] { + if (i < commonLen) { auto c = n->partialKey()[i] <=> job->begin[i]; if (c > 0) { MUSTTAIL return down_left_spine(job, context); @@ -3261,7 +3261,7 @@ template void iter(Job *job, Context *context) { ++context->readContext.point_read_iterations_accum; - if (job->begin.size() == 0) [[unlikely]] { + if (job->begin.size() == 0) { if (n->entryPresent) { job->setResult(n->entry.pointVersion <= job->readVersion); MUSTTAIL return complete(job, context); @@ -3275,7 +3275,7 @@ template void iter(Job *job, Context *context) { auto [taggedChild, maxV] = getChildAndMaxVersion(n, job->begin[0]); job->maxV = maxV; Node *child = taggedChild; - if (child == nullptr) [[unlikely]] { + if (child == nullptr) { auto c = getChildGeq(n, job->begin[0]); if (c != nullptr) { job->n = c; @@ -4074,7 +4074,7 @@ void pointIter(Job *job, Context *context) { n->childMaxVersion[job->childIndex] = context->writeVersion; } - if (job->remaining.size() == 0) [[unlikely]] { + if (job->remaining.size() == 0) { *job->result = {job->n, job->remaining}; MUSTTAIL return complete(job, context); }