This is an archive of the discontinued LLVM Phabricator instance.

[flang] CUDA Fortran - part 5/5: statement semantics
ClosedPublic

Authored by klausler on May 8 2023, 5:09 PM.

Details

Summary

Canonicalize !$CUF KERNEL DO loop nests, similar to OpenACC/OpenMP
canonicalization. Check statements and expressions in device contexts
for usage that isn't supported. Add more tests, and include some
tweaks to standard modules needed to build CUDA Fortran modules.

Depends on https://reviews.llvm.org/D150159,
https://reviews.llvm.org/D150161, https://reviews.llvm.org/D150162, &
https://reviews.llvm.org/D150163.

Diff Detail

Event Timeline

klausler created this revision.May 8 2023, 5:09 PM
Herald added a project: Restricted Project. · View Herald Transcript
klausler requested review of this revision.May 8 2023, 5:09 PM
klausler updated this revision to Diff 520540.May 8 2023, 5:16 PM

Remove redundantly added tests.

klausler updated this revision to Diff 520844.May 9 2023, 3:34 PM

Rebase and correct some CI problems.

klausler updated this revision to Diff 521026.May 10 2023, 10:10 AM

Update after rebasing.

klausler updated this revision to Diff 521364.May 11 2023, 10:31 AM

Attempt to work around a bogus MSVC compilation error that seems to have been exposed by this change.

This revision is now accepted and ready to land.May 11 2023, 3:40 PM
klausler updated this revision to Diff 523558.May 18 2023, 2:18 PM

Rebase to current head.

klausler updated this revision to Diff 526749.May 30 2023, 12:55 PM

Rebase to current head.

tschuett added inline comments.
flang/include/flang/Evaluate/traverse.h
250

This looks odd.

flang/include/flang/Parser/tools.h
149

Again.

klausler updated this revision to Diff 527206.May 31 2023, 2:53 PM

Rebase to main.

klausler updated this revision to Diff 527219.May 31 2023, 3:43 PM

Get more output from FileCheck to debug failure in CI testing that doesn't fail for me here.

klausler updated this revision to Diff 527235.May 31 2023, 4:40 PM

Confirm suspected Clang 16 bug with std::functional and lambda, and test workaround.

klausler updated this revision to Diff 527246.May 31 2023, 5:30 PM

Try again to work around likely bug in Clang-16 build compiler.

klausler updated this revision to Diff 527501.Jun 1 2023, 10:50 AM

Fix clang build problem (analyzed and resolved locally).

klausler updated this revision to Diff 527549.Jun 1 2023, 11:57 AM

Rebase and tweak a brittle new test. Builds locally with clang-16, fingers crossed for windows.

This revision was automatically updated to reflect the committed changes.
tschuett added inline comments.Jun 1 2023, 11:58 PM
flang/include/flang/Parser/tools.h
175

Result is an using optional. Why braces?

183

stud:nullopt?

201

And more.