This is an archive of the discontinued LLVM Phabricator instance.

[HIP] Diagnose -fopenmp-targets for HIP programs
ClosedPublic

Authored by yaxunl on Sep 13 2021, 12:58 PM.

Details

Summary

Diagnose -fopenmp-targets for HIP programs since dual HIP and OpenMP offloading in the same compilation
is currently not supported by HIP toolchain.

Diff Detail

Event Timeline

yaxunl created this revision.Sep 13 2021, 12:58 PM
yaxunl requested review of this revision.Sep 13 2021, 12:58 PM
tra added inline comments.Sep 13 2021, 1:58 PM
clang/lib/Driver/Driver.cpp
704

I think "unsupported" here is a bit misleading. We need something along the lines of "option X can't be used with option Y".

I think err_drv_argument_not_allowed_with might be a better choice.

yaxunl added inline comments.Sep 14 2021, 8:28 AM
clang/lib/Driver/Driver.cpp
704

That is for two conflicting options. However, HIP may be specified by input file extension instead of -x option. Another issue is that this is unsupported option for HIP, not option argument.

How about

unsupported option '%1' for HIP language mode

tra added inline comments.Sep 14 2021, 8:51 AM
clang/lib/Driver/Driver.cpp
704

SGTM.

yaxunl updated this revision to Diff 372495.Sep 14 2021, 8:59 AM

revise diag message

tra accepted this revision.Sep 14 2021, 9:03 AM
This revision is now accepted and ready to land.Sep 14 2021, 9:03 AM
This revision was landed with ongoing or failed builds.Sep 15 2021, 10:05 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 15 2021, 10:05 AM