clang 23.0.0git
clang::CIRGen::CIRGenBuilderTy Class Reference

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

Inheritance diagram for clang::CIRGen::CIRGenBuilderTy:
[legend]

Public Member Functions

 CIRGenBuilderTy (mlir::MLIRContext &mlirContext, const CIRGenTypeCache &tc)
mlir::Attribute getString (llvm::StringRef str, mlir::Type eltTy, std::optional< size_t > size)
 Get a cir::ConstArrayAttr for a string literal.
cir::ConstArrayAttr getConstArray (mlir::Attribute attrs, cir::ArrayType arrayTy) const
mlir::Attribute getConstRecordOrZeroAttr (mlir::ArrayAttr arrayAttr, bool packed=false, bool padded=false, mlir::Type type={})
cir::ConstRecordAttr getAnonConstRecord (mlir::ArrayAttr arrayAttr, bool packed=false, bool padded=false, mlir::Type ty={})
cir::TypeInfoAttr getTypeInfo (mlir::ArrayAttr fieldsAttr)
std::string getUniqueAnonRecordName ()
std::string getUniqueRecordName (const std::string &baseName)
cir::LongDoubleType getLongDoubleTy (const llvm::fltSemantics &format) const
mlir::Type getPtrToVPtrType ()
cir::FuncType getFuncType (llvm::ArrayRef< mlir::Type > params, mlir::Type retTy, bool isVarArg=false)
cir::RecordType::RecordKind getRecordKind (const clang::TagTypeKind kind)
 Get a CIR record kind from a AST declaration tag.
cir::RecordType getCompleteNamedRecordType (llvm::ArrayRef< mlir::Type > members, bool packed, bool padded, llvm::StringRef name)
 Get a CIR named record type.
cir::RecordType getCompleteRecordType (mlir::ArrayAttr fields, bool packed=false, bool padded=false, llvm::StringRef name="")
cir::RecordType getIncompleteRecordTy (llvm::StringRef name, const clang::RecordDecl *rd)
 Get an incomplete CIR struct type.
cir::MemCpyOp createMemCpy (mlir::Location loc, mlir::Value dst, mlir::Value src, mlir::Value len)
cir::DataMemberAttr getDataMemberAttr (cir::DataMemberType ty, unsigned memberIndex)
cir::DataMemberAttr getNullDataMemberAttr (cir::DataMemberType ty)
bool isNullValue (mlir::Attribute attr) const
cir::IntType getUIntNTy (int n)
cir::IntType getSIntNTy (int n)
cir::VoidType getVoidTy ()
cir::IntType getSInt8Ty ()
cir::IntType getSInt16Ty ()
cir::IntType getSInt32Ty ()
cir::IntType getSInt64Ty ()
cir::IntType getUInt8Ty ()
cir::IntType getUInt16Ty ()
cir::IntType getUInt32Ty ()
cir::IntType getUInt64Ty ()
cir::FP16Type getFp16Ty ()
cir::BF16Type getBfloat6Ty ()
cir::SingleType getSingleTy ()
cir::DoubleType getDoubleTy ()
cir::ConstantOp getConstInt (mlir::Location loc, llvm::APSInt intVal)
cir::ConstantOp getConstInt (mlir::Location loc, llvm::APInt intVal, bool isUnsigned=true)
cir::ConstantOp getConstInt (mlir::Location loc, mlir::Type t, uint64_t c)
cir::ConstantOp getConstFP (mlir::Location loc, mlir::Type t, llvm::APFloat fpVal)
bool isInt8Ty (mlir::Type i)
bool isInt16Ty (mlir::Type i)
bool isInt32Ty (mlir::Type i)
bool isInt64Ty (mlir::Type i)
bool isInt (mlir::Type i)
cir::PointerType getUInt8PtrTy ()
cir::RecordType getAnonRecordTy (llvm::ArrayRef< mlir::Type > members, bool packed=false, bool padded=false)
 Get a CIR anonymous record type.
cir::ConstantOp getSInt32 (int32_t c, mlir::Location loc)
cir::ConstantOp getUInt32 (uint32_t c, mlir::Location loc)
cir::ConstantOp getSInt64 (uint64_t c, mlir::Location loc)
cir::ConstantOp getUInt64 (uint64_t c, mlir::Location loc)
mlir::Value createNeg (mlir::Value value)
cir::IsFPClassOp createIsFPClass (mlir::Location loc, mlir::Value src, cir::FPClassTest flags)
cir::ConstantOp getNullDataMemberPtr (cir::DataMemberType ty, mlir::Location loc)
 Create constant nullptr for pointer-to-data-member type ty.
cir::ConstantOp getNullMethodPtr (cir::MethodType ty, mlir::Location loc)
mlir::Value createFloatingCast (mlir::Value v, mlir::Type destType)
mlir::Value createFSub (mlir::Location loc, mlir::Value lhs, mlir::Value rhs)
mlir::Value createFAdd (mlir::Location loc, mlir::Value lhs, mlir::Value rhs)
mlir::Value createFMul (mlir::Location loc, mlir::Value lhs, mlir::Value rhs)
mlir::Value createFDiv (mlir::Location loc, mlir::Value lhs, mlir::Value rhs)
mlir::Value createDynCast (mlir::Location loc, mlir::Value src, cir::PointerType destType, bool isRefCast, cir::DynamicCastInfoAttr info)
mlir::Value createDynCastToVoid (mlir::Location loc, mlir::Value src, bool vtableUseRelativeLayout)
Address createBaseClassAddr (mlir::Location loc, Address addr, mlir::Type destType, unsigned offset, bool assumeNotNull)
Address createDerivedClassAddr (mlir::Location loc, Address addr, mlir::Type destType, unsigned offset, bool assumeNotNull)
mlir::Value createVTTAddrPoint (mlir::Location loc, mlir::Type retTy, mlir::Value addr, uint64_t offset)
mlir::Value createVTTAddrPoint (mlir::Location loc, mlir::Type retTy, mlir::FlatSymbolRefAttr sym, uint64_t offset)
Address createElementBitCast (mlir::Location loc, Address addr, mlir::Type destType)
 Cast the element type of the given address to a different type, preserving information like the alignment.
cir::LoadOp createLoad (mlir::Location loc, Address addr, bool isVolatile=false)
cir::LoadOp createAlignedLoad (mlir::Location loc, mlir::Type ty, mlir::Value ptr, llvm::MaybeAlign align)
cir::LoadOp createAlignedLoad (mlir::Location loc, mlir::Type ty, mlir::Value ptr, clang::CharUnits align=clang::CharUnits::One())
cir::StoreOp createStore (mlir::Location loc, mlir::Value val, Address dst, bool isVolatile=false, mlir::IntegerAttr align={}, cir::SyncScopeKindAttr scope={}, cir::MemOrderAttr order={})
mlir::Value createComplexRealPtr (mlir::Location loc, mlir::Value value)
 Create a cir.complex.real_ptr operation that derives a pointer to the real part of the complex value pointed to by the specified pointer value.
Address createComplexRealPtr (mlir::Location loc, Address addr)
mlir::Value createComplexImagPtr (mlir::Location loc, mlir::Value value)
 Create a cir.complex.imag_ptr operation that derives a pointer to the imaginary part of the complex value pointed to by the specified pointer value.
Address createComplexImagPtr (mlir::Location loc, Address addr)
cir::GetRuntimeMemberOp createGetIndirectMember (mlir::Location loc, mlir::Value objectPtr, mlir::Value memberPtr)
mlir::Value getArrayElement (mlir::Location arrayLocBegin, mlir::Location arrayLocEnd, mlir::Value arrayPtr, mlir::Type eltTy, mlir::Value idx, bool shouldDecay)
 Create a cir.ptr_stride operation to get access to an array element.
mlir::Value maybeBuildArrayDecay (mlir::Location loc, mlir::Value arrayPtr, mlir::Type eltTy)
 Returns a decayed pointer to the first element of the array pointed to by arrayPtr.
void computeGlobalViewIndicesFromFlatOffset (int64_t offset, mlir::Type ty, cir::CIRDataLayout layout, llvm::SmallVectorImpl< int64_t > &indices)
cir::GlobalOp createVersionedGlobal (mlir::ModuleOp module, mlir::Location loc, mlir::StringRef name, mlir::Type type, bool isConstant, cir::GlobalLinkageKind linkage)
 Creates a versioned global variable.
cir::StackSaveOp createStackSave (mlir::Location loc, mlir::Type ty)
cir::StackRestoreOp createStackRestore (mlir::Location loc, mlir::Value v)
mlir::Value createSetBitfield (mlir::Location loc, mlir::Type resultType, Address dstAddr, mlir::Type storageType, mlir::Value src, const CIRGenBitFieldInfo &info, bool isLvalueVolatile, bool useVolatile)
mlir::Value createGetBitfield (mlir::Location loc, mlir::Type resultType, Address addr, mlir::Type storageType, const CIRGenBitFieldInfo &info, bool isLvalueVolatile, bool useVolatile)
cir::VecShuffleOp createVecShuffle (mlir::Location loc, mlir::Value vec1, mlir::Value vec2, llvm::ArrayRef< mlir::Attribute > maskAttrs)
cir::VecShuffleOp createVecShuffle (mlir::Location loc, mlir::Value vec1, mlir::Value vec2, llvm::ArrayRef< int64_t > mask)
cir::VecShuffleOp createVecShuffle (mlir::Location loc, mlir::Value vec1, llvm::ArrayRef< int64_t > mask)
template<typename... Operands>
mlir::Value emitIntrinsicCallOp (mlir::Location loc, const llvm::StringRef str, const mlir::Type &resTy, Operands &&...op)
Public Member Functions inherited from cir::CIRBaseBuilderTy
 CIRBaseBuilderTy (mlir::MLIRContext &mlirContext)
 CIRBaseBuilderTy (mlir::OpBuilder &builder)
mlir::Value getConstAPInt (mlir::Location loc, mlir::Type typ, const llvm::APInt &val)
cir::ConstantOp getConstant (mlir::Location loc, mlir::TypedAttr attr)
cir::ConstantOp getConstantInt (mlir::Location loc, mlir::Type ty, int64_t value)
mlir::Value getSignedInt (mlir::Location loc, int64_t val, unsigned numBits)
mlir::Value getUnsignedInt (mlir::Location loc, uint64_t val, unsigned numBits)
cir::ConstantOp getNullValue (mlir::Type ty, mlir::Location loc)
mlir::TypedAttr getConstNullPtrAttr (mlir::Type t)
mlir::TypedAttr getNullDataMemberAttr (cir::DataMemberType ty)
mlir::TypedAttr getZeroInitAttr (mlir::Type ty)
cir::ConstantOp getBool (bool state, mlir::Location loc)
cir::ConstantOp getFalse (mlir::Location loc)
cir::ConstantOp getTrue (mlir::Location loc)
cir::BoolType getBoolTy ()
cir::VoidType getVoidTy ()
cir::IntType getUIntNTy (int n)
cir::IntType getSIntNTy (int n)
cir::PointerType getPointerTo (mlir::Type ty)
cir::PointerType getPointerTo (mlir::Type ty, cir::TargetAddressSpaceAttr as)
cir::PointerType getPointerTo (mlir::Type ty, clang::LangAS langAS)
cir::PointerType getVoidPtrTy (clang::LangAS langAS=clang::LangAS::Default)
cir::PointerType getVoidPtrTy (cir::TargetAddressSpaceAttr as)
cir::MethodAttr getMethodAttr (cir::MethodType ty, cir::FuncOp methodFuncOp)
cir::MethodAttr getNullMethodAttr (cir::MethodType ty)
cir::BoolAttr getCIRBoolAttr (bool state)
cir::BoolAttr getTrueAttr ()
cir::BoolAttr getFalseAttr ()
mlir::Value createComplexCreate (mlir::Location loc, mlir::Value real, mlir::Value imag)
mlir::Value createComplexReal (mlir::Location loc, mlir::Value operand)
mlir::Value createComplexImag (mlir::Location loc, mlir::Value operand)
cir::LoadOp createLoad (mlir::Location loc, mlir::Value ptr, bool isVolatile=false, uint64_t alignment=0)
mlir::Value createAlignedLoad (mlir::Location loc, mlir::Value ptr, uint64_t alignment)
mlir::Value createNot (mlir::Value value)
cir::DoWhileOp createDoWhile (mlir::Location loc, llvm::function_ref< void(mlir::OpBuilder &, mlir::Location)> condBuilder, llvm::function_ref< void(mlir::OpBuilder &, mlir::Location)> bodyBuilder)
 Create a do-while operation.
cir::WhileOp createWhile (mlir::Location loc, llvm::function_ref< void(mlir::OpBuilder &, mlir::Location)> condBuilder, llvm::function_ref< void(mlir::OpBuilder &, mlir::Location)> bodyBuilder)
 Create a while operation.
cir::ForOp createFor (mlir::Location loc, llvm::function_ref< void(mlir::OpBuilder &, mlir::Location)> condBuilder, llvm::function_ref< void(mlir::OpBuilder &, mlir::Location)> bodyBuilder, llvm::function_ref< void(mlir::OpBuilder &, mlir::Location)> stepBuilder)
 Create a for operation.
cir::BreakOp createBreak (mlir::Location loc)
 Create a break operation.
cir::ContinueOp createContinue (mlir::Location loc)
 Create a continue operation.
mlir::Value createUnaryOp (mlir::Location loc, cir::UnaryOpKind kind, mlir::Value operand)
mlir::TypedAttr getConstPtrAttr (mlir::Type type, int64_t value)
mlir::Value createAlloca (mlir::Location loc, cir::PointerType addrType, mlir::Type type, llvm::StringRef name, mlir::IntegerAttr alignment, mlir::Value dynAllocSize)
mlir::Value createAlloca (mlir::Location loc, cir::PointerType addrType, mlir::Type type, llvm::StringRef name, clang::CharUnits alignment, mlir::Value dynAllocSize)
mlir::Value createAlloca (mlir::Location loc, cir::PointerType addrType, mlir::Type type, llvm::StringRef name, mlir::IntegerAttr alignment)
mlir::Value createAlloca (mlir::Location loc, cir::PointerType addrType, mlir::Type type, llvm::StringRef name, clang::CharUnits alignment)
cir::GlobalViewAttr getGlobalViewAttr (cir::GlobalOp globalOp, mlir::ArrayAttr indices={})
 Get constant address of a global variable as an MLIR attribute.
cir::GlobalViewAttr getGlobalViewAttr (cir::PointerType type, cir::GlobalOp globalOp, mlir::ArrayAttr indices={})
 Get constant address of a global variable as an MLIR attribute.
mlir::Value createGetGlobal (mlir::Location loc, cir::GlobalOp global, bool threadLocal=false)
mlir::Value createGetGlobal (cir::GlobalOp global, bool threadLocal=false)
cir::CopyOp createCopy (mlir::Value dst, mlir::Value src, bool isVolatile=false)
 Create a copy with inferred length.
cir::StoreOp createStore (mlir::Location loc, mlir::Value val, mlir::Value dst, bool isVolatile=false, mlir::IntegerAttr align={}, cir::SyncScopeKindAttr scope={}, cir::MemOrderAttr order={})
cir::LoadOp createFlagLoad (mlir::Location loc, mlir::Value addr)
 Emit a load from an boolean flag variable.
cir::StoreOp createFlagStore (mlir::Location loc, bool val, mlir::Value dst)
cir::GlobalOp createGlobal (mlir::ModuleOp mlirModule, mlir::Location loc, mlir::StringRef name, mlir::Type type, bool isConstant, cir::GlobalLinkageKind linkage)
cir::GetMemberOp createGetMember (mlir::Location loc, mlir::Type resultTy, mlir::Value base, llvm::StringRef name, unsigned index)
mlir::Value createDummyValue (mlir::Location loc, mlir::Type type, clang::CharUnits alignment)
cir::PtrStrideOp createPtrStride (mlir::Location loc, mlir::Value base, mlir::Value stride)
cir::CallOp createCallOp (mlir::Location loc, mlir::SymbolRefAttr callee, mlir::Type returnType, mlir::ValueRange operands, llvm::ArrayRef< mlir::NamedAttribute > attrs={})
cir::CallOp createCallOp (mlir::Location loc, cir::FuncOp callee, mlir::ValueRange operands, llvm::ArrayRef< mlir::NamedAttribute > attrs={})
cir::CallOp createIndirectCallOp (mlir::Location loc, mlir::Value indirectTarget, cir::FuncType funcType, mlir::ValueRange operands, llvm::ArrayRef< mlir::NamedAttribute > attrs={})
cir::CallOp createCallOp (mlir::Location loc, mlir::SymbolRefAttr callee, mlir::ValueRange operands=mlir::ValueRange(), llvm::ArrayRef< mlir::NamedAttribute > attrs={})
mlir::Value createCast (mlir::Location loc, cir::CastKind kind, mlir::Value src, mlir::Type newTy)
mlir::Value createCast (cir::CastKind kind, mlir::Value src, mlir::Type newTy)
mlir::Value createIntCast (mlir::Value src, mlir::Type newTy)
mlir::Value createIntToPtr (mlir::Value src, mlir::Type newTy)
mlir::Value createPtrToInt (mlir::Value src, mlir::Type newTy)
mlir::Value createPtrToBoolCast (mlir::Value v)
mlir::Value createBoolToInt (mlir::Value src, mlir::Type newTy)
mlir::Value createBitcast (mlir::Value src, mlir::Type newTy)
mlir::Value createBitcast (mlir::Location loc, mlir::Value src, mlir::Type newTy)
mlir::Value createPtrBitcast (mlir::Value src, mlir::Type newPointeeTy)
mlir::Value createPtrIsNull (mlir::Value ptr)
mlir::Value createAddrSpaceCast (mlir::Location loc, mlir::Value src, mlir::Type newTy)
mlir::Value createAddrSpaceCast (mlir::Value src, mlir::Type newTy)
mlir::Value createBinop (mlir::Location loc, mlir::Value lhs, cir::BinOpKind kind, mlir::Value rhs)
mlir::Value createLowBitsSet (mlir::Location loc, unsigned size, unsigned bits)
mlir::Value createAnd (mlir::Location loc, mlir::Value lhs, mlir::Value rhs)
mlir::Value createOr (mlir::Location loc, mlir::Value lhs, mlir::Value rhs)
mlir::Value createSelect (mlir::Location loc, mlir::Value condition, mlir::Value trueValue, mlir::Value falseValue)
mlir::Value createLogicalAnd (mlir::Location loc, mlir::Value lhs, mlir::Value rhs)
mlir::Value createLogicalOr (mlir::Location loc, mlir::Value lhs, mlir::Value rhs)
mlir::Value createMul (mlir::Location loc, mlir::Value lhs, mlir::Value rhs, OverflowBehavior ob=OverflowBehavior::None)
mlir::Value createNSWMul (mlir::Location loc, mlir::Value lhs, mlir::Value rhs)
mlir::Value createNUWAMul (mlir::Location loc, mlir::Value lhs, mlir::Value rhs)
mlir::Value createSub (mlir::Location loc, mlir::Value lhs, mlir::Value rhs, OverflowBehavior ob=OverflowBehavior::Saturated)
mlir::Value createNSWSub (mlir::Location loc, mlir::Value lhs, mlir::Value rhs)
mlir::Value createNUWSub (mlir::Location loc, mlir::Value lhs, mlir::Value rhs)
mlir::Value createAdd (mlir::Location loc, mlir::Value lhs, mlir::Value rhs, OverflowBehavior ob=OverflowBehavior::None)
mlir::Value createNSWAdd (mlir::Location loc, mlir::Value lhs, mlir::Value rhs)
mlir::Value createNUWAdd (mlir::Location loc, mlir::Value lhs, mlir::Value rhs)
cir::CmpOp createCompare (mlir::Location loc, cir::CmpOpKind kind, mlir::Value lhs, mlir::Value rhs)
cir::VecCmpOp createVecCompare (mlir::Location loc, cir::CmpOpKind kind, mlir::Value lhs, mlir::Value rhs)
mlir::Value createIsNaN (mlir::Location loc, mlir::Value operand)
mlir::Value createShift (mlir::Location loc, mlir::Value lhs, mlir::Value rhs, bool isShiftLeft)
mlir::Value createShift (mlir::Location loc, mlir::Value lhs, const llvm::APInt &rhs, bool isShiftLeft)
mlir::Value createShift (mlir::Location loc, mlir::Value lhs, unsigned bits, bool isShiftLeft)
mlir::Value createShiftLeft (mlir::Location loc, mlir::Value lhs, unsigned bits)
mlir::Value createShiftRight (mlir::Location loc, mlir::Value lhs, unsigned bits)
mlir::Value createShiftLeft (mlir::Location loc, mlir::Value lhs, mlir::Value rhs)
mlir::Value createShiftRight (mlir::Location loc, mlir::Value lhs, mlir::Value rhs)
mlir::IntegerAttr getAlignmentAttr (clang::CharUnits alignment)
mlir::IntegerAttr getAlignmentAttr (llvm::Align alignment)
mlir::IntegerAttr getAlignmentAttr (int64_t alignment)
mlir::IntegerAttr getSizeFromCharUnits (clang::CharUnits size)
cir::ConstantOp getNullPtr (mlir::Type ty, mlir::Location loc)
cir::ConditionOp createCondition (mlir::Value condition)
 Create a loop condition.
cir::YieldOp createYield (mlir::Location loc, mlir::ValueRange value={})
 Create a yield operation.
GetMethodResults createGetMethod (mlir::Location loc, mlir::Value method, mlir::Value objectPtr)

Additional Inherited Members

Static Public Member Functions inherited from cir::CIRBaseBuilderTy
static unsigned getCIRIntOrFloatBitWidth (mlir::Type eltTy)
static OpBuilder::InsertPoint getBestAllocaInsertPoint (mlir::Block *block)

Detailed Description

Definition at line 28 of file CIRGenBuilder.h.

Constructor & Destructor Documentation

◆ CIRGenBuilderTy()

clang::CIRGen::CIRGenBuilderTy::CIRGenBuilderTy ( mlir::MLIRContext & mlirContext,
const CIRGenTypeCache & tc )
inline

Definition at line 34 of file CIRGenBuilder.h.

References cir::CIRBaseBuilderTy::CIRBaseBuilderTy().

Member Function Documentation

◆ computeGlobalViewIndicesFromFlatOffset()

void CIRGenBuilderTy::computeGlobalViewIndicesFromFlatOffset ( int64_t offset,
mlir::Type ty,
cir::CIRDataLayout layout,
llvm::SmallVectorImpl< int64_t > & indices )

◆ createAlignedLoad() [1/2]

cir::LoadOp clang::CIRGen::CIRGenBuilderTy::createAlignedLoad ( mlir::Location loc,
mlir::Type ty,
mlir::Value ptr,
clang::CharUnits align = clang::CharUnits::One() )
inline

Definition at line 517 of file CIRGenBuilder.h.

References createAlignedLoad(), and clang::CharUnits::One().

◆ createAlignedLoad() [2/2]

cir::LoadOp clang::CIRGen::CIRGenBuilderTy::createAlignedLoad ( mlir::Location loc,
mlir::Type ty,
mlir::Value ptr,
llvm::MaybeAlign align )
inline

◆ createBaseClassAddr()

Address clang::CIRGen::CIRGenBuilderTy::createBaseClassAddr ( mlir::Location loc,
Address addr,
mlir::Type destType,
unsigned offset,
bool assumeNotNull )
inline

◆ createComplexImagPtr() [1/2]

Address clang::CIRGen::CIRGenBuilderTy::createComplexImagPtr ( mlir::Location loc,
Address addr )
inline

◆ createComplexImagPtr() [2/2]

mlir::Value clang::CIRGen::CIRGenBuilderTy::createComplexImagPtr ( mlir::Location loc,
mlir::Value value )
inline

Create a cir.complex.imag_ptr operation that derives a pointer to the imaginary part of the complex value pointed to by the specified pointer value.

Definition at line 550 of file CIRGenBuilder.h.

References cir::CIRBaseBuilderTy::getPointerTo().

Referenced by createComplexImagPtr().

◆ createComplexRealPtr() [1/2]

Address clang::CIRGen::CIRGenBuilderTy::createComplexRealPtr ( mlir::Location loc,
Address addr )
inline

◆ createComplexRealPtr() [2/2]

mlir::Value clang::CIRGen::CIRGenBuilderTy::createComplexRealPtr ( mlir::Location loc,
mlir::Value value )
inline

Create a cir.complex.real_ptr operation that derives a pointer to the real part of the complex value pointed to by the specified pointer value.

Definition at line 535 of file CIRGenBuilder.h.

References cir::CIRBaseBuilderTy::getPointerTo().

Referenced by createComplexRealPtr().

◆ createDerivedClassAddr()

Address clang::CIRGen::CIRGenBuilderTy::createDerivedClassAddr ( mlir::Location loc,
Address addr,
mlir::Type destType,
unsigned offset,
bool assumeNotNull )
inline

◆ createDynCast()

mlir::Value clang::CIRGen::CIRGenBuilderTy::createDynCast ( mlir::Location loc,
mlir::Value src,
cir::PointerType destType,
bool isRefCast,
cir::DynamicCastInfoAttr info )
inline

Definition at line 426 of file CIRGenBuilder.h.

◆ createDynCastToVoid()

mlir::Value clang::CIRGen::CIRGenBuilderTy::createDynCastToVoid ( mlir::Location loc,
mlir::Value src,
bool vtableUseRelativeLayout )
inline

◆ createElementBitCast()

Address clang::CIRGen::CIRGenBuilderTy::createElementBitCast ( mlir::Location loc,
Address addr,
mlir::Type destType )
inline

Cast the element type of the given address to a different type, preserving information like the alignment.

Definition at line 485 of file CIRGenBuilder.h.

References cir::CIRBaseBuilderTy::createBitcast(), clang::CIRGen::Address::getAlignment(), clang::CIRGen::Address::getElementType(), clang::CIRGen::Address::getPointer(), and cir::CIRBaseBuilderTy::getPointerTo().

Referenced by clang::CIRGen::CIRGenFunction::emitPointerWithAlignment().

◆ createFAdd()

mlir::Value clang::CIRGen::CIRGenBuilderTy::createFAdd ( mlir::Location loc,
mlir::Value lhs,
mlir::Value rhs )
inline

◆ createFDiv()

mlir::Value clang::CIRGen::CIRGenBuilderTy::createFDiv ( mlir::Location loc,
mlir::Value lhs,
mlir::Value rhs )
inline

◆ createFloatingCast()

mlir::Value clang::CIRGen::CIRGenBuilderTy::createFloatingCast ( mlir::Value v,
mlir::Type destType )
inline

◆ createFMul()

mlir::Value clang::CIRGen::CIRGenBuilderTy::createFMul ( mlir::Location loc,
mlir::Value lhs,
mlir::Value rhs )
inline

◆ createFSub()

mlir::Value clang::CIRGen::CIRGenBuilderTy::createFSub ( mlir::Location loc,
mlir::Value lhs,
mlir::Value rhs )
inline

◆ createGetBitfield()

◆ createGetIndirectMember()

cir::GetRuntimeMemberOp clang::CIRGen::CIRGenBuilderTy::createGetIndirectMember ( mlir::Location loc,
mlir::Value objectPtr,
mlir::Value memberPtr )
inline

◆ createIsFPClass()

cir::IsFPClassOp clang::CIRGen::CIRGenBuilderTy::createIsFPClass ( mlir::Location loc,
mlir::Value src,
cir::FPClassTest flags )
inline

Definition at line 372 of file CIRGenBuilder.h.

◆ createLoad()

cir::LoadOp clang::CIRGen::CIRGenBuilderTy::createLoad ( mlir::Location loc,
Address addr,
bool isVolatile = false )
inline

◆ createMemCpy()

cir::MemCpyOp clang::CIRGen::CIRGenBuilderTy::createMemCpy ( mlir::Location loc,
mlir::Value dst,
mlir::Value src,
mlir::Value len )
inline

Definition at line 196 of file CIRGenBuilder.h.

◆ createNeg()

mlir::Value clang::CIRGen::CIRGenBuilderTy::createNeg ( mlir::Value value)
inline

Definition at line 359 of file CIRGenBuilder.h.

References cir::CIRBaseBuilderTy::createIntCast(), and getSIntNTy().

Referenced by emitPointerArithmetic().

◆ createSetBitfield()

◆ createStackRestore()

cir::StackRestoreOp clang::CIRGen::CIRGenBuilderTy::createStackRestore ( mlir::Location loc,
mlir::Value v )
inline

Definition at line 617 of file CIRGenBuilder.h.

◆ createStackSave()

cir::StackSaveOp clang::CIRGen::CIRGenBuilderTy::createStackSave ( mlir::Location loc,
mlir::Type ty )
inline

Definition at line 613 of file CIRGenBuilder.h.

◆ createStore()

cir::StoreOp clang::CIRGen::CIRGenBuilderTy::createStore ( mlir::Location loc,
mlir::Value val,
Address dst,
bool isVolatile = false,
mlir::IntegerAttr align = {},
cir::SyncScopeKindAttr scope = {},
cir::MemOrderAttr order = {} )
inline

◆ createVecShuffle() [1/3]

cir::VecShuffleOp clang::CIRGen::CIRGenBuilderTy::createVecShuffle ( mlir::Location loc,
mlir::Value vec1,
llvm::ArrayRef< int64_t > mask )
inline

Create a unary shuffle. The second vector operand of the IR instruction is poison.

Definition at line 677 of file CIRGenBuilder.h.

References createVecShuffle(), and cir::CIRBaseBuilderTy::getConstant().

◆ createVecShuffle() [2/3]

cir::VecShuffleOp clang::CIRGen::CIRGenBuilderTy::createVecShuffle ( mlir::Location loc,
mlir::Value vec1,
mlir::Value vec2,
llvm::ArrayRef< int64_t > mask )
inline

Definition at line 667 of file CIRGenBuilder.h.

References createVecShuffle(), and getSInt32Ty().

◆ createVecShuffle() [3/3]

cir::VecShuffleOp clang::CIRGen::CIRGenBuilderTy::createVecShuffle ( mlir::Location loc,
mlir::Value vec1,
mlir::Value vec2,
llvm::ArrayRef< mlir::Attribute > maskAttrs )
inline

◆ createVersionedGlobal()

cir::GlobalOp clang::CIRGen::CIRGenBuilderTy::createVersionedGlobal ( mlir::ModuleOp module,
mlir::Location loc,
mlir::StringRef name,
mlir::Type type,
bool isConstant,
cir::GlobalLinkageKind linkage )
inlinenodiscard

Creates a versioned global variable.

If the symbol is already taken, an ID will be appended to the symbol. The returned global must always be queried for its name so it can be referenced correctly.

Definition at line 600 of file CIRGenBuilder.h.

References cir::CIRBaseBuilderTy::createGlobal(), and clang::ast_matchers::type.

◆ createVTTAddrPoint() [1/2]

mlir::Value clang::CIRGen::CIRGenBuilderTy::createVTTAddrPoint ( mlir::Location loc,
mlir::Type retTy,
mlir::FlatSymbolRefAttr sym,
uint64_t offset )
inline

Definition at line 477 of file CIRGenBuilder.h.

◆ createVTTAddrPoint() [2/2]

mlir::Value clang::CIRGen::CIRGenBuilderTy::createVTTAddrPoint ( mlir::Location loc,
mlir::Type retTy,
mlir::Value addr,
uint64_t offset )
inline

Definition at line 471 of file CIRGenBuilder.h.

◆ emitIntrinsicCallOp()

template<typename... Operands>
mlir::Value clang::CIRGen::CIRGenBuilderTy::emitIntrinsicCallOp ( mlir::Location loc,
const llvm::StringRef str,
const mlir::Type & resTy,
Operands &&... op )
inline

◆ getAnonConstRecord()

cir::ConstRecordAttr clang::CIRGen::CIRGenBuilderTy::getAnonConstRecord ( mlir::ArrayAttr arrayAttr,
bool packed = false,
bool padded = false,
mlir::Type ty = {} )
inline

Definition at line 75 of file CIRGenBuilder.h.

Referenced by getTypeInfo().

◆ getAnonRecordTy()

cir::RecordType clang::CIRGen::CIRGenBuilderTy::getAnonRecordTy ( llvm::ArrayRef< mlir::Type > members,
bool packed = false,
bool padded = false )
inline

Get a CIR anonymous record type.

Definition at line 335 of file CIRGenBuilder.h.

References cir::MissingFeatures::astRecordDeclAttr(), getType(), and kind.

Referenced by emitX86Aes(), emitX86Aeswide(), and getCompleteRecordType().

◆ getArrayElement()

mlir::Value CIRGenBuilderTy::getArrayElement ( mlir::Location arrayLocBegin,
mlir::Location arrayLocEnd,
mlir::Value arrayPtr,
mlir::Type eltTy,
mlir::Value idx,
bool shouldDecay )

Create a cir.ptr_stride operation to get access to an array element.

idx is the index of the element to access, shouldDecay is true if the result should decay to a pointer to the element type.

Definition at line 34 of file CIRGenBuilder.cpp.

References cir::CIRBaseBuilderTy::getPointerTo(), and maybeBuildArrayDecay().

Referenced by emitArraySubscriptPtr(), and emitX86Aeswide().

◆ getBfloat6Ty()

cir::BF16Type clang::CIRGen::CIRGenBuilderTy::getBfloat6Ty ( )
inline

Definition at line 303 of file CIRGenBuilder.h.

◆ getCompleteNamedRecordType()

cir::RecordType clang::CIRGen::CIRGenBuilderTy::getCompleteNamedRecordType ( llvm::ArrayRef< mlir::Type > members,
bool packed,
bool padded,
llvm::StringRef name )
inline

Get a CIR named record type.

If a record already exists and is complete, but the client tries to fetch it with a different set of attributes, this method will crash.

Definition at line 151 of file CIRGenBuilder.h.

References cir::MissingFeatures::astRecordDeclAttr(), getType(), kind, and clang::ast_matchers::type.

Referenced by getCompleteRecordType().

◆ getCompleteRecordType()

cir::RecordType clang::CIRGen::CIRGenBuilderTy::getCompleteRecordType ( mlir::ArrayAttr fields,
bool packed = false,
bool padded = false,
llvm::StringRef name = "" )

◆ getConstArray()

cir::ConstArrayAttr clang::CIRGen::CIRGenBuilderTy::getConstArray ( mlir::Attribute attrs,
cir::ArrayType arrayTy ) const
inline

Definition at line 65 of file CIRGenBuilder.h.

◆ getConstFP()

cir::ConstantOp clang::CIRGen::CIRGenBuilderTy::getConstFP ( mlir::Location loc,
mlir::Type t,
llvm::APFloat fpVal )

Definition at line 81 of file CIRGenBuilder.cpp.

◆ getConstInt() [1/3]

cir::ConstantOp CIRGenBuilderTy::getConstInt ( mlir::Location loc,
llvm::APInt intVal,
bool isUnsigned = true )

Definition at line 68 of file CIRGenBuilder.cpp.

References getConstInt(), and isUnsigned().

◆ getConstInt() [2/3]

cir::ConstantOp CIRGenBuilderTy::getConstInt ( mlir::Location loc,
llvm::APSInt intVal )

◆ getConstInt() [3/3]

cir::ConstantOp CIRGenBuilderTy::getConstInt ( mlir::Location loc,
mlir::Type t,
uint64_t c )

Definition at line 74 of file CIRGenBuilder.cpp.

References c.

◆ getConstRecordOrZeroAttr()

mlir::Attribute clang::CIRGen::CIRGenBuilderTy::getConstRecordOrZeroAttr ( mlir::ArrayAttr arrayAttr,
bool packed = false,
bool padded = false,
mlir::Type type = {} )

◆ getDataMemberAttr()

cir::DataMemberAttr clang::CIRGen::CIRGenBuilderTy::getDataMemberAttr ( cir::DataMemberType ty,
unsigned memberIndex )
inline

Definition at line 202 of file CIRGenBuilder.h.

Referenced by clang::CIRGen::ConstantEmitter::tryEmitPrivate().

◆ getDoubleTy()

cir::DoubleType clang::CIRGen::CIRGenBuilderTy::getDoubleTy ( )
inline

Definition at line 305 of file CIRGenBuilder.h.

◆ getFp16Ty()

cir::FP16Type clang::CIRGen::CIRGenBuilderTy::getFp16Ty ( )
inline

Definition at line 302 of file CIRGenBuilder.h.

◆ getFuncType()

cir::FuncType clang::CIRGen::CIRGenBuilderTy::getFuncType ( llvm::ArrayRef< mlir::Type > params,
mlir::Type retTy,
bool isVarArg = false )
inline

Definition at line 125 of file CIRGenBuilder.h.

Referenced by getBadCastFn(), and getItaniumDynamicCastFn().

◆ getIncompleteRecordTy()

cir::RecordType clang::CIRGen::CIRGenBuilderTy::getIncompleteRecordTy ( llvm::StringRef name,
const clang::RecordDecl * rd )
inline

Get an incomplete CIR struct type.

If we have a complete record declaration, we may create an incomplete type and then add the members, so rd here may be complete.

Definition at line 183 of file CIRGenBuilder.h.

References getRecordKind(), clang::TagDecl::getTagKind(), getType(), and kind.

◆ getLongDoubleTy()

cir::LongDoubleType clang::CIRGen::CIRGenBuilderTy::getLongDoubleTy ( const llvm::fltSemantics & format) const
inline

Definition at line 109 of file CIRGenBuilder.h.

◆ getNullDataMemberAttr()

cir::DataMemberAttr clang::CIRGen::CIRGenBuilderTy::getNullDataMemberAttr ( cir::DataMemberType ty)
inline

Definition at line 207 of file CIRGenBuilder.h.

Referenced by getNullDataMemberPtr().

◆ getNullDataMemberPtr()

cir::ConstantOp clang::CIRGen::CIRGenBuilderTy::getNullDataMemberPtr ( cir::DataMemberType ty,
mlir::Location loc )
inline

Create constant nullptr for pointer-to-data-member type ty.

Definition at line 378 of file CIRGenBuilder.h.

References getNullDataMemberAttr().

◆ getNullMethodPtr()

cir::ConstantOp clang::CIRGen::CIRGenBuilderTy::getNullMethodPtr ( cir::MethodType ty,
mlir::Location loc )
inline

Definition at line 383 of file CIRGenBuilder.h.

References cir::CIRBaseBuilderTy::getNullMethodAttr().

◆ getPtrToVPtrType()

mlir::Type clang::CIRGen::CIRGenBuilderTy::getPtrToVPtrType ( )
inline

Definition at line 121 of file CIRGenBuilder.h.

References cir::CIRBaseBuilderTy::getPointerTo().

◆ getRecordKind()

cir::RecordType::RecordKind clang::CIRGen::CIRGenBuilderTy::getRecordKind ( const clang::TagTypeKind kind)
inline

Get a CIR record kind from a AST declaration tag.

Definition at line 131 of file CIRGenBuilder.h.

References clang::Class, clang::Enum, clang::Interface, kind, clang::Struct, and clang::Union.

Referenced by getIncompleteRecordTy().

◆ getSingleTy()

cir::SingleType clang::CIRGen::CIRGenBuilderTy::getSingleTy ( )
inline

Definition at line 304 of file CIRGenBuilder.h.

◆ getSInt16Ty()

cir::IntType clang::CIRGen::CIRGenBuilderTy::getSInt16Ty ( )
inline

Definition at line 293 of file CIRGenBuilder.h.

Referenced by getSIntNTy().

◆ getSInt32()

cir::ConstantOp clang::CIRGen::CIRGenBuilderTy::getSInt32 ( int32_t c,
mlir::Location loc )
inline

Definition at line 346 of file CIRGenBuilder.h.

References c, cir::CIRBaseBuilderTy::getConstantInt(), and getSInt32Ty().

◆ getSInt32Ty()

cir::IntType clang::CIRGen::CIRGenBuilderTy::getSInt32Ty ( )
inline

◆ getSInt64()

cir::ConstantOp clang::CIRGen::CIRGenBuilderTy::getSInt64 ( uint64_t c,
mlir::Location loc )
inline

Definition at line 352 of file CIRGenBuilder.h.

References c, cir::CIRBaseBuilderTy::getConstantInt(), and getSInt64Ty().

◆ getSInt64Ty()

cir::IntType clang::CIRGen::CIRGenBuilderTy::getSInt64Ty ( )
inline

Definition at line 295 of file CIRGenBuilder.h.

Referenced by emitX86MaskedCompareResult(), emitX86Muldq(), getSInt64(), and getSIntNTy().

◆ getSInt8Ty()

cir::IntType clang::CIRGen::CIRGenBuilderTy::getSInt8Ty ( )
inline

Definition at line 292 of file CIRGenBuilder.h.

Referenced by getSIntNTy().

◆ getSIntNTy()

cir::IntType clang::CIRGen::CIRGenBuilderTy::getSIntNTy ( int n)
inline

◆ getString()

mlir::Attribute clang::CIRGen::CIRGenBuilderTy::getString ( llvm::StringRef str,
mlir::Type eltTy,
std::optional< size_t > size )
inline

Get a cir::ConstArrayAttr for a string literal.

Note: This is different from what is returned by mlir::Builder::getStringAttr() which is an mlir::StringAttr.

Definition at line 40 of file CIRGenBuilder.h.

◆ getTypeInfo()

cir::TypeInfoAttr clang::CIRGen::CIRGenBuilderTy::getTypeInfo ( mlir::ArrayAttr fieldsAttr)
inline

Definition at line 92 of file CIRGenBuilder.h.

References getAnonConstRecord().

◆ getUInt16Ty()

cir::IntType clang::CIRGen::CIRGenBuilderTy::getUInt16Ty ( )
inline

Definition at line 298 of file CIRGenBuilder.h.

Referenced by getUIntNTy().

◆ getUInt32()

cir::ConstantOp clang::CIRGen::CIRGenBuilderTy::getUInt32 ( uint32_t c,
mlir::Location loc )
inline

Definition at line 349 of file CIRGenBuilder.h.

References c, cir::CIRBaseBuilderTy::getConstantInt(), and getUInt32Ty().

Referenced by emitX86Aeswide().

◆ getUInt32Ty()

cir::IntType clang::CIRGen::CIRGenBuilderTy::getUInt32Ty ( )
inline

Definition at line 299 of file CIRGenBuilder.h.

Referenced by getUInt32(), and getUIntNTy().

◆ getUInt64()

cir::ConstantOp clang::CIRGen::CIRGenBuilderTy::getUInt64 ( uint64_t c,
mlir::Location loc )
inline

Definition at line 355 of file CIRGenBuilder.h.

References c, cir::CIRBaseBuilderTy::getConstantInt(), and getUInt64Ty().

Referenced by emitVecInsert(), and genVscaleTimesFactor().

◆ getUInt64Ty()

cir::IntType clang::CIRGen::CIRGenBuilderTy::getUInt64Ty ( )
inline

Definition at line 300 of file CIRGenBuilder.h.

Referenced by emitExactDynamicCast(), getUInt64(), and getUIntNTy().

◆ getUInt8PtrTy()

cir::PointerType clang::CIRGen::CIRGenBuilderTy::getUInt8PtrTy ( )
inline

◆ getUInt8Ty()

cir::IntType clang::CIRGen::CIRGenBuilderTy::getUInt8Ty ( )
inline

Definition at line 297 of file CIRGenBuilder.h.

Referenced by emitBuiltinAlloca(), and getUIntNTy().

◆ getUIntNTy()

cir::IntType clang::CIRGen::CIRGenBuilderTy::getUIntNTy ( int n)
inline

◆ getUniqueAnonRecordName()

std::string clang::CIRGen::CIRGenBuilderTy::getUniqueAnonRecordName ( )
inline

Definition at line 97 of file CIRGenBuilder.h.

References getUniqueRecordName().

◆ getUniqueRecordName()

std::string clang::CIRGen::CIRGenBuilderTy::getUniqueRecordName ( const std::string & baseName)
inline

Definition at line 99 of file CIRGenBuilder.h.

Referenced by getUniqueAnonRecordName().

◆ getVoidTy()

cir::VoidType clang::CIRGen::CIRGenBuilderTy::getVoidTy ( )
inline

Definition at line 290 of file CIRGenBuilder.h.

Referenced by emitPrefetch().

◆ isInt()

bool clang::CIRGen::CIRGenBuilderTy::isInt ( mlir::Type i)
inline

Definition at line 329 of file CIRGenBuilder.h.

◆ isInt16Ty()

bool clang::CIRGen::CIRGenBuilderTy::isInt16Ty ( mlir::Type i)
inline

Definition at line 320 of file CIRGenBuilder.h.

◆ isInt32Ty()

bool clang::CIRGen::CIRGenBuilderTy::isInt32Ty ( mlir::Type i)
inline

Definition at line 323 of file CIRGenBuilder.h.

◆ isInt64Ty()

bool clang::CIRGen::CIRGenBuilderTy::isInt64Ty ( mlir::Type i)
inline

Definition at line 326 of file CIRGenBuilder.h.

◆ isInt8Ty()

bool clang::CIRGen::CIRGenBuilderTy::isInt8Ty ( mlir::Type i)
inline

Definition at line 317 of file CIRGenBuilder.h.

◆ isNullValue()

bool clang::CIRGen::CIRGenBuilderTy::isNullValue ( mlir::Attribute attr) const
inline

◆ maybeBuildArrayDecay()

mlir::Value CIRGenBuilderTy::maybeBuildArrayDecay ( mlir::Location loc,
mlir::Value arrayPtr,
mlir::Type eltTy )

Returns a decayed pointer to the first element of the array pointed to by arrayPtr.

Definition at line 17 of file CIRGenBuilder.cpp.

References cir::CIRBaseBuilderTy::getPointerTo().

Referenced by getArrayElement().


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