FLANG
check-cuda.h
1//===-- lib/Semantics/check-cuda.h ------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef FORTRAN_SEMANTICS_CHECK_CUDA_H_
10#define FORTRAN_SEMANTICS_CHECK_CUDA_H_
11
12#include "flang/Semantics/semantics.h"
13#include <list>
14
15namespace Fortran::parser {
16struct Program;
17class Messages;
18struct Name;
19class CharBlock;
20struct AssignmentStmt;
21struct ExecutionPartConstruct;
22struct ExecutableConstruct;
23struct ActionStmt;
24struct IfConstruct;
25struct CUFKernelDoConstruct;
26struct SubroutineSubprogram;
27struct FunctionSubprogram;
28struct SeparateModuleSubprogram;
29} // namespace Fortran::parser
30
31namespace Fortran::semantics {
32
33class SemanticsContext;
34
35class CUDAChecker : public virtual BaseChecker {
36public:
37 explicit CUDAChecker(SemanticsContext &c) : context_{c} {}
38 void Enter(const parser::SubroutineSubprogram &);
39 void Enter(const parser::FunctionSubprogram &);
40 void Enter(const parser::SeparateModuleSubprogram &);
41 void Enter(const parser::CUFKernelDoConstruct &);
42 void Leave(const parser::CUFKernelDoConstruct &);
43 void Enter(const parser::AssignmentStmt &);
44
45private:
46 SemanticsContext &context_;
47 bool inCUFKernelDoConstruct_ = false;
48};
49
50bool CanonicalizeCUDA(parser::Program &);
51
52} // namespace Fortran::semantics
53
54#endif // FORTRAN_SEMANTICS_CHECK_CUDA_H_
Definition: check-cuda.h:35
Definition: semantics.h:67
Definition: check-expression.h:19
Definition: parse-tree.h:2016
Definition: parse-tree.h:5071
Definition: parse-tree.h:3298
Definition: parse-tree.h:3324
Definition: parse-tree.h:3308
Definition: semantics.h:367