clang 24.0.0git
clang::CIRGen::CIRGenTBAA Class Reference

This class organizes the cross-module state that is used while generating TBAA attributes for memory accesses. More...

#include "/work/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CIR/CodeGen/CIRGenTBAA.h"

Public Member Functions

 CIRGenTBAA (mlir::MLIRContext &mlirContext, clang::ASTContext &astContext, CIRGenCXXABI &cxxABI, const clang::CodeGenOptions &codeGenOpts, const clang::LangOptions &features)
 ~CIRGenTBAA ()
cir::TBAATypeDescriptorAttr getTypeInfo (clang::QualType qty)
 Returns the type descriptor used to describe accesses to objects of the given type.
TBAAAccessInfo getAccessInfo (clang::QualType accessType)
 Returns the TBAA information that describes an access to an object of the given type.
cir::TBAATypeDescriptorAttr getBaseTypeInfo (clang::QualType qty)
 Returns the type descriptor that describes the given base access type, or null if the type is not suitable for use in TBAA access tags.
cir::TBAATagAttr getAccessTagInfo (TBAAAccessInfo info)
 Returns the access tag for the given memory access, or null if the access has no TBAA information.
TBAAAccessInfo mergeTBAAInfoForCast (TBAAAccessInfo sourceInfo, TBAAAccessInfo targetInfo)
 Returns the merged TBAA information for the purpose of type casts.
TBAAAccessInfo mergeTBAAInfoForConditionalOperator (TBAAAccessInfo infoA, TBAAAccessInfo infoB)
 Returns the merged TBAA information for the purpose of conditional operator.

Detailed Description

This class organizes the cross-module state that is used while generating TBAA attributes for memory accesses.

Definition at line 110 of file CIRGenTBAA.h.

Constructor & Destructor Documentation

◆ CIRGenTBAA()

CIRGenTBAA::CIRGenTBAA ( mlir::MLIRContext & mlirContext,
clang::ASTContext & astContext,
CIRGenCXXABI & cxxABI,
const clang::CodeGenOptions & codeGenOpts,
const clang::LangOptions & features )

Definition at line 33 of file CIRGenTBAA.cpp.

◆ ~CIRGenTBAA()

CIRGenTBAA::~CIRGenTBAA ( )
default

Member Function Documentation

◆ getAccessInfo()

TBAAAccessInfo CIRGenTBAA::getAccessInfo ( clang::QualType accessType)

Returns the TBAA information that describes an access to an object of the given type.

Definition at line 240 of file CIRGenTBAA.cpp.

References clang::CIRGen::TBAAAccessInfo::getIncompleteInfo(), clang::CIRGen::TBAAAccessInfo::getMayAliasInfo(), getTypeInfo(), clang::Type::isIncompleteType(), and clang::CodeGenUtils::typeHasMayAlias().

◆ getAccessTagInfo()

cir::TBAATagAttr CIRGenTBAA::getAccessTagInfo ( TBAAAccessInfo info)

Returns the access tag for the given memory access, or null if the access has no TBAA information.

Definition at line 345 of file CIRGenTBAA.cpp.

References cir::MissingFeatures::tbaaNewStructPath().

◆ getBaseTypeInfo()

cir::TBAATypeDescriptorAttr CIRGenTBAA::getBaseTypeInfo ( clang::QualType qty)

Returns the type descriptor that describes the given base access type, or null if the type is not suitable for use in TBAA access tags.

Definition at line 340 of file CIRGenTBAA.cpp.

References clang::CodeGenUtils::isValidTBAABaseType().

◆ getTypeInfo()

cir::TBAATypeDescriptorAttr CIRGenTBAA::getTypeInfo ( clang::QualType qty)

Returns the type descriptor used to describe accesses to objects of the given type.

Definition at line 216 of file CIRGenTBAA.cpp.

References clang::CodeGenUtils::isValidTBAABaseType(), and clang::CodeGenUtils::typeHasMayAlias().

Referenced by getAccessInfo().

◆ mergeTBAAInfoForCast()

TBAAAccessInfo CIRGenTBAA::mergeTBAAInfoForCast ( TBAAAccessInfo sourceInfo,
TBAAAccessInfo targetInfo )

Returns the merged TBAA information for the purpose of type casts.

Definition at line 368 of file CIRGenTBAA.cpp.

References clang::CIRGen::TBAAAccessInfo::getMayAliasInfo(), and clang::CIRGen::TBAAAccessInfo::isMayAlias().

◆ mergeTBAAInfoForConditionalOperator()

TBAAAccessInfo CIRGenTBAA::mergeTBAAInfoForConditionalOperator ( TBAAAccessInfo infoA,
TBAAAccessInfo infoB )

Returns the merged TBAA information for the purpose of conditional operator.

Definition at line 376 of file CIRGenTBAA.cpp.

References clang::CIRGen::TBAAAccessInfo::getMayAliasInfo(), and clang::CIRGen::TBAAAccessInfo::isMayAlias().


The documentation for this class was generated from the following files: