This is an archive of the discontinued LLVM Phabricator instance.

[flang][openacc] Lower acc declare link for module variable
ClosedPublic

Authored by clementval on Jul 27 2023, 10:56 AM.

Details

Summary

This patch adds support to lower the link clause on OpenACC
declare construct in module declaration.

Depends on D156463

Diff Detail

Event Timeline

clementval created this revision.Jul 27 2023, 10:56 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 27 2023, 10:56 AM
clementval requested review of this revision.Jul 27 2023, 10:56 AM
razvanlupusoru accepted this revision.Jul 27 2023, 11:58 AM

This change looks great to me. Just one small question about error reporting to ensure that the unsupported clause case here is already properly reported by frontend.

flang/lib/Lower/OpenACC.cpp
2450

Do you know if we already inform user of the following limitation from spec:
"In a Fortran module declaration section, only create, copyin, device_resident, and link clauses are allowed."
If yes, then this error here as-is is fine. Since the frontend will already catch and report proper info.

This revision is now accepted and ready to land.Jul 27 2023, 11:58 AM
clementval added inline comments.Jul 27 2023, 12:33 PM
flang/lib/Lower/OpenACC.cpp
2450

Yes, we have a semantic check for that.

This revision was landed with ongoing or failed builds.Jul 27 2023, 1:04 PM
This revision was automatically updated to reflect the committed changes.