- Notifications
You must be signed in to change notification settings - Fork14.5k
[flang][runtime] Further work on speeding up work queue operations#149189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
This patch avoids a trip through the work queue engine for caseson a CPU where finalization and destruction actions during assignmentwere handled without enqueueing another task.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM
@@ -279,13 +279,15 @@ RT_API_ATTRS int AssignTicket::Begin(WorkQueue &workQueue) { | |||
if (mustDeallocateLHS) { | |||
// Convert the LHS into a temporary, then make it look deallocated. | |||
toDeallocate_ = &tempDescriptor_.descriptor(); | |||
persist_ = true; // tempDescriptor_ state must outlive child tickets |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 asBeginDestroy
or whatever, and that caused a later no-op suspension and resumption.
97a8476
intollvm:mainUh oh!
There was an error while loading.Please reload this page.
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.