Need to emit memory barriers upon enter/exit to/from critical region to
prevent code movement.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Event Timeline
Comment Actions
I rather doubt. The main problem with the critical directive that load/stores should not be moved out of the region (they all should be executed in the critical region context, just like atomics). For single and master it should be fine.
Comment Actions
I believe, the issue is caused by the new attributes for kmpc_critical/kmpc_end_critical functions. They are marked as InaccessibleMemOrArgMemOnly functions. Previously they did not have this attribute and optimizer did not move the code across these function calls.
clang-format suggested style edits found: