clang  19.0.0git
SemaRISCV.h
Go to the documentation of this file.
1 //===----- SemaRISCV.h ---- RISC-V target-specific routines ---*- 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 /// \file
9 /// This file declares semantic analysis functions specific to RISC-V.
10 ///
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_CLANG_SEMA_SEMARISCV_H
14 #define LLVM_CLANG_SEMA_SEMARISCV_H
15 
16 #include "clang/AST/DeclBase.h"
17 #include "clang/AST/Expr.h"
18 #include "clang/AST/Type.h"
20 #include "clang/Basic/TargetInfo.h"
22 #include "clang/Sema/SemaBase.h"
23 #include "llvm/ADT/StringMap.h"
24 #include <memory>
25 
26 namespace clang {
27 class SemaRISCV : public SemaBase {
28 public:
29  SemaRISCV(Sema &S);
30 
31  bool CheckLMUL(CallExpr *TheCall, unsigned ArgNum);
32  bool CheckBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID,
33  CallExpr *TheCall);
35  const llvm::StringMap<bool> &FeatureMap);
36 
37  bool isValidRVVBitcast(QualType srcType, QualType destType);
38 
39  /// Indicate RISC-V vector builtin functions enabled or not.
40  bool DeclareRVVBuiltins = false;
41 
42  /// Indicate RISC-V SiFive vector builtin functions enabled or not.
44 
45  std::unique_ptr<sema::RISCVIntrinsicManager> IntrinsicManager;
46 };
47 
48 std::unique_ptr<sema::RISCVIntrinsicManager>
50 } // namespace clang
51 
52 #endif // LLVM_CLANG_SEMA_SEMARISCV_H
SourceLocation Loc
Definition: SemaObjC.cpp:755
Defines the clang::SourceLocation class and associated facilities.
C Language Family Type Representation.
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition: Expr.h:2872
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:86
A (possibly-)qualified type.
Definition: Type.h:940
bool CheckBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall)
Definition: SemaRISCV.cpp:557
bool CheckLMUL(CallExpr *TheCall, unsigned ArgNum)
Definition: SemaRISCV.cpp:507
std::unique_ptr< sema::RISCVIntrinsicManager > IntrinsicManager
Definition: SemaRISCV.h:45
bool DeclareSiFiveVectorBuiltins
Indicate RISC-V SiFive vector builtin functions enabled or not.
Definition: SemaRISCV.h:43
SemaRISCV(Sema &S)
Definition: SemaRISCV.cpp:1425
void checkRVVTypeSupport(QualType Ty, SourceLocation Loc, Decl *D, const llvm::StringMap< bool > &FeatureMap)
Definition: SemaRISCV.cpp:1372
bool isValidRVVBitcast(QualType srcType, QualType destType)
Are the two types RVV-bitcast-compatible types? I.e.
Definition: SemaRISCV.cpp:1410
bool DeclareRVVBuiltins
Indicate RISC-V vector builtin functions enabled or not.
Definition: SemaRISCV.h:40
Sema - This implements semantic analysis and AST building for C.
Definition: Sema.h:462
Encodes a location in the source.
Exposes information about the current target.
Definition: TargetInfo.h:218
Defines the clang::TargetInfo interface.
The JSON file list parser is used to communicate input to InstallAPI.
std::unique_ptr< sema::RISCVIntrinsicManager > CreateRISCVIntrinsicManager(Sema &S)
Definition: SemaRISCV.cpp:503