3 Commits

Author SHA1 Message Date
f8bf1c6eb4 Remove unreachable code
Some checks failed
Tests / Clang total: 1130, passed: 1130
Clang |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap:
Tests / SIMD fallback total: 1130, passed: 1130
Tests / Release [gcc] total: 1130, passed: 1130
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap:
Tests / Release [gcc,aarch64] total: 844, passed: 844
Tests / Coverage total: 848, passed: 848
weaselab/conflict-set/pipeline/head There was a failure building this commit
2024-06-26 22:14:27 -07:00
4da2a01614 Use single &, to show branch-free intent 2024-06-26 22:14:05 -07:00
bb0e654040 Fix missed update for Node48::maxOfMax 2024-06-26 22:11:33 -07:00

View File

@@ -1365,6 +1365,10 @@ Node *erase(Node *self, NodeAllocators *allocators, ConflictSet::Impl *impl,
if (toRemoveChildrenIndex != lastChildrenIndex) {
parent48->children[toRemoveChildrenIndex] =
parent48->children[lastChildrenIndex];
parent48->maxOfMax[toRemoveChildrenIndex >> Node48::kMaxOfMaxShift] =
std::max(parent48->maxOfMax[toRemoveChildrenIndex >>
Node48::kMaxOfMaxShift],
parent48->children[toRemoveChildrenIndex].childMaxVersion);
auto parentIndex =
parent48->children[toRemoveChildrenIndex].child->parentsIndex;
parent48->index[parentIndex] = toRemoveChildrenIndex;
@@ -1726,7 +1730,7 @@ bool checkMaxBetweenExclusive(Node *n, int begin, int end,
if (self->maxOfMax[i] > readVersion) {
for (int j = 0; j < Node48::kMaxOfMaxPageSize; ++j) {
int k = (i << Node48::kMaxOfMaxShift) + j;
result &= !(self->children[k].childMaxVersion > readVersion &&
result &= !((self->children[k].childMaxVersion > readVersion) &
inBounds(self->reverseIndex[k]));
}
}
@@ -1771,7 +1775,6 @@ bool checkMaxBetweenExclusive(Node *n, int begin, int end,
default: // GCOVR_EXCL_LINE
__builtin_unreachable(); // GCOVR_EXCL_LINE
}
return true;
}
Vector<uint8_t> getSearchPath(Arena &arena, Node *n) {