clang 22.0.0git
Namespaces | Classes | Enumerations | Functions
cir Namespace Reference

Namespaces

namespace  acc
 
namespace  detail
 
namespace  direct
 

Classes

class  ABIArgInfo
 
class  CIRBaseBuilderTy
 
class  CIRDataLayout
 
class  CIRGenAction
 
class  CIRGenConsumer
 
class  CIRGenerator
 
class  EmitAssemblyAction
 
class  EmitBCAction
 
class  EmitCIRAction
 
class  EmitLLVMAction
 
class  EmitObjAction
 
struct  MissingFeatures
 

Enumerations

enum class  OverflowBehavior { None = 0 , NoSignedWrap = 1 << 0 , NoUnsignedWrap = 1 << 1 , Saturated = 1 << 2 }
 
enum  TypeEvaluationKind { TEK_Scalar , TEK_Complex , TEK_Aggregate }
 

Functions

mlir::LogicalResult runCIRToCIRPasses (mlir::ModuleOp theModule, mlir::MLIRContext &mlirCtx, clang::ASTContext &astCtx, bool enableVerifier, bool enableCIRSimplify)
 
constexpr OverflowBehavior operator| (OverflowBehavior a, OverflowBehavior b)
 
constexpr OverflowBehavior operator& (OverflowBehavior a, OverflowBehavior b)
 
constexpr OverflowBehavioroperator|= (OverflowBehavior &a, OverflowBehavior b)
 
constexpr OverflowBehavioroperator&= (OverflowBehavior &a, OverflowBehavior b)
 
void buildTerminatedBody (mlir::OpBuilder &builder, mlir::Location loc)
 
static bool isExternalLinkage (GlobalLinkageKind linkage)
 
static bool isAvailableExternallyLinkage (GlobalLinkageKind linkage)
 
static bool isLinkOnceAnyLinkage (GlobalLinkageKind linkage)
 
static bool isLinkOnceODRLinkage (GlobalLinkageKind linkage)
 
static bool isLinkOnceLinkage (GlobalLinkageKind linkage)
 
static bool isWeakAnyLinkage (GlobalLinkageKind linkage)
 
static bool isWeakODRLinkage (GlobalLinkageKind linkage)
 
static bool isWeakLinkage (GlobalLinkageKind linkage)
 
static bool isInternalLinkage (GlobalLinkageKind linkage)
 
static bool isPrivateLinkage (GlobalLinkageKind linkage)
 
static bool isLocalLinkage (GlobalLinkageKind linkage)
 
static bool isExternalWeakLinkage (GlobalLinkageKind linkage)
 
static LLVM_ATTRIBUTE_UNUSED bool isCommonLinkage (GlobalLinkageKind linkage)
 
static LLVM_ATTRIBUTE_UNUSED bool isValidDeclarationLinkage (GlobalLinkageKind linkage)
 
static LLVM_ATTRIBUTE_UNUSED bool isInterposableLinkage (GlobalLinkageKind linkage)
 Whether the definition of this global may be replaced by something non-equivalent at link time.
 
static LLVM_ATTRIBUTE_UNUSED bool isDiscardableIfUnused (GlobalLinkageKind linkage)
 Whether the definition of this global may be discarded if it is not used in its compilation unit.
 
static LLVM_ATTRIBUTE_UNUSED bool isWeakForLinker (GlobalLinkageKind linkage)
 Whether the definition of this global may be replaced at link time.
 
static LLVM_ATTRIBUTE_UNUSED bool isValidLinkage (GlobalLinkageKind gl)
 
bool operator< (cir::MemOrder, cir::MemOrder)=delete
 
bool operator> (cir::MemOrder, cir::MemOrder)=delete
 
bool operator<= (cir::MemOrder, cir::MemOrder)=delete
 
bool operator>= (cir::MemOrder, cir::MemOrder)=delete
 
template<typename Int >
bool isValidCIRAtomicOrderingCABI (Int value)
 
bool isValidFundamentalIntWidth (unsigned width)
 
bool isSized (mlir::Type ty)
 Returns true if the type is a CIR sized type.
 
static BackendAction getBackendActionFromOutputType (CIRGenAction::OutputType Action)
 
static std::unique_ptr< llvm::Module > lowerFromCIRToLLVMIR (mlir::ModuleOp MLIRModule, llvm::LLVMContext &LLVMCtx)
 

Enumeration Type Documentation

◆ OverflowBehavior

enum class cir::OverflowBehavior
strong
Enumerator
None 
NoSignedWrap 
NoUnsignedWrap 
Saturated 

Definition at line 27 of file CIRBaseBuilder.h.

◆ TypeEvaluationKind

Enumerator
TEK_Scalar 
TEK_Complex 
TEK_Aggregate 

Definition at line 17 of file TypeEvaluationKind.h.

Function Documentation

◆ buildTerminatedBody()

void cir::buildTerminatedBody ( mlir::OpBuilder &  builder,
mlir::Location  loc 
)

◆ getBackendActionFromOutputType()

static BackendAction cir::getBackendActionFromOutputType ( CIRGenAction::OutputType  Action)
static

◆ isAvailableExternallyLinkage()

static bool cir::isAvailableExternallyLinkage ( GlobalLinkageKind  linkage)
static

Definition at line 24 of file CIROpsEnums.h.

Referenced by isDiscardableIfUnused().

◆ isCommonLinkage()

static LLVM_ATTRIBUTE_UNUSED bool cir::isCommonLinkage ( GlobalLinkageKind  linkage)
static

Definition at line 57 of file CIROpsEnums.h.

◆ isDiscardableIfUnused()

static LLVM_ATTRIBUTE_UNUSED bool cir::isDiscardableIfUnused ( GlobalLinkageKind  linkage)
static

Whether the definition of this global may be discarded if it is not used in its compilation unit.

Definition at line 93 of file CIROpsEnums.h.

References isAvailableExternallyLinkage(), isLinkOnceLinkage(), and isLocalLinkage().

Referenced by getCIRGenToUse().

◆ isExternalLinkage()

static bool cir::isExternalLinkage ( GlobalLinkageKind  linkage)
static

Definition at line 21 of file CIROpsEnums.h.

Referenced by isValidDeclarationLinkage(), and isValidLinkage().

◆ isExternalWeakLinkage()

static bool cir::isExternalWeakLinkage ( GlobalLinkageKind  linkage)
static

Definition at line 54 of file CIROpsEnums.h.

Referenced by isValidDeclarationLinkage().

◆ isInternalLinkage()

static bool cir::isInternalLinkage ( GlobalLinkageKind  linkage)
static

Definition at line 45 of file CIROpsEnums.h.

Referenced by isLocalLinkage().

◆ isInterposableLinkage()

static LLVM_ATTRIBUTE_UNUSED bool cir::isInterposableLinkage ( GlobalLinkageKind  linkage)
static

Whether the definition of this global may be replaced by something non-equivalent at link time.

For example, if a function has weak linkage then the code defining it may be replaced by different code.

Definition at line 69 of file CIROpsEnums.h.

◆ isLinkOnceAnyLinkage()

static bool cir::isLinkOnceAnyLinkage ( GlobalLinkageKind  linkage)
static

Definition at line 27 of file CIROpsEnums.h.

Referenced by isLinkOnceLinkage().

◆ isLinkOnceLinkage()

static bool cir::isLinkOnceLinkage ( GlobalLinkageKind  linkage)
static

Definition at line 33 of file CIROpsEnums.h.

References isLinkOnceAnyLinkage(), and isLinkOnceODRLinkage().

Referenced by isDiscardableIfUnused(), and isValidLinkage().

◆ isLinkOnceODRLinkage()

static bool cir::isLinkOnceODRLinkage ( GlobalLinkageKind  linkage)
static

Definition at line 30 of file CIROpsEnums.h.

Referenced by isLinkOnceLinkage().

◆ isLocalLinkage()

static bool cir::isLocalLinkage ( GlobalLinkageKind  linkage)
static

Definition at line 51 of file CIROpsEnums.h.

References isInternalLinkage(), and isPrivateLinkage().

Referenced by isDiscardableIfUnused(), and isValidLinkage().

◆ isPrivateLinkage()

static bool cir::isPrivateLinkage ( GlobalLinkageKind  linkage)
static

Definition at line 48 of file CIROpsEnums.h.

Referenced by isLocalLinkage().

◆ isSized()

bool cir::isSized ( mlir::Type  ty)

Returns true if the type is a CIR sized type.

Types are sized if they implement SizedTypeInterface and return true from its method isSized.

Unsized types are those that do not have a size, such as void, or abstract types.

Definition at line 24 of file CIRTypes.cpp.

References cir::MissingFeatures::unsizedTypes().

Referenced by clang::CIRGen::CIRGenTypes::convertType(), and cir::CIRDataLayout::getTypeSizeInBits().

◆ isValidCIRAtomicOrderingCABI()

template<typename Int >
bool cir::isValidCIRAtomicOrderingCABI ( Int  value)
inline

Definition at line 123 of file CIROpsEnums.h.

Referenced by isMemOrderValid().

◆ isValidDeclarationLinkage()

static LLVM_ATTRIBUTE_UNUSED bool cir::isValidDeclarationLinkage ( GlobalLinkageKind  linkage)
static

Definition at line 61 of file CIROpsEnums.h.

References isExternalLinkage(), and isExternalWeakLinkage().

◆ isValidFundamentalIntWidth()

bool cir::isValidFundamentalIntWidth ( unsigned  width)

Definition at line 465 of file CIRTypes.cpp.

◆ isValidLinkage()

static LLVM_ATTRIBUTE_UNUSED bool cir::isValidLinkage ( GlobalLinkageKind  gl)
static

Definition at line 111 of file CIROpsEnums.h.

References isExternalLinkage(), isLinkOnceLinkage(), isLocalLinkage(), and isWeakLinkage().

Referenced by getCIRGenToUse().

◆ isWeakAnyLinkage()

static bool cir::isWeakAnyLinkage ( GlobalLinkageKind  linkage)
static

Definition at line 36 of file CIROpsEnums.h.

Referenced by isWeakLinkage().

◆ isWeakForLinker()

static LLVM_ATTRIBUTE_UNUSED bool cir::isWeakForLinker ( GlobalLinkageKind  linkage)
static

Whether the definition of this global may be replaced at link time.

NB: Using this method outside of the code generators is almost always a mistake: when working at the IR level use isInterposable instead as it knows about ODR semantics.

Definition at line 102 of file CIROpsEnums.h.

Referenced by clang::CIRGen::CIRGenModule::createOrReplaceCXXRuntimeVariable(), and getCIRGenToUse().

◆ isWeakLinkage()

static bool cir::isWeakLinkage ( GlobalLinkageKind  linkage)
static

Definition at line 42 of file CIROpsEnums.h.

References isWeakAnyLinkage(), and isWeakODRLinkage().

Referenced by isValidLinkage().

◆ isWeakODRLinkage()

static bool cir::isWeakODRLinkage ( GlobalLinkageKind  linkage)
static

Definition at line 39 of file CIROpsEnums.h.

Referenced by isWeakLinkage().

◆ lowerFromCIRToLLVMIR()

static std::unique_ptr< llvm::Module > cir::lowerFromCIRToLLVMIR ( mlir::ModuleOp  MLIRModule,
llvm::LLVMContext &  LLVMCtx 
)
static

◆ operator&()

constexpr OverflowBehavior cir::operator& ( OverflowBehavior  a,
OverflowBehavior  b 
)
constexpr

Definition at line 39 of file CIRBaseBuilder.h.

References b.

◆ operator&=()

constexpr OverflowBehavior & cir::operator&= ( OverflowBehavior a,
OverflowBehavior  b 
)
constexpr

Definition at line 50 of file CIRBaseBuilder.h.

References b.

◆ operator<()

bool cir::operator< ( cir::MemOrder  ,
cir::MemOrder   
)
delete

◆ operator<=()

bool cir::operator<= ( cir::MemOrder  ,
cir::MemOrder   
)
delete

◆ operator>()

bool cir::operator> ( cir::MemOrder  ,
cir::MemOrder   
)
delete

◆ operator>=()

bool cir::operator>= ( cir::MemOrder  ,
cir::MemOrder   
)
delete

◆ operator|()

constexpr OverflowBehavior cir::operator| ( OverflowBehavior  a,
OverflowBehavior  b 
)
constexpr

Definition at line 34 of file CIRBaseBuilder.h.

References b.

◆ operator|=()

constexpr OverflowBehavior & cir::operator|= ( OverflowBehavior a,
OverflowBehavior  b 
)
constexpr

Definition at line 44 of file CIRBaseBuilder.h.

References b.

◆ runCIRToCIRPasses()

mlir::LogicalResult cir::runCIRToCIRPasses ( mlir::ModuleOp  theModule,
mlir::MLIRContext &  mlirCtx,
clang::ASTContext astCtx,
bool  enableVerifier,
bool  enableCIRSimplify 
)