Skip to content

Conversation

klausler
Copy link
Contributor

This patch avoids a trip through the work queue engine for cases on a CPU where finalization and destruction actions during assignment were handled without enqueueing another task.

This patch avoids a trip through the work queue engine for cases
on a CPU where finalization and destruction actions during assignment
were handled without enqueueing another task.
Copy link
Contributor

@akuhlens akuhlens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

if (mustDeallocateLHS) {
// Convert the LHS into a temporary, then make it look deallocated.
toDeallocate_ = &tempDescriptor_.descriptor();
persist_ = true; // tempDescriptor_ state must outlive child tickets
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The general idea here is that by delaying conditionally setting persist, we can avoid persisting the allocation under some conditions and avoid the overhead of a trip through the work queue in those cases, correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, it was being set unconditionally, so it would be true even when the child task was run immediately as BeginDestroy or whatever, and that caused a later no-op suspension and resumption.

@klausler klausler merged commit 97a8476 into llvm:main Jul 18, 2025
10 checks passed
@klausler klausler deleted the faster-wq branch July 18, 2025 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants