This is an archive of the discontinued LLVM Phabricator instance.

[flang][openacc] Skeleton for OpenACC construct lowering
ClosedPublic

Authored by clementval on Jul 20 2020, 1:31 PM.

Details

Summary

This patch introduce the basic infrastructure to be able to lower
OpenACC constructs to the future OpenACC dialect.

Diff Detail

Event Timeline

clementval created this revision.Jul 20 2020, 1:31 PM
Herald added a project: Restricted Project. · View Herald Transcript
clementval added a project: Restricted Project.Jul 20 2020, 1:31 PM

Format in test

SouraVX added inline comments.
flang/include/flang/Lower/OpenACC.h
2

Nit: OpenACC Directives ?

flang/lib/Lower/OpenACC.cpp
2

Same Nit: OpenACC ?

clementval marked 4 inline comments as done.

Address comments

flang/include/flang/Lower/OpenACC.h
2

Yes this should be OpenACC directives. Just updated.

flang/lib/Lower/OpenACC.cpp
2

Also updated

ichoyjx added inline comments.
flang/include/flang/Lower/PFTBuilder.h
135

We may need EndLoopDirective for OpenACC also because for combined constructs, the end * loop is optional.

flang/test/Lower/pre-fir-tree05.f90
29

What is the second <<End OpenACCConstruct>> here?

clementval marked 2 inline comments as done.Jul 21 2020, 6:52 PM
clementval added inline comments.
flang/include/flang/Lower/PFTBuilder.h
135

Right we might add a OpenACCEndCombinedDirective. Since it is not in the current parser, do you mind if we had this in a follow up patch together with the parsing part and some parsing tests?

flang/test/Lower/pre-fir-tree05.f90
29

That's the end of the loop block. Similar to pre-fir-tree03.f90 this is output for the !$omp do on line 32 check at line 41.

ichoyjx accepted this revision.Jul 22 2020, 12:39 PM
This revision is now accepted and ready to land.Jul 22 2020, 12:39 PM
This revision was automatically updated to reflect the committed changes.
schweitz added inline comments.Jul 23 2020, 8:42 AM
flang/include/flang/Lower/OpenACC.h
9

We've been adding a comment to all the files in Lower that they are following the MLIR coding conventions as a reminder.

clementval marked 2 inline comments as done.Jul 23 2020, 11:12 AM
clementval added inline comments.
flang/include/flang/Lower/OpenACC.h
9

I have seen that in other file but wasn't sure if I should add it or not. I'll push a commit with this as a NFC.