This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Adding InaccessibleMemOnly and InaccessibleMemOrArgMemOnly for runtime calls.
ClosedPublic

Authored by sstefan1 on Feb 22 2020, 5:56 AM.

Diff Detail

Event Timeline

sstefan1 created this revision.Feb 22 2020, 5:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 22 2020, 5:56 AM

Thx! I'll ask more people to look at the barrier/flush stuff to make sure my suggestion wrt. inacc+argmemonly was correct.
The ones I would also love to see are the worksharing loop functions (end with _init_4, _fini etc.). Maybe we should do those and the getters/setters separate to speed things up.

llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
277

I will have to think about the barrier and flush ones.

278

Where did this one go?

sstefan1 marked an inline comment as done.Feb 22 2020, 10:32 AM

Thx! I'll ask more people to look at the barrier/flush stuff to make sure my suggestion wrt. inacc+argmemonly was correct.
The ones I would also love to see are the worksharing loop functions (end with _init_4, _fini etc.). Maybe we should do those and the getters/setters separate to speed things up.

Sounds good.

llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
278

287

jdoerfert accepted this revision.Feb 25 2020, 11:02 PM

LGTM. We also need nounwind on all, willreturn on most, and nosync on some of them. Maybe define new __OMP_ATTRS_SET, e.g., for "synchronizing runtime calls" for "non-synchronizing runtime calls" ...

This revision is now accepted and ready to land.Feb 25 2020, 11:02 PM

Tests?

I didn't see any that tested this before. I guess I'll add some.

sstefan1 updated this revision to Diff 249695.Mar 11 2020, 11:18 AM

fix clang test

Herald added a project: Restricted Project. · View Herald TranscriptMar 11 2020, 11:18 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

I always thought there was a test for this, turns out I never committed it.
Since I did now (1c9c23d60ea7656174ad3d76293c2a90dd25e24f) you need to rebase and adjust it, sorry.

llvm/test/Transforms/OpenMP/parallel_deletion.ll
3

this test was created with utils/update_test_checks.py --function-signatures before the script was smart enough to encode that into the file directly. Can you rerun with the option please.

204

Use UTC_ARGS: -disable here and -enable below to keep the check lines even when the update script is run :)

sstefan1 updated this revision to Diff 250599.Mar 16 2020, 10:56 AM

more tests

couldn't get update_test_checks.py to update function signatures, even with the flag.

jdoerfert accepted this revision.Mar 19 2020, 3:32 PM

LGTM if the test all pass.

This revision was automatically updated to reflect the committed changes.