This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Introduce more fine-grained control over the thread state use
ClosedPublic

Authored by jdoerfert on Jul 19 2022, 12:36 PM.

Details

Summary

We can help optimizations by making sure we use the team state whenever
it is clear there is no thread state. To this end we introduce a new
state flag (state::HasThreadState) and explicit control for the
state::ValueRAII helpers, including a dedicated "assert equal".

Diff Detail

Event Timeline

jdoerfert created this revision.Jul 19 2022, 12:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 19 2022, 12:36 PM
jdoerfert requested review of this revision.Jul 19 2022, 12:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 19 2022, 12:36 PM
Herald added a subscriber: sstefan1. · View Herald Transcript
tianshilei1992 accepted this revision.Jul 19 2022, 4:29 PM

generally looks good. For HasThreadState, there are a couple of mixed uses of true/false and 1/0. I'd stick with one.

This revision is now accepted and ready to land.Jul 19 2022, 4:29 PM
This revision was landed with ongoing or failed builds.Jul 21 2022, 10:41 AM
This revision was automatically updated to reflect the committed changes.