clang 22.0.0git
cir::CIRBaseBuilderTy Class Reference

#include "clang/CIR/Dialect/Builder/CIRBaseBuilder.h"

Inheritance diagram for cir::CIRBaseBuilderTy:
[legend]

Public Member Functions

 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 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::PointerType getPointerTo (mlir::Type ty)
cir::PointerType getVoidPtrTy ()
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)
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)
mlir::Value createGetGlobal (cir::GlobalOp global)
cir::CopyOp createCopy (mlir::Value dst, mlir::Value src)
 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::MemOrderAttr order={})
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 createTryCallOp (mlir::Location loc, mlir::SymbolRefAttr callee=mlir::SymbolRefAttr(), mlir::Type returnType=cir::VoidType(), mlir::ValueRange operands=mlir::ValueRange(), cir::SideEffect sideEffect=cir::SideEffect::All)
cir::CallOp createTryCallOp (mlir::Location loc, cir::FuncOp callee, mlir::ValueRange operands, cir::SideEffect sideEffect=cir::SideEffect::All)
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 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)
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::ConditionOp createCondition (mlir::Value condition)
 Create a loop condition.
cir::YieldOp createYield (mlir::Location loc, mlir::ValueRange value={})
 Create a yield operation.

Static Public Member Functions

static OpBuilder::InsertPoint getBestAllocaInsertPoint (mlir::Block *block)

Detailed Description

Definition at line 56 of file CIRBaseBuilder.h.

Constructor & Destructor Documentation

◆ CIRBaseBuilderTy() [1/2]

cir::CIRBaseBuilderTy::CIRBaseBuilderTy ( mlir::MLIRContext & mlirContext)
inline

Definition at line 59 of file CIRBaseBuilder.h.

Referenced by clang::CIRGen::CIRGenBuilderTy::CIRGenBuilderTy().

◆ CIRBaseBuilderTy() [2/2]

cir::CIRBaseBuilderTy::CIRBaseBuilderTy ( mlir::OpBuilder & builder)
inline

Definition at line 61 of file CIRBaseBuilder.h.

Member Function Documentation

◆ createAdd()

mlir::Value cir::CIRBaseBuilderTy::createAdd ( mlir::Location loc,
mlir::Value lhs,
mlir::Value rhs,
OverflowBehavior ob = OverflowBehavior::None )
inline

Definition at line 498 of file CIRBaseBuilder.h.

References cir::None, cir::NoSignedWrap, cir::NoUnsignedWrap, and cir::Saturated.

Referenced by createNSWAdd(), and createNUWAdd().

◆ createAlignedLoad()

mlir::Value cir::CIRBaseBuilderTy::createAlignedLoad ( mlir::Location loc,
mlir::Value ptr,
uint64_t alignment )
inline

Definition at line 169 of file CIRBaseBuilder.h.

References createLoad().

◆ createAlloca() [1/3]

mlir::Value cir::CIRBaseBuilderTy::createAlloca ( mlir::Location loc,
cir::PointerType addrType,
mlir::Type type,
llvm::StringRef name,
clang::CharUnits alignment,
mlir::Value dynAllocSize )
inline

Definition at line 232 of file CIRBaseBuilder.h.

References createAlloca(), and getAlignmentAttr().

◆ createAlloca() [2/3]

mlir::Value cir::CIRBaseBuilderTy::createAlloca ( mlir::Location loc,
cir::PointerType addrType,
mlir::Type type,
llvm::StringRef name,
mlir::IntegerAttr alignment )
inline

Definition at line 240 of file CIRBaseBuilder.h.

◆ createAlloca() [3/3]

mlir::Value cir::CIRBaseBuilderTy::createAlloca ( mlir::Location loc,
cir::PointerType addrType,
mlir::Type type,
llvm::StringRef name,
mlir::IntegerAttr alignment,
mlir::Value dynAllocSize )
inline

Definition at line 224 of file CIRBaseBuilder.h.

Referenced by createAlloca(), createDummyValue(), and lowerArrayDtorCtorIntoLoop().

◆ createAnd()

mlir::Value cir::CIRBaseBuilderTy::createAnd ( mlir::Location loc,
mlir::Value lhs,
mlir::Value rhs )
inline

Definition at line 431 of file CIRBaseBuilder.h.

References createBinop().

◆ createBinop()

mlir::Value cir::CIRBaseBuilderTy::createBinop ( mlir::Location loc,
mlir::Value lhs,
cir::BinOpKind kind,
mlir::Value rhs )
inline

◆ createBitcast() [1/2]

mlir::Value cir::CIRBaseBuilderTy::createBitcast ( mlir::Location loc,
mlir::Value src,
mlir::Type newTy )
inline

Definition at line 405 of file CIRBaseBuilder.h.

References createCast().

◆ createBitcast() [2/2]

mlir::Value cir::CIRBaseBuilderTy::createBitcast ( mlir::Value src,
mlir::Type newTy )
inline

◆ createBoolToInt()

mlir::Value cir::CIRBaseBuilderTy::createBoolToInt ( mlir::Value src,
mlir::Type newTy )
inline

Definition at line 397 of file CIRBaseBuilder.h.

References createCast().

◆ createBreak()

cir::BreakOp cir::CIRBaseBuilderTy::createBreak ( mlir::Location loc)
inline

Create a break operation.

Definition at line 206 of file CIRBaseBuilder.h.

◆ createCallOp() [1/2]

cir::CallOp cir::CIRBaseBuilderTy::createCallOp ( mlir::Location loc,
cir::FuncOp callee,
mlir::ValueRange operands,
llvm::ArrayRef< mlir::NamedAttribute > attrs = {} )
inline

Definition at line 326 of file CIRBaseBuilder.h.

◆ createCallOp() [2/2]

cir::CallOp cir::CIRBaseBuilderTy::createCallOp ( mlir::Location loc,
mlir::SymbolRefAttr callee,
mlir::Type returnType,
mlir::ValueRange operands,
llvm::ArrayRef< mlir::NamedAttribute > attrs = {} )
inline

Definition at line 318 of file CIRBaseBuilder.h.

Referenced by buildComplexBinOpLibCall(), createTryCallOp(), and emitCallLikeOp().

◆ createCast() [1/2]

mlir::Value cir::CIRBaseBuilderTy::createCast ( cir::CastKind kind,
mlir::Value src,
mlir::Type newTy )
inline

Definition at line 374 of file CIRBaseBuilder.h.

References createCast().

◆ createCast() [2/2]

mlir::Value cir::CIRBaseBuilderTy::createCast ( mlir::Location loc,
cir::CastKind kind,
mlir::Value src,
mlir::Type newTy )
inline

◆ createCompare()

cir::CmpOp cir::CIRBaseBuilderTy::createCompare ( mlir::Location loc,
cir::CmpOpKind kind,
mlir::Value lhs,
mlir::Value rhs )
inline

Definition at line 520 of file CIRBaseBuilder.h.

References getBoolTy().

Referenced by buildRangeReductionComplexDiv(), and createIsNaN().

◆ createComplexCreate()

mlir::Value cir::CIRBaseBuilderTy::createComplexCreate ( mlir::Location loc,
mlir::Value real,
mlir::Value imag )
inline

◆ createComplexImag()

mlir::Value cir::CIRBaseBuilderTy::createComplexImag ( mlir::Location loc,
mlir::Value operand )
inline

◆ createComplexReal()

mlir::Value cir::CIRBaseBuilderTy::createComplexReal ( mlir::Location loc,
mlir::Value operand )
inline

◆ createCondition()

cir::ConditionOp cir::CIRBaseBuilderTy::createCondition ( mlir::Value condition)
inline

Create a loop condition.

Definition at line 609 of file CIRBaseBuilder.h.

Referenced by lowerArrayDtorCtorIntoLoop().

◆ createContinue()

cir::ContinueOp cir::CIRBaseBuilderTy::createContinue ( mlir::Location loc)
inline

Create a continue operation.

Definition at line 211 of file CIRBaseBuilder.h.

◆ createCopy()

cir::CopyOp cir::CIRBaseBuilderTy::createCopy ( mlir::Value dst,
mlir::Value src )
inline

Create a copy with inferred length.

Definition at line 273 of file CIRBaseBuilder.h.

◆ createDoWhile()

cir::DoWhileOp cir::CIRBaseBuilderTy::createDoWhile ( mlir::Location loc,
llvm::function_ref< void(mlir::OpBuilder &, mlir::Location)> condBuilder,
llvm::function_ref< void(mlir::OpBuilder &, mlir::Location)> bodyBuilder )
inline

Create a do-while operation.

Definition at line 180 of file CIRBaseBuilder.h.

Referenced by lowerArrayDtorCtorIntoLoop().

◆ createDummyValue()

mlir::Value cir::CIRBaseBuilderTy::createDummyValue ( mlir::Location loc,
mlir::Type type,
clang::CharUnits alignment )
inline

Definition at line 300 of file CIRBaseBuilder.h.

References createAlloca(), getAlignmentAttr(), and getPointerTo().

◆ createFor()

cir::ForOp cir::CIRBaseBuilderTy::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 )
inline

Create a for operation.

Definition at line 196 of file CIRBaseBuilder.h.

◆ createGetGlobal() [1/2]

mlir::Value cir::CIRBaseBuilderTy::createGetGlobal ( cir::GlobalOp global)
inline

Definition at line 268 of file CIRBaseBuilder.h.

References createGetGlobal().

◆ createGetGlobal() [2/2]

mlir::Value cir::CIRBaseBuilderTy::createGetGlobal ( mlir::Location loc,
cir::GlobalOp global )
inline

Definition at line 262 of file CIRBaseBuilder.h.

References cir::MissingFeatures::addressSpace(), and getPointerTo().

Referenced by createGetGlobal().

◆ createGetMember()

cir::GetMemberOp cir::CIRBaseBuilderTy::createGetMember ( mlir::Location loc,
mlir::Type resultTy,
mlir::Value base,
llvm::StringRef name,
unsigned index )
inline

◆ createGlobal()

cir::GlobalOp cir::CIRBaseBuilderTy::createGlobal ( mlir::ModuleOp mlirModule,
mlir::Location loc,
mlir::StringRef name,
mlir::Type type,
bool isConstant,
cir::GlobalLinkageKind linkage )
inlinenodiscard

◆ createIndirectCallOp()

cir::CallOp cir::CIRBaseBuilderTy::createIndirectCallOp ( mlir::Location loc,
mlir::Value indirectTarget,
cir::FuncType funcType,
mlir::ValueRange operands,
llvm::ArrayRef< mlir::NamedAttribute > attrs = {} )
inline

Definition at line 335 of file CIRBaseBuilder.h.

Referenced by emitCallLikeOp().

◆ createIntCast()

mlir::Value cir::CIRBaseBuilderTy::createIntCast ( mlir::Value src,
mlir::Type newTy )
inline

Definition at line 381 of file CIRBaseBuilder.h.

References createCast().

Referenced by clang::CIRGen::CIRGenBuilderTy::createNeg(), and emitBuiltinBitOp().

◆ createIntToPtr()

mlir::Value cir::CIRBaseBuilderTy::createIntToPtr ( mlir::Value src,
mlir::Type newTy )
inline

Definition at line 385 of file CIRBaseBuilder.h.

References createCast().

Referenced by emitPointerArithmetic().

◆ createIsNaN()

mlir::Value cir::CIRBaseBuilderTy::createIsNaN ( mlir::Location loc,
mlir::Value operand )
inline

Definition at line 525 of file CIRBaseBuilder.h.

References createCompare().

Referenced by lowerComplexMul().

◆ createLoad()

cir::LoadOp cir::CIRBaseBuilderTy::createLoad ( mlir::Location loc,
mlir::Value ptr,
bool isVolatile = false,
uint64_t alignment = 0 )
inline

Definition at line 162 of file CIRBaseBuilder.h.

References getAlignmentAttr().

Referenced by createAlignedLoad().

◆ createLogicalAnd()

mlir::Value cir::CIRBaseBuilderTy::createLogicalAnd ( mlir::Location loc,
mlir::Value lhs,
mlir::Value rhs )
inline

Definition at line 447 of file CIRBaseBuilder.h.

References createSelect(), and getBool().

Referenced by lowerComplexMul().

◆ createLogicalOr()

mlir::Value cir::CIRBaseBuilderTy::createLogicalOr ( mlir::Location loc,
mlir::Value lhs,
mlir::Value rhs )
inline

Definition at line 452 of file CIRBaseBuilder.h.

References createSelect(), and getBool().

Referenced by lowerComplexToScalarCast().

◆ createLowBitsSet()

mlir::Value cir::CIRBaseBuilderTy::createLowBitsSet ( mlir::Location loc,
unsigned size,
unsigned bits )
inline

Definition at line 424 of file CIRBaseBuilder.h.

References getConstAPInt().

◆ createMul()

mlir::Value cir::CIRBaseBuilderTy::createMul ( mlir::Location loc,
mlir::Value lhs,
mlir::Value rhs,
OverflowBehavior ob = OverflowBehavior::None )
inline

Definition at line 457 of file CIRBaseBuilder.h.

References cir::None, cir::NoSignedWrap, and cir::NoUnsignedWrap.

Referenced by createNSWMul(), and createNUWAMul().

◆ createNot()

mlir::Value cir::CIRBaseBuilderTy::createNot ( mlir::Value value)
inline

Definition at line 174 of file CIRBaseBuilder.h.

Referenced by emitAtomicCmpXchg().

◆ createNSWAdd()

mlir::Value cir::CIRBaseBuilderTy::createNSWAdd ( mlir::Location loc,
mlir::Value lhs,
mlir::Value rhs )
inline

Definition at line 510 of file CIRBaseBuilder.h.

References createAdd(), and cir::NoSignedWrap.

◆ createNSWMul()

mlir::Value cir::CIRBaseBuilderTy::createNSWMul ( mlir::Location loc,
mlir::Value lhs,
mlir::Value rhs )
inline

Definition at line 467 of file CIRBaseBuilder.h.

References createMul(), and cir::NoSignedWrap.

◆ createNSWSub()

mlir::Value cir::CIRBaseBuilderTy::createNSWSub ( mlir::Location loc,
mlir::Value lhs,
mlir::Value rhs )
inline

Definition at line 488 of file CIRBaseBuilder.h.

References createSub(), and cir::NoSignedWrap.

◆ createNUWAdd()

mlir::Value cir::CIRBaseBuilderTy::createNUWAdd ( mlir::Location loc,
mlir::Value lhs,
mlir::Value rhs )
inline

Definition at line 515 of file CIRBaseBuilder.h.

References createAdd(), and cir::NoUnsignedWrap.

◆ createNUWAMul()

mlir::Value cir::CIRBaseBuilderTy::createNUWAMul ( mlir::Location loc,
mlir::Value lhs,
mlir::Value rhs )
inline

Definition at line 471 of file CIRBaseBuilder.h.

References createMul(), and cir::NoUnsignedWrap.

◆ createNUWSub()

mlir::Value cir::CIRBaseBuilderTy::createNUWSub ( mlir::Location loc,
mlir::Value lhs,
mlir::Value rhs )
inline

Definition at line 493 of file CIRBaseBuilder.h.

References createSub(), and cir::NoUnsignedWrap.

◆ createOr()

mlir::Value cir::CIRBaseBuilderTy::createOr ( mlir::Location loc,
mlir::Value lhs,
mlir::Value rhs )
inline

Definition at line 435 of file CIRBaseBuilder.h.

References createBinop().

◆ createPtrBitcast()

mlir::Value cir::CIRBaseBuilderTy::createPtrBitcast ( mlir::Value src,
mlir::Type newPointeeTy )
inline

◆ createPtrStride()

cir::PtrStrideOp cir::CIRBaseBuilderTy::createPtrStride ( mlir::Location loc,
mlir::Value base,
mlir::Value stride )
inline

Definition at line 309 of file CIRBaseBuilder.h.

◆ createPtrToBoolCast()

mlir::Value cir::CIRBaseBuilderTy::createPtrToBoolCast ( mlir::Value v)
inline

Definition at line 393 of file CIRBaseBuilder.h.

References createCast(), and getBoolTy().

◆ createPtrToInt()

mlir::Value cir::CIRBaseBuilderTy::createPtrToInt ( mlir::Value src,
mlir::Type newTy )
inline

Definition at line 389 of file CIRBaseBuilder.h.

References createCast().

◆ createSelect()

mlir::Value cir::CIRBaseBuilderTy::createSelect ( mlir::Location loc,
mlir::Value condition,
mlir::Value trueValue,
mlir::Value falseValue )
inline

Definition at line 439 of file CIRBaseBuilder.h.

Referenced by createLogicalAnd(), and createLogicalOr().

◆ createShift() [1/3]

mlir::Value cir::CIRBaseBuilderTy::createShift ( mlir::Location loc,
mlir::Value lhs,
const llvm::APInt & rhs,
bool isShiftLeft )
inline

Definition at line 535 of file CIRBaseBuilder.h.

References createShift(), and getConstAPInt().

◆ createShift() [2/3]

mlir::Value cir::CIRBaseBuilderTy::createShift ( mlir::Location loc,
mlir::Value lhs,
mlir::Value rhs,
bool isShiftLeft )
inline

◆ createShift() [3/3]

mlir::Value cir::CIRBaseBuilderTy::createShift ( mlir::Location loc,
mlir::Value lhs,
unsigned bits,
bool isShiftLeft )
inline

Definition at line 541 of file CIRBaseBuilder.h.

References createShift().

◆ createShiftLeft() [1/2]

mlir::Value cir::CIRBaseBuilderTy::createShiftLeft ( mlir::Location loc,
mlir::Value lhs,
mlir::Value rhs )
inline

Definition at line 558 of file CIRBaseBuilder.h.

References createShift().

◆ createShiftLeft() [2/2]

mlir::Value cir::CIRBaseBuilderTy::createShiftLeft ( mlir::Location loc,
mlir::Value lhs,
unsigned bits )
inline

Definition at line 548 of file CIRBaseBuilder.h.

References createShift().

◆ createShiftRight() [1/2]

mlir::Value cir::CIRBaseBuilderTy::createShiftRight ( mlir::Location loc,
mlir::Value lhs,
mlir::Value rhs )
inline

Definition at line 563 of file CIRBaseBuilder.h.

References createShift().

◆ createShiftRight() [2/2]

mlir::Value cir::CIRBaseBuilderTy::createShiftRight ( mlir::Location loc,
mlir::Value lhs,
unsigned bits )
inline

Definition at line 553 of file CIRBaseBuilder.h.

References createShift().

◆ createStore()

cir::StoreOp cir::CIRBaseBuilderTy::createStore ( mlir::Location loc,
mlir::Value val,
mlir::Value dst,
bool isVolatile = false,
mlir::IntegerAttr align = {},
cir::MemOrderAttr order = {} )
inline

Definition at line 277 of file CIRBaseBuilder.h.

Referenced by lowerArrayDtorCtorIntoLoop().

◆ createSub()

mlir::Value cir::CIRBaseBuilderTy::createSub ( mlir::Location loc,
mlir::Value lhs,
mlir::Value rhs,
OverflowBehavior ob = OverflowBehavior::Saturated )
inline

Definition at line 476 of file CIRBaseBuilder.h.

References cir::NoSignedWrap, cir::NoUnsignedWrap, and cir::Saturated.

Referenced by createNSWSub(), and createNUWSub().

◆ createTryCallOp() [1/2]

cir::CallOp cir::CIRBaseBuilderTy::createTryCallOp ( mlir::Location loc,
cir::FuncOp callee,
mlir::ValueRange operands,
cir::SideEffect sideEffect = cir::SideEffect::All )
inline

◆ createTryCallOp() [2/2]

cir::CallOp cir::CIRBaseBuilderTy::createTryCallOp ( mlir::Location loc,
mlir::SymbolRefAttr callee = mlir::SymbolRefAttr(),
mlir::Type returnType = cir::VoidType(),
mlir::ValueRange operands = mlir::ValueRange(),
cir::SideEffect sideEffect = cir::SideEffect::All )
inline

◆ createUnaryOp()

mlir::Value cir::CIRBaseBuilderTy::createUnaryOp ( mlir::Location loc,
cir::UnaryOpKind kind,
mlir::Value operand )
inline

Definition at line 215 of file CIRBaseBuilder.h.

◆ createWhile()

cir::WhileOp cir::CIRBaseBuilderTy::createWhile ( mlir::Location loc,
llvm::function_ref< void(mlir::OpBuilder &, mlir::Location)> condBuilder,
llvm::function_ref< void(mlir::OpBuilder &, mlir::Location)> bodyBuilder )
inline

Create a while operation.

Definition at line 188 of file CIRBaseBuilder.h.

◆ createYield()

cir::YieldOp cir::CIRBaseBuilderTy::createYield ( mlir::Location loc,
mlir::ValueRange value = {} )
inline

◆ getAlignmentAttr() [1/3]

◆ getAlignmentAttr() [2/3]

mlir::IntegerAttr cir::CIRBaseBuilderTy::getAlignmentAttr ( int64_t alignment)
inline

Definition at line 600 of file CIRBaseBuilder.h.

◆ getAlignmentAttr() [3/3]

mlir::IntegerAttr cir::CIRBaseBuilderTy::getAlignmentAttr ( llvm::Align alignment)
inline

Definition at line 596 of file CIRBaseBuilder.h.

References getAlignmentAttr().

◆ getBestAllocaInsertPoint()

OpBuilder::InsertPoint cir::CIRBaseBuilderTy::getBestAllocaInsertPoint ( mlir::Block * block)
inlinestatic

Definition at line 572 of file CIRBaseBuilder.h.

◆ getBool()

cir::ConstantOp cir::CIRBaseBuilderTy::getBool ( bool state,
mlir::Location loc )
inline

Definition at line 120 of file CIRBaseBuilder.h.

References getCIRBoolAttr().

Referenced by createLogicalAnd(), createLogicalOr(), getFalse(), and getTrue().

◆ getBoolTy()

cir::BoolType cir::CIRBaseBuilderTy::getBoolTy ( )
inline

◆ getCIRBoolAttr()

cir::BoolAttr cir::CIRBaseBuilderTy::getCIRBoolAttr ( bool state)
inline

◆ getConstant()

cir::ConstantOp cir::CIRBaseBuilderTy::getConstant ( mlir::Location loc,
mlir::TypedAttr attr )
inline

Definition at line 68 of file CIRBaseBuilder.h.

Referenced by emitCXXNewAllocSize(), getConstantInt(), and getNullValue().

◆ getConstantInt()

cir::ConstantOp cir::CIRBaseBuilderTy::getConstantInt ( mlir::Location loc,
mlir::Type ty,
int64_t value )
inline

◆ getConstAPInt()

mlir::Value cir::CIRBaseBuilderTy::getConstAPInt ( mlir::Location loc,
mlir::Type typ,
const llvm::APInt & val )
inline

Definition at line 63 of file CIRBaseBuilder.h.

Referenced by createLowBitsSet(), createShift(), getSignedInt(), and getUnsignedInt().

◆ getConstNullPtrAttr()

mlir::TypedAttr cir::CIRBaseBuilderTy::getConstNullPtrAttr ( mlir::Type t)
inline

Definition at line 94 of file CIRBaseBuilder.h.

References getConstPtrAttr().

Referenced by getZeroInitAttr().

◆ getConstPtrAttr()

mlir::TypedAttr cir::CIRBaseBuilderTy::getConstPtrAttr ( mlir::Type type,
int64_t value )
inline

◆ getFalse()

cir::ConstantOp cir::CIRBaseBuilderTy::getFalse ( mlir::Location loc)
inline

Definition at line 123 of file CIRBaseBuilder.h.

References getBool().

◆ getFalseAttr()

cir::BoolAttr cir::CIRBaseBuilderTy::getFalseAttr ( )
inline

Definition at line 141 of file CIRBaseBuilder.h.

References getCIRBoolAttr().

Referenced by getZeroInitAttr().

◆ getGlobalViewAttr() [1/2]

cir::GlobalViewAttr cir::CIRBaseBuilderTy::getGlobalViewAttr ( cir::GlobalOp globalOp,
mlir::ArrayAttr indices = {} )
inline

Get constant address of a global variable as an MLIR attribute.

This wrapper infers the attribute type through the global op.

Definition at line 248 of file CIRBaseBuilder.h.

◆ getGlobalViewAttr() [2/2]

cir::GlobalViewAttr cir::CIRBaseBuilderTy::getGlobalViewAttr ( cir::PointerType type,
cir::GlobalOp globalOp,
mlir::ArrayAttr indices = {} )
inline

Get constant address of a global variable as an MLIR attribute.

Definition at line 255 of file CIRBaseBuilder.h.

◆ getNullValue()

cir::ConstantOp cir::CIRBaseBuilderTy::getNullValue ( mlir::Type ty,
mlir::Location loc )
inline

Definition at line 90 of file CIRBaseBuilder.h.

References getConstant(), and getZeroInitAttr().

Referenced by lowerScalarToComplexCast().

◆ getPointerTo()

◆ getSignedInt()

mlir::Value cir::CIRBaseBuilderTy::getSignedInt ( mlir::Location loc,
int64_t val,
unsigned numBits )
inline

Definition at line 77 of file CIRBaseBuilder.h.

References getConstAPInt().

Referenced by lowerArrayDtorCtorIntoLoop().

◆ getSizeFromCharUnits()

mlir::IntegerAttr cir::CIRBaseBuilderTy::getSizeFromCharUnits ( clang::CharUnits size)
inline

Definition at line 604 of file CIRBaseBuilder.h.

References clang::CharUnits::getQuantity().

◆ getTrue()

cir::ConstantOp cir::CIRBaseBuilderTy::getTrue ( mlir::Location loc)
inline

Definition at line 124 of file CIRBaseBuilder.h.

References getBool().

◆ getTrueAttr()

cir::BoolAttr cir::CIRBaseBuilderTy::getTrueAttr ( )
inline

Definition at line 140 of file CIRBaseBuilder.h.

References getCIRBoolAttr().

◆ getUnsignedInt()

mlir::Value cir::CIRBaseBuilderTy::getUnsignedInt ( mlir::Location loc,
uint64_t val,
unsigned numBits )
inline

Definition at line 83 of file CIRBaseBuilder.h.

References getConstAPInt().

Referenced by lowerArrayDtorCtorIntoLoop().

◆ getVoidPtrTy()

cir::PointerType cir::CIRBaseBuilderTy::getVoidPtrTy ( )
inline

Definition at line 132 of file CIRBaseBuilder.h.

References getPointerTo().

◆ getZeroInitAttr()

mlir::TypedAttr cir::CIRBaseBuilderTy::getZeroInitAttr ( mlir::Type ty)
inline

Definition at line 99 of file CIRBaseBuilder.h.

References getConstNullPtrAttr(), and getFalseAttr().

Referenced by getNullValue().


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