Require musttail and preserve_none for interleaved
This commit is contained in:
@@ -3183,6 +3183,12 @@ Node *firstGeqPhysical(Node *n, const TrivialSpan key) {
|
||||
#define PRESERVE_NONE
|
||||
#endif
|
||||
|
||||
#if __has_attribute(musttail) && __has_attribute(preserve_none)
|
||||
constexpr bool kEnableInterleaved = true;
|
||||
#else
|
||||
constexpr bool kEnableInterleaved = false;
|
||||
#endif
|
||||
|
||||
namespace check {
|
||||
|
||||
typedef PRESERVE_NONE void (*Continuation)(struct Job *, struct Context *);
|
||||
@@ -4969,7 +4975,7 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
||||
check::Context context;
|
||||
context.readContext.impl = this;
|
||||
|
||||
#if __has_attribute(musttail)
|
||||
if constexpr (kEnableInterleaved) {
|
||||
if (count == 1) {
|
||||
useSequential(reads, result, count, context);
|
||||
} else {
|
||||
@@ -4995,8 +5001,8 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
||||
inProgress[0].prev = inProgress + started - 1;
|
||||
inProgress[started - 1].next = inProgress;
|
||||
|
||||
// Kick off the sequence of tail calls that finally returns once all jobs
|
||||
// are done
|
||||
// Kick off the sequence of tail calls that finally returns once all
|
||||
// jobs are done
|
||||
inProgress->continuation(inProgress, &context);
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -5009,10 +5015,9 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
||||
assert(context.readContext == context2.readContext);
|
||||
#endif
|
||||
}
|
||||
|
||||
#else
|
||||
} else {
|
||||
useSequential(reads, result, count, context);
|
||||
#endif
|
||||
}
|
||||
|
||||
for (int i = 0; i < count; ++i) {
|
||||
assert(reads[i].readVersion >= 0);
|
||||
@@ -5186,11 +5191,6 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
||||
assert(allPointWrites || sorted);
|
||||
#endif
|
||||
|
||||
#if __has_attribute(musttail)
|
||||
constexpr bool kEnableInterleaved = true;
|
||||
#else
|
||||
constexpr bool kEnableInterleaved = false;
|
||||
#endif
|
||||
if (kEnableInterleaved && count > 1) {
|
||||
interleavedWrites(writes, count, InternalVersionT(writeVersion));
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user