clang  15.0.0git
Classes | Typedefs | Enumerations | Functions | Variables
clang::RISCV Namespace Reference

RISCV builtins. More...

Classes

struct  LMULType
 
struct  PrototypeDescriptor
 
class  RVVIntrinsic
 
class  RVVType
 

Typedefs

using VScaleVal = llvm::Optional< unsigned >
 
using RVVTypePtr = RVVType *
 
using RVVTypes = std::vector< RVVTypePtr >
 
using RISCVPredefinedMacroT = uint8_t
 

Enumerations

enum  { LastTIBuiltin = clang::Builtin::FirstTSBuiltin - 1, FirstRVVBuiltin = clang::Builtin::FirstTSBuiltin, LastRVVBuiltin = RISCVVector::FirstTSBuiltin - 1, LastTSBuiltin }
 
enum  VectorTypeModifier : uint8_t {
  VectorTypeModifier::NoModifier, VectorTypeModifier::Widening2XVector, VectorTypeModifier::Widening4XVector, VectorTypeModifier::Widening8XVector,
  VectorTypeModifier::MaskVector, VectorTypeModifier::Log2EEW3, VectorTypeModifier::Log2EEW4, VectorTypeModifier::Log2EEW5,
  VectorTypeModifier::Log2EEW6, VectorTypeModifier::FixedSEW8, VectorTypeModifier::FixedSEW16, VectorTypeModifier::FixedSEW32,
  VectorTypeModifier::FixedSEW64, VectorTypeModifier::LFixedLog2LMULN3, VectorTypeModifier::LFixedLog2LMULN2, VectorTypeModifier::LFixedLog2LMULN1,
  VectorTypeModifier::LFixedLog2LMUL0, VectorTypeModifier::LFixedLog2LMUL1, VectorTypeModifier::LFixedLog2LMUL2, VectorTypeModifier::LFixedLog2LMUL3,
  VectorTypeModifier::SFixedLog2LMULN3, VectorTypeModifier::SFixedLog2LMULN2, VectorTypeModifier::SFixedLog2LMULN1, VectorTypeModifier::SFixedLog2LMUL0,
  VectorTypeModifier::SFixedLog2LMUL1, VectorTypeModifier::SFixedLog2LMUL2, VectorTypeModifier::SFixedLog2LMUL3
}
 
enum  BaseTypeModifier : uint8_t {
  Invalid, BaseTypeModifier::Scalar, BaseTypeModifier::Vector, Void,
  BaseTypeModifier::SizeT, BaseTypeModifier::Ptrdiff, UnsignedLong, SignedLong
}
 
enum  TypeModifier : uint8_t {
  TypeModifier::NoModifier = 0, TypeModifier::Pointer = 1 << 0, TypeModifier::Const = 1 << 1, TypeModifier::Immediate = 1 << 2,
  UnsignedInteger = 1 << 3, SignedInteger = 1 << 4, Float = 1 << 5, TypeModifier::LMUL1 = 1 << 6,
  TypeModifier::MaxOffset = 6, TypeModifier::LLVM_MARK_AS_BITMASK_ENUM =(LMUL1)
}
 
enum  BasicType : uint8_t {
  BasicType::Unknown = 0, BasicType::Int8 = 1 << 0, BasicType::Int16 = 1 << 1, BasicType::Int32 = 1 << 2,
  BasicType::Int64 = 1 << 3, BasicType::Float16 = 1 << 4, BasicType::Float32 = 1 << 5, BasicType::Float64 = 1 << 6,
  BasicType::MaxOffset = 6, BasicType::LLVM_MARK_AS_BITMASK_ENUM =(Float64)
}
 
enum  ScalarTypeKind : uint8_t {
  Void, Void, Size_t, Ptrdiff_t,
  UnsignedLong, UnsignedLong, SignedLong, SignedLong,
  Boolean, SignedInteger, SignedInteger = 1 << 4, UnsignedInteger,
  UnsignedInteger = 1 << 3, Float, Float = 1 << 5, Invalid,
  Invalid
}
 
enum  RISCVPredefinedMacro : RISCVPredefinedMacroT {
  Basic = 0, V = 1 << 1, Zvfh = 1 << 2, RV64 = 1 << 3,
  VectorMaxELen64 = 1 << 4, VectorMaxELenFp32 = 1 << 5, VectorMaxELenFp64 = 1 << 6
}
 
enum  PolicyScheme : uint8_t { SchemeNone, HasPassthruOperand, HasPolicyOperand }
 

Functions

llvm::SmallVector< PrototypeDescriptorparsePrototypes (llvm::StringRef Prototypes)
 
static uint64_t computeRVVTypeHashValue (BasicType BT, int Log2LMUL, PrototypeDescriptor Proto)
 
SmallVector< PrototypeDescriptorparsePrototypes (StringRef Prototypes)
 

Variables

static std::unordered_map< uint64_t, RVVTypeLegalTypes
 
static std::set< uint64_t > IllegalTypes
 

Detailed Description

RISCV builtins.

Typedef Documentation

◆ RISCVPredefinedMacroT

using clang::RISCV::RISCVPredefinedMacroT = typedef uint8_t

Definition at line 264 of file RISCVVIntrinsicUtils.h.

◆ RVVTypePtr

using clang::RISCV::RVVTypePtr = typedef RVVType *

Definition at line 162 of file RISCVVIntrinsicUtils.h.

◆ RVVTypes

using clang::RISCV::RVVTypes = typedef std::vector<RVVTypePtr>

Definition at line 163 of file RISCVVIntrinsicUtils.h.

◆ VScaleVal

Definition at line 24 of file RISCVVIntrinsicUtils.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
LastTIBuiltin 
FirstRVVBuiltin 
LastRVVBuiltin 
LastTSBuiltin 

Definition at line 143 of file TargetBuiltins.h.

◆ BaseTypeModifier

enum clang::RISCV::BaseTypeModifier : uint8_t
strong
Enumerator
Invalid 
Scalar 
Vector 
Void 
SizeT 
Ptrdiff 
UnsignedLong 
SignedLong 

Definition at line 59 of file RISCVVIntrinsicUtils.h.

◆ BasicType

enum clang::RISCV::BasicType : uint8_t
strong
Enumerator
Unknown 
Int8 
Int16 
Int32 
Int64 
Float16 
Float32 
Float64 
MaxOffset 
LLVM_MARK_AS_BITMASK_ENUM 

Definition at line 124 of file RISCVVIntrinsicUtils.h.

◆ PolicyScheme

Enumerator
SchemeNone 
HasPassthruOperand 
HasPolicyOperand 

Definition at line 276 of file RISCVVIntrinsicUtils.h.

◆ RISCVPredefinedMacro

Enumerator
Basic 
Zvfh 
RV64 
VectorMaxELen64 
VectorMaxELenFp32 
VectorMaxELenFp64 

Definition at line 266 of file RISCVVIntrinsicUtils.h.

◆ ScalarTypeKind

Enumerator
Void 
Void 
Size_t 
Ptrdiff_t 
UnsignedLong 
UnsignedLong 
SignedLong 
SignedLong 
Boolean 
SignedInteger 
SignedInteger 
UnsignedInteger 
UnsignedInteger 
Float 
Float 
Invalid 
Invalid 

Definition at line 138 of file RISCVVIntrinsicUtils.h.

◆ TypeModifier

enum clang::RISCV::TypeModifier : uint8_t
strong
Enumerator
NoModifier 
Pointer 
Const 
Immediate 
UnsignedInteger 
SignedInteger 
Float 
LMUL1 
MaxOffset 
LLVM_MARK_AS_BITMASK_ENUM 

Definition at line 71 of file RISCVVIntrinsicUtils.h.

◆ VectorTypeModifier

enum clang::RISCV::VectorTypeModifier : uint8_t
strong
Enumerator
NoModifier 
Widening2XVector 
Widening4XVector 
Widening8XVector 
MaskVector 
Log2EEW3 
Log2EEW4 
Log2EEW5 
Log2EEW6 
FixedSEW8 
FixedSEW16 
FixedSEW32 
FixedSEW64 
LFixedLog2LMULN3 
LFixedLog2LMULN2 
LFixedLog2LMULN1 
LFixedLog2LMUL0 
LFixedLog2LMUL1 
LFixedLog2LMUL2 
LFixedLog2LMUL3 
SFixedLog2LMULN3 
SFixedLog2LMULN2 
SFixedLog2LMULN1 
SFixedLog2LMUL0 
SFixedLog2LMUL1 
SFixedLog2LMUL2 
SFixedLog2LMUL3 

Definition at line 27 of file RISCVVIntrinsicUtils.h.

Function Documentation

◆ computeRVVTypeHashValue()

static uint64_t clang::RISCV::computeRVVTypeHashValue ( BasicType  BT,
int  Log2LMUL,
PrototypeDescriptor  Proto 
)
static

◆ parsePrototypes() [1/2]

llvm::SmallVector<PrototypeDescriptor> clang::RISCV::parsePrototypes ( llvm::StringRef  Prototypes)

◆ parsePrototypes() [2/2]

SmallVector<PrototypeDescriptor> clang::RISCV::parsePrototypes ( StringRef  Prototypes)

Variable Documentation

◆ IllegalTypes

std::set<uint64_t> clang::RISCV::IllegalTypes
static

Definition at line 36 of file RISCVVIntrinsicUtils.cpp.

Referenced by clang::RISCV::RVVType::computeType().

◆ LegalTypes

std::unordered_map<uint64_t, RVVType> clang::RISCV::LegalTypes
static

Definition at line 35 of file RISCVVIntrinsicUtils.cpp.

Referenced by clang::RISCV::RVVType::computeType().