This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Encode `omp [...] assume[...]` assumptions with `omp[x]` prefix
ClosedPublic

Authored by jdoerfert on Jul 13 2021, 1:39 PM.

Details

Summary

Since these assumptions are coming from OpenMP it makes sense to mark
them as such in the generic IR encoding. Standardized assumptions will
be named

omp_ASSUMPTION_NAME

and extensions will be named

ompx_ASSUMPTION_NAME

which is the OpenMP 5.2 syntax for "extensions" of any kind.

This also matches what the OpenMP-Opt pass expects.

Summarized,

#pragma omp [...] assume[s] no_parallelism

now generates the same IR assumption annotation as

__attribute__((assume("omp_no_parallelism")))

Diff Detail

Event Timeline

jdoerfert created this revision.Jul 13 2021, 1:39 PM
jdoerfert requested review of this revision.Jul 13 2021, 1:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 13 2021, 1:39 PM
jdoerfert updated this revision to Diff 358502.Jul 13 2021, 8:43 PM

Fix lifetime problem, update one more test

jhuber6 accepted this revision.Aug 30 2021, 4:55 PM

LGTM

This revision is now accepted and ready to land.Aug 30 2021, 4:55 PM
This revision was landed with ongoing or failed builds.Sep 10 2021, 10:09 AM
This revision was automatically updated to reflect the committed changes.