MLIR 22.0.0git
mlir::arith::ConstantIntOp Class Reference

Specialization of arith.constant op that returns an integer value. More...

#include "mlir/Dialect/Arith/IR/Arith.h"

Inheritance diagram for mlir::arith::ConstantIntOp:

Public Member Functions

int64_t value ()

Static Public Member Functions

::mlir::TypeID resolveTypeID ()
static void build (OpBuilder &builder, OperationState &result, int64_t value, unsigned width)
 Build a constant int op that produces an integer of the specified width.
static ConstantIntOp create (OpBuilder &builder, Location location, int64_t value, unsigned width)
static ConstantIntOp create (ImplicitLocOpBuilder &builder, int64_t value, unsigned width)
static void build (OpBuilder &builder, OperationState &result, Type type, int64_t value)
 Build a constant int op that produces an integer of the specified type, which must be an integer type.
static ConstantIntOp create (OpBuilder &builder, Location location, Type type, int64_t value)
static ConstantIntOp create (ImplicitLocOpBuilder &builder, Type type, int64_t value)
static void build (OpBuilder &builder, OperationState &result, Type type, const APInt &value)
 Build a constant int op that produces an integer from an APInt.
static ConstantIntOp create (OpBuilder &builder, Location location, Type type, const APInt &value)
static ConstantIntOp create (ImplicitLocOpBuilder &builder, Type type, const APInt &value)
static bool classof (Operation *op)

Detailed Description

Specialization of arith.constant op that returns an integer value.

Definition at line 54 of file Arith.h.

Member Function Documentation

◆ build() [1/3]

void arith::ConstantIntOp::build ( OpBuilder & builder,
OperationState & result,
int64_t value,
unsigned width )
static

Build a constant int op that produces an integer of the specified width.

Definition at line 251 of file ArithOps.cpp.

References mlir::Builder::getIntegerAttr(), mlir::Builder::getIntegerType(), result, and value().

Referenced by create(), create(), and create().

◆ build() [2/3]

void arith::ConstantIntOp::build ( OpBuilder & builder,
OperationState & result,
Type type,
const APInt & value )
static

Build a constant int op that produces an integer from an APInt.

Definition at line 296 of file ArithOps.cpp.

References mlir::Builder::getIntegerAttr(), result, and value().

◆ build() [3/3]

void arith::ConstantIntOp::build ( OpBuilder & builder,
OperationState & result,
Type type,
int64_t value )
static

Build a constant int op that produces an integer of the specified type, which must be an integer type.

Definition at line 275 of file ArithOps.cpp.

References mlir::Builder::getIntegerAttr(), result, and value().

◆ classof()

bool arith::ConstantIntOp::classof ( Operation * op)
static

Definition at line 318 of file ArithOps.cpp.

◆ create() [1/6]

arith::ConstantIntOp arith::ConstantIntOp::create ( ImplicitLocOpBuilder & builder,
int64_t value,
unsigned width )
static

Definition at line 269 of file ArithOps.cpp.

References create(), mlir::ImplicitLocOpBuilder::getLoc(), and value().

◆ create() [2/6]

arith::ConstantIntOp arith::ConstantIntOp::create ( ImplicitLocOpBuilder & builder,
Type type,
const APInt & value )
static

Definition at line 312 of file ArithOps.cpp.

References create(), mlir::ImplicitLocOpBuilder::getLoc(), and value().

◆ create() [3/6]

arith::ConstantIntOp arith::ConstantIntOp::create ( ImplicitLocOpBuilder & builder,
Type type,
int64_t value )
static

Definition at line 291 of file ArithOps.cpp.

References create(), mlir::ImplicitLocOpBuilder::getLoc(), and value().

◆ create() [4/6]

◆ create() [5/6]

arith::ConstantIntOp arith::ConstantIntOp::create ( OpBuilder & builder,
Location location,
Type type,
const APInt & value )
static

Definition at line 302 of file ArithOps.cpp.

References build(), mlir::OpBuilder::create(), result, and value().

◆ create() [6/6]

arith::ConstantIntOp arith::ConstantIntOp::create ( OpBuilder & builder,
Location location,
Type type,
int64_t value )
static

Definition at line 281 of file ArithOps.cpp.

References build(), mlir::OpBuilder::create(), result, and value().

◆ resolveTypeID()

::mlir::TypeID mlir::arith::ConstantIntOp::resolveTypeID ( )
inlinestatic

Definition at line 57 of file Arith.h.

References mlir::TypeID::get().

◆ value()

int64_t mlir::arith::ConstantIntOp::value ( )
inline

Definition at line 84 of file Arith.h.

Referenced by build(), build(), build(), create(), create(), create(), create(), create(), and create().


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