[all-commits] [llvm/llvm-project] 4ad727: [flang] CUDA Fortran - part 1/5: parsing
Peter Klausler via All-commits
all-commits at lists.llvm.org
Wed May 31 09:49:14 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4ad7279392653c0bcf564799ffb3f7e20ed4ef00
https://github.com/llvm/llvm-project/commit/4ad7279392653c0bcf564799ffb3f7e20ed4ef00
Author: Peter Klausler <pklausler at nvidia.com>
Date: 2023-05-31 (Wed, 31 May 2023)
Changed paths:
M flang/docs/ParserCombinators.md
M flang/include/flang/Common/Fortran-features.h
M flang/include/flang/Common/Fortran.h
M flang/include/flang/Common/indirection.h
M flang/include/flang/Common/template.h
M flang/include/flang/Frontend/FrontendOptions.h
M flang/include/flang/Parser/dump-parse-tree.h
M flang/include/flang/Parser/message.h
M flang/include/flang/Parser/parse-tree-visitor.h
M flang/include/flang/Parser/parse-tree.h
M flang/lib/Common/Fortran.cpp
M flang/lib/Frontend/FrontendAction.cpp
M flang/lib/Frontend/FrontendOptions.cpp
M flang/lib/Lower/Allocatable.cpp
M flang/lib/Lower/Bridge.cpp
M flang/lib/Lower/PFTBuilder.cpp
M flang/lib/Parser/Fortran-parsers.cpp
M flang/lib/Parser/basic-parsers.h
M flang/lib/Parser/executable-parsers.cpp
M flang/lib/Parser/io-parsers.cpp
M flang/lib/Parser/misc-parsers.h
M flang/lib/Parser/parse-tree.cpp
M flang/lib/Parser/parsing.cpp
M flang/lib/Parser/preprocessor.cpp
M flang/lib/Parser/prescan.cpp
M flang/lib/Parser/program-parsers.cpp
M flang/lib/Parser/stmt-parser.h
M flang/lib/Parser/unparse.cpp
M flang/lib/Semantics/check-allocate.cpp
M flang/lib/Semantics/check-do-forall.cpp
M flang/lib/Semantics/expression.cpp
M flang/lib/Semantics/resolve-names.cpp
M flang/lib/Semantics/tools.cpp
A flang/test/Parser/cuf-sanity-common
A flang/test/Parser/cuf-sanity-tree.CUF
A flang/test/Parser/cuf-sanity-unparse.CUF
M flang/test/lib/lit.local.cfg
M flang/test/lit.cfg.py
Log Message:
-----------
[flang] CUDA Fortran - part 1/5: parsing
Begin upstreaming of CUDA Fortran support in LLVM Flang.
This first patch implements parsing for CUDA Fortran syntax,
including:
- a new LanguageFeature enum value for CUDA Fortran
- driver change to enable that feature for *.cuf and *.CUF source files
- parse tree representation of CUDA Fortran syntax
- dumping and unparsing of the parse tree
- the actual parsers for CUDA Fortran syntax
- prescanning support for !@CUF and !$CUF
- basic sanity testing via unparsing and parse tree dumps
... along with any minimized changes elsewhere to make these
work, mostly no-op cases in common::visitors instances in
semantics and lowering to allow them to compile in the face
of new types in variant<> instances in the parse tree.
Because CUDA Fortran allows the kernel launch chevron syntax
("call foo<<<blocks, threads>>>()") only on CALL statements and
not on function references, the parse tree nodes for CallStmt,
FunctionReference, and their shared Call were rearranged a bit;
this caused a fair amount of one-line changes in many files.
More patches will follow that implement CUDA Fortran in the symbol
table and name resolution, and then semantic checking.
Differential Revision: https://reviews.llvm.org/D150159
More information about the All-commits
mailing list