Page MenuHomePhabricator

[OpenMP] Add function attribute for triggering data sharing.
ClosedPublic

Authored by gtbercea on Dec 12 2017, 11:02 AM.

Details

Summary

The backend should only emit data sharing code for the cases where it is needed.
A new function attribute is used by Clang to enable data sharing only for the cases where OpenMP semantics require it and there are variables that need to be shared.

Diff Detail

Repository
rL LLVM

Event Timeline

gtbercea created this revision.Dec 12 2017, 11:02 AM
ABataev added inline comments.Dec 12 2017, 11:04 AM
test/OpenMP/nvptx_data_sharing.cpp
25–43

Not a good idea to use exact values as attributes, use macros instead.

gtbercea marked an inline comment as done.Dec 12 2017, 11:45 AM
This revision is now accepted and ready to land.Dec 12 2017, 11:48 AM
This revision was automatically updated to reflect the committed changes.