This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Add Module metadata for OpenMP compilation
ClosedPublic

Authored by jhuber6 on May 12 2021, 1:12 PM.

Details

Summary

This patch adds a module level metadata flag indicating that the module
was compiled with the -fopenmp flag. This will make it easier for
passes like OpenMPOpt to determine if it should be run.

Diff Detail

Event Timeline

jhuber6 created this revision.May 12 2021, 1:12 PM
jhuber6 requested review of this revision.May 12 2021, 1:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 12 2021, 1:12 PM

tests missing.

jhuber6 updated this revision to Diff 354324.Jun 24 2021, 11:46 AM

Addings tests and a module flag for openmp target devices.

This revision is now accepted and ready to land.Jun 24 2021, 2:42 PM
jdoerfert added inline comments.Jun 24 2021, 2:43 PM
clang/lib/CodeGen/CodeGenModule.cpp
705

Why do we need OpenMPRuntime in the conditional?

jhuber6 added inline comments.Jun 24 2021, 2:45 PM
clang/lib/CodeGen/CodeGenModule.cpp
705

Probably don't explicitly need it, I'll remove it.

jhuber6 updated this revision to Diff 354368.Jun 24 2021, 3:02 PM

Removing runtime check.

This revision was landed with ongoing or failed builds.Jun 25 2021, 1:35 PM
This revision was automatically updated to reflect the committed changes.