This is an archive of the discontinued LLVM Phabricator instance.

[Clang][OpenMP] Monotonic does not apply to SIMD
ClosedPublic

Authored by huntergr on Jun 7 2021, 1:44 AM.

Details

Summary

The codegen for simd constructs was affected by the presence (or
absence) of the 'monotonic' schedule modifier for worksharing
loops. The modifier is only intended to apply to the scheduling of
chunks for a thread, not iterations of a loop inside a chunk.

In addition, the monotonic modifier was applied to worksharing loops
by default if no schedule clause was present; the referenced part of
the OpenMP 4.5 spec in the code (section 2.7.1) only applies if the
user specified a schedule clause with a static kind but no modifier.
Without a user-specified schedule clause we should default to
nonmonotonic scheduling.

Diff Detail

Event Timeline

huntergr created this revision.Jun 7 2021, 1:44 AM
huntergr requested review of this revision.Jun 7 2021, 1:44 AM
Herald added a project: Restricted Project. · View Herald Transcript

Apologies for not including more of the diff for context, but the test files are large enough that the full diff exceeds the maximum upload size.

This revision is now accepted and ready to land.Jun 17 2021, 6:58 AM
This revision was automatically updated to reflect the committed changes.