Remove some bad unlikely annotations found by -Wmisexpect

Using a profile from server_bench
This commit is contained in:
2024-11-20 19:06:50 -08:00
parent 5e975f3b2b
commit 0df2db7f8a

View File

@@ -3228,7 +3228,7 @@ template <class NodeT> void iter(Job *job, Context *context) {
if (n->partialKeyLen > 0) {
int commonLen = std::min<int>(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<NodeT>(job, context);
@@ -3261,7 +3261,7 @@ template <class NodeT> 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 <class NodeT> 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);
}