clang 22.0.0git
Public Member Functions | Static Public Member Functions | List of all members
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)
 
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::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.

◆ 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 469 of file CIRBaseBuilder.h.

References 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()

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

Definition at line 224 of file CIRBaseBuilder.h.

Referenced by createDummyValue(), and lowerArrayDtorCtorIntoLoop().

◆ createAnd()

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

Definition at line 402 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 376 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 368 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.

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

◆ 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 297 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

◆ createCast() [1/2]

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

Definition at line 345 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 491 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 580 of file CIRBaseBuilder.h.

Referenced by clang::CIRGen::CIRGenFunction::emitForStmt(), and lowerArrayDtorCtorIntoLoop().

◆ createContinue()

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

Create a continue operation.

Definition at line 211 of file CIRBaseBuilder.h.

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

◆ 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 clang::CIRGen::CIRGenFunction::emitDoStmt(), and lowerArrayDtorCtorIntoLoop().

◆ createDummyValue()

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

◆ 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.

Referenced by clang::CIRGen::CIRGenFunction::emitCXXForRangeStmt(), and clang::CIRGen::CIRGenFunction::emitForStmt().

◆ createGetGlobal() [1/2]

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

Definition at line 244 of file CIRBaseBuilder.h.

References createGetGlobal().

◆ createGetGlobal() [2/2]

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

◆ 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 
)
inline

◆ 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 306 of file CIRBaseBuilder.h.

Referenced by emitCallLikeOp().

◆ createIntCast()

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

Definition at line 352 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 356 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 496 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 418 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 423 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 395 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 428 of file CIRBaseBuilder.h.

References 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.

◆ createNSWAdd()

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

Definition at line 481 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 438 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 459 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 486 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 442 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 464 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 406 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 280 of file CIRBaseBuilder.h.

◆ createPtrToBoolCast()

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

Definition at line 364 of file CIRBaseBuilder.h.

References createCast(), and getBoolTy().

◆ createPtrToInt()

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

Definition at line 360 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 410 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 506 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

Definition at line 500 of file CIRBaseBuilder.h.

Referenced by createShift(), createShiftLeft(), and createShiftRight().

◆ createShift() [3/3]

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

Definition at line 512 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 529 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 519 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 534 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 524 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 248 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 447 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

◆ 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.

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

◆ createYield()

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

◆ getAlignmentAttr() [1/3]

mlir::IntegerAttr cir::CIRBaseBuilderTy::getAlignmentAttr ( clang::CharUnits  alignment)
inline

◆ getAlignmentAttr() [2/3]

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

Definition at line 571 of file CIRBaseBuilder.h.

◆ getAlignmentAttr() [3/3]

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

Definition at line 567 of file CIRBaseBuilder.h.

References getAlignmentAttr().

◆ getBestAllocaInsertPoint()

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

Definition at line 543 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

Definition at line 126 of file CIRBaseBuilder.h.

Referenced by createCompare(), createPtrToBoolCast(), and lowerComplexToScalarCast().

◆ getCIRBoolAttr()

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

◆ getConstant()

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

◆ 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

◆ getConstNullPtrAttr()

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

◆ 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()

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

◆ getNullValue()

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

◆ getPointerTo()

cir::PointerType cir::CIRBaseBuilderTy::getPointerTo ( mlir::Type  ty)
inline

◆ 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 575 of file CIRBaseBuilder.h.

References clang::CharUnits::getQuantity().

Referenced by clang::CIRGen::CIRGenModule::getSize().

◆ 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().

Referenced by clang::CIRGen::CIRGenTypes::convertType().

◆ getZeroInitAttr()

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

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