15#ifndef CLANG_LIB_CIR_CODEGEN_CIRGENTBAA_H
16#define CLANG_LIB_CIR_CODEGEN_CIRGENTBAA_H
18#include "mlir/IR/Attributes.h"
19#include "mlir/IR/MLIRContext.h"
22#include "llvm/ADT/DenseMap.h"
23#include "llvm/ADT/SmallVector.h"
83 return !(*
this == other);
111 mlir::MLIRContext &mlirContext;
116 std::unique_ptr<clang::MangleContext> mangleCtx;
120 llvm::DenseMap<const clang::Type *, cir::TBAATypeDescriptorAttr>
123 llvm::DenseMap<const clang::Type *, cir::TBAATypeDescriptorAttr>
124 baseTypeMetadataCache;
130 cir::TBAAOmnipotentCharAttr getChar();
133 cir::TBAAScalarAttr getAnyPtr(
unsigned ptrDepth = 1);
136 cir::TBAAScalarAttr createScalarTypeNode(llvm::StringRef name,
137 cir::TBAAScalarAttr parent);
C Language Family Type Representation.
Base class of the TBAA type descriptor attributes.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Implements C++ ABI-specific code generation functions.
TBAAAccessInfo mergeTBAAInfoForConditionalOperator(TBAAAccessInfo infoA, TBAAAccessInfo infoB)
Returns the merged TBAA information for the purpose of conditional operator.
cir::TBAATypeDescriptorAttr getTypeInfo(clang::QualType qty)
Returns the type descriptor used to describe accesses to objects of the given type.
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 getAccessInfo(clang::QualType accessType)
Returns the TBAA information that describes an access to an object of the given type.
CIRGenTBAA(mlir::MLIRContext &mlirContext, clang::ASTContext &astContext, CIRGenCXXABI &cxxABI, const clang::CodeGenOptions &codeGenOpts, const clang::LangOptions &features)
cir::TBAATypeDescriptorAttr getBaseTypeInfo(clang::QualType qty)
Returns the type descriptor that describes the given base access type, or null if the type is not sui...
CodeGenOptions - Track various options which control how the code is optimized and passed to the back...
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
MangleContext - Context for tracking state which persists across multiple calls to the C++ name mangl...
A (possibly-)qualified type.
The base class of the type hierarchy.
Top level wrappers for InstallAPI frontend operations.
__builtin_elementwise_add_sat __builtin_elementwise_sub_sat uint32_t uint64_t __builtin_riscv_ssha_i32 __builtin_riscv_sshl_u32 uint64_t
Describes a memory access in terms of TBAA.
bool isIncomplete() const
bool operator!=(const TBAAAccessInfo &other) const
static TBAAAccessInfo getIncompleteInfo()
TBAAAccessInfo(cir::TBAATypeDescriptorAttr accessType, uint64_t size)
TBAAAccessInfo(TBAAAccessKind kind, cir::TBAATypeDescriptorAttr baseType, cir::TBAATypeDescriptorAttr accessType, uint64_t offset, uint64_t size)
bool operator==(const TBAAAccessInfo &other) const
cir::TBAATypeDescriptorAttr accessType
The final access type.
static TBAAAccessInfo getMayAliasInfo()
uint64_t offset
The byte offset of the final access within the base one.
cir::TBAATypeDescriptorAttr baseType
The base/leading access type.
TBAAAccessKind kind
The kind of the access descriptor.
TBAAAccessInfo(cir::TBAATypeDescriptorAttr baseType, cir::TBAATypeDescriptorAttr accessType, uint64_t offset, uint64_t size)
uint64_t size
The size of access, in bytes.