The runtime contains various cases of functions and variables/members
hat are not used or which seem to be overly complicated. This patch
points two such cases out so we can remove them later on (with the
appropriate changes in the code generation).
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Unit tests: pass. 61134 tests passed, 0 failed and 728 were skipped.
clang-tidy: fail. Please fix clang-tidy findings.
clang-format: pass.
Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
openmp/runtime/src/kmp.h | ||
---|---|---|
2122 | This does look strange. Am I right in thinking that the two instances of the union are both used, one for the priority field and the other used for the destructors field? I haven't checked the corresponding codegen in clang. |
I'll look into how much work versioning for this type is, especially after we do not expose it to the frontends anymore.
openmp/runtime/src/kmp.h | ||
---|---|---|
2122 | That is basically how I understand this as well. None, one, or both can be used, depending if you have a priority and/or destructors. |
openmp/runtime/src/kmp.h | ||
---|---|---|
2245 | It's at least used by OMPT to identify an undeferred task. |
openmp/runtime/src/kmp.h | ||
---|---|---|
2245 | I think it is only written here: // Detachable tasks are not proxy tasks yet but could be in the future. Doing // the tasking setup // when that happens is too late. if (flags->proxy == TASK_PROXY || flags->detachable == TASK_DETACHABLE) { if (flags->proxy == TASK_PROXY) { flags->tiedness = TASK_UNTIED; flags->merged_if0 = 1; } Couldn't you use the above conditions to replace merged_if0 ? |
The value merged_if0 is initialized in __kmp_task_alloc from the flags argument:
https://github.com/llvm/llvm-project/blob/master/openmp/runtime/src/kmp_tasking.cpp#L1287
openmp/runtime/src/kmp.h | ||
---|---|---|
2245 | Ok, I checked the OMPT code again. The flag is actually used to signal ompt_task_mergeable. So I agree, we can remove this flag from my perspective. |
clang-tidy: error: 'kmp_config.h' file not found [clang-diagnostic-error]