mlir.dialects.index

Classes

AddOp

The index.add operation takes two index values and computes their sum.

AddOpAdaptor

AndOp

The index.and operation takes two index values and computes their bitwise

AndOpAdaptor

BoolConstantOp

The index.bool.constant operation produces an bool-typed SSA value equal

BoolConstantOpAdaptor

CastSOp

The index.casts operation enables conversions between values of index type

CastSOpAdaptor

CastUOp

The index.castu operation enables conversions between values of index type

CastUOpAdaptor

CeilDivSOp

The index.ceildivs operation takes two index values and computes their

CeilDivSOpAdaptor

CeilDivUOp

The index.ceildivu operation takes two index values and computes their

CeilDivUOpAdaptor

CmpOp

The index.cmp operation takes two index values and compares them according

CmpOpAdaptor

ConstantOp

The index.constant operation produces an index-typed SSA value equal to

ConstantOpAdaptor

DivSOp

The index.divs operation takes two index values and computes their signed

DivSOpAdaptor

DivUOp

The index.divu operation takes two index values and computes their

DivUOpAdaptor

FloorDivSOp

The index.floordivs operation takes two index values and computes their

FloorDivSOpAdaptor

MaxSOp

The index.maxs operation takes two index values and computes their signed

MaxSOpAdaptor

MaxUOp

The index.maxu operation takes two index values and computes their

MaxUOpAdaptor

MinSOp

The index.mins operation takes two index values and computes their signed

MinSOpAdaptor

MinUOp

The index.minu operation takes two index values and computes their

MinUOpAdaptor

MulOp

The index.mul operation takes two index values and computes their product.

MulOpAdaptor

OrOp

The index.or operation takes two index values and computes their bitwise

OrOpAdaptor

RemSOp

The index.rems operation takes two index values and computes their signed

RemSOpAdaptor

RemUOp

The index.remu operation takes two index values and computes their

RemUOpAdaptor

ShlOp

The index.shl operation shifts an index value to the left by a variable

ShlOpAdaptor

ShrSOp

The index.shrs operation shifts an index value to the right by a variable

ShrSOpAdaptor

ShrUOp

The index.shru operation shifts an index value to the right by a variable

ShrUOpAdaptor

SizeOfOp

The index.sizeof operation produces an index-typed SSA value equal to the

SizeOfOpAdaptor

SubOp

The index.sub operation takes two index values and computes the difference

SubOpAdaptor

XOrOp

The index.xor operation takes two index values and computes their bitwise

XOrOpAdaptor

IndexCmpPredicate

index comparison predicate kind

Functions

add(→ _ods_ir)

and_(→ _ods_ir)

bool_constant(→ _ods_ir)

casts(→ _ods_ir)

castu(→ _ods_ir)

ceildivs(→ _ods_ir)

ceildivu(→ _ods_ir)

cmp(→ _ods_ir)

constant(→ _ods_ir)

divs(→ _ods_ir)

divu(→ _ods_ir)

floordivs(→ _ods_ir)

maxs(→ _ods_ir)

maxu(→ _ods_ir)

mins(→ _ods_ir)

minu(→ _ods_ir)

mul(→ _ods_ir)

or_(→ _ods_ir)

rems(→ _ods_ir)

remu(→ _ods_ir)

shl(→ _ods_ir)

shrs(→ _ods_ir)

shru(→ _ods_ir)

sizeof(→ _ods_ir)

sub(→ _ods_ir)

xor(→ _ods_ir)

register_attribute_builder(kind[, replace])

Module Contents

class mlir.dialects.index.AddOp(lhs, rhs, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The index.add operation takes two index values and computes their sum.

Example:

// c = a + b
%c = index.add %a, %b
OPERATION_NAME = 'index.add'
_ODS_REGIONS = (0, True)
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
result() _ods_ir[_ods_ir]

Shortcut to get an op result if it has only one (throws an error otherwise).

class mlir.dialects.index.AddOpAdaptor(operands: list, attributes: OpAttributeMap)
class mlir.dialects.index.AddOpAdaptor(operands: list, opview: OpView)

Bases: _ods_ir

OPERATION_NAME = 'index.add'
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
mlir.dialects.index.add(lhs, rhs, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects.index.AndOp(lhs, rhs, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The index.and operation takes two index values and computes their bitwise and.

Example:

// c = a & b
%c = index.and %a, %b
OPERATION_NAME = 'index.and'
_ODS_REGIONS = (0, True)
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
result() _ods_ir[_ods_ir]

Shortcut to get an op result if it has only one (throws an error otherwise).

class mlir.dialects.index.AndOpAdaptor(operands: list, attributes: OpAttributeMap)
class mlir.dialects.index.AndOpAdaptor(operands: list, opview: OpView)

Bases: _ods_ir

OPERATION_NAME = 'index.and'
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
mlir.dialects.index.and_(lhs, rhs, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects.index.BoolConstantOp(value, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The index.bool.constant operation produces an bool-typed SSA value equal to either true or false.

This operation is used to materialize bool constants that arise when folding index.cmp.

Example:

%0 = index.bool.constant true
OPERATION_NAME = 'index.bool.constant'
_ODS_REGIONS = (0, True)
value() _ods_ir
result() _ods_ir[_ods_ir]

Shortcut to get an op result if it has only one (throws an error otherwise).

class mlir.dialects.index.BoolConstantOpAdaptor(operands: list, attributes: OpAttributeMap)
class mlir.dialects.index.BoolConstantOpAdaptor(operands: list, opview: OpView)

Bases: _ods_ir

OPERATION_NAME = 'index.bool.constant'
value() _ods_ir
mlir.dialects.index.bool_constant(value, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects.index.CastSOp(output, input, *, loc=None, ip=None)

Bases: _ods_ir

The index.casts operation enables conversions between values of index type and concrete fixed-width integer types. If casting to a wider integer, the value is sign-extended. If casting to a narrower integer, the value is truncated.

Example:

// Cast to i32
%0 = index.casts %a : index to i32

// Cast from i64
%1 = index.casts %b : i64 to index
OPERATION_NAME = 'index.casts'
_ODS_REGIONS = (0, True)
input() _ods_ir
output() _ods_ir
class mlir.dialects.index.CastSOpAdaptor(operands: list, attributes: OpAttributeMap)
class mlir.dialects.index.CastSOpAdaptor(operands: list, opview: OpView)

Bases: _ods_ir

OPERATION_NAME = 'index.casts'
input() _ods_ir
mlir.dialects.index.casts(output, input, *, loc=None, ip=None) _ods_ir
class mlir.dialects.index.CastUOp(output, input, *, loc=None, ip=None)

Bases: _ods_ir

The index.castu operation enables conversions between values of index type and concrete fixed-width integer types. If casting to a wider integer, the value is zero-extended. If casting to a narrower integer, the value is truncated.

Example:

// Cast to i32
%0 = index.castu %a : index to i32

// Cast from i64
%1 = index.castu %b : i64 to index
OPERATION_NAME = 'index.castu'
_ODS_REGIONS = (0, True)
input() _ods_ir
output() _ods_ir
class mlir.dialects.index.CastUOpAdaptor(operands: list, attributes: OpAttributeMap)
class mlir.dialects.index.CastUOpAdaptor(operands: list, opview: OpView)

Bases: _ods_ir

OPERATION_NAME = 'index.castu'
input() _ods_ir
mlir.dialects.index.castu(output, input, *, loc=None, ip=None) _ods_ir
class mlir.dialects.index.CeilDivSOp(lhs, rhs, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The index.ceildivs operation takes two index values and computes their signed quotient. Treats the leading bit as the sign and rounds towards positive infinity, i.e. 7 / -2 = -3.

Note: division by zero and signed division overflow are undefined behaviour.

Example:

// c = ceil(a / b)
%c = index.ceildivs %a, %b
OPERATION_NAME = 'index.ceildivs'
_ODS_REGIONS = (0, True)
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
result() _ods_ir[_ods_ir]

Shortcut to get an op result if it has only one (throws an error otherwise).

class mlir.dialects.index.CeilDivSOpAdaptor(operands: list, attributes: OpAttributeMap)
class mlir.dialects.index.CeilDivSOpAdaptor(operands: list, opview: OpView)

Bases: _ods_ir

OPERATION_NAME = 'index.ceildivs'
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
mlir.dialects.index.ceildivs(lhs, rhs, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects.index.CeilDivUOp(lhs, rhs, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The index.ceildivu operation takes two index values and computes their unsigned quotient. Treats the leading bit as the most significant and rounds towards positive infinity, i.e. 6 / -2 = 1.

Note: division by zero is undefined behaviour.

Example:

// c = ceil(a / b)
%c = index.ceildivu %a, %b
OPERATION_NAME = 'index.ceildivu'
_ODS_REGIONS = (0, True)
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
result() _ods_ir[_ods_ir]

Shortcut to get an op result if it has only one (throws an error otherwise).

class mlir.dialects.index.CeilDivUOpAdaptor(operands: list, attributes: OpAttributeMap)
class mlir.dialects.index.CeilDivUOpAdaptor(operands: list, opview: OpView)

Bases: _ods_ir

OPERATION_NAME = 'index.ceildivu'
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
mlir.dialects.index.ceildivu(lhs, rhs, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects.index.CmpOp(pred, lhs, rhs, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The index.cmp operation takes two index values and compares them according to the comparison predicate and returns an i1. The following comparisons are supported:

  • eq: equal

  • ne: not equal

  • slt: signed less than

  • sle: signed less than or equal

  • sgt: signed greater than

  • sge: signed greater than or equal

  • ult: unsigned less than

  • ule: unsigned less than or equal

  • ugt: unsigned greater than

  • uge: unsigned greater than or equal

The result is 1 if the comparison is true and 0 otherwise.

Example:

// Signed less than comparison.
%0 = index.cmp slt(%a, %b)

// Unsigned greater than or equal comparison.
%1 = index.cmp uge(%a, %b)

// Not equal comparison.
%2 = index.cmp ne(%a, %b)
OPERATION_NAME = 'index.cmp'
_ODS_REGIONS = (0, True)
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
pred() _ods_ir
result() _ods_ir[_ods_ir]

Shortcut to get an op result if it has only one (throws an error otherwise).

class mlir.dialects.index.CmpOpAdaptor(operands: list, attributes: OpAttributeMap)
class mlir.dialects.index.CmpOpAdaptor(operands: list, opview: OpView)

Bases: _ods_ir

OPERATION_NAME = 'index.cmp'
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
pred() _ods_ir
mlir.dialects.index.cmp(pred, lhs, rhs, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects.index.ConstantOp(value, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The index.constant operation produces an index-typed SSA value equal to some index-typed integer constant.

Example:

%0 = index.constant 42
OPERATION_NAME = 'index.constant'
_ODS_REGIONS = (0, True)
value() _ods_ir
result() _ods_ir[_ods_ir]

Shortcut to get an op result if it has only one (throws an error otherwise).

class mlir.dialects.index.ConstantOpAdaptor(operands: list, attributes: OpAttributeMap)
class mlir.dialects.index.ConstantOpAdaptor(operands: list, opview: OpView)

Bases: _ods_ir

OPERATION_NAME = 'index.constant'
value() _ods_ir
mlir.dialects.index.constant(value, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects.index.DivSOp(lhs, rhs, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The index.divs operation takes two index values and computes their signed quotient. Treats the leading bit as the sign and rounds towards zero, i.e. 6 / -2 = -3.

Note: division by zero and signed division overflow are undefined behaviour.

Example:

// c = a / b
%c = index.divs %a, %b
OPERATION_NAME = 'index.divs'
_ODS_REGIONS = (0, True)
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
result() _ods_ir[_ods_ir]

Shortcut to get an op result if it has only one (throws an error otherwise).

class mlir.dialects.index.DivSOpAdaptor(operands: list, attributes: OpAttributeMap)
class mlir.dialects.index.DivSOpAdaptor(operands: list, opview: OpView)

Bases: _ods_ir

OPERATION_NAME = 'index.divs'
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
mlir.dialects.index.divs(lhs, rhs, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects.index.DivUOp(lhs, rhs, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The index.divu operation takes two index values and computes their unsigned quotient. Treats the leading bit as the most significant and rounds towards zero, i.e. 6 / -2 = 0.

Note: division by zero is undefined behaviour.

Example:

// c = a / b
%c = index.divu %a, %b
OPERATION_NAME = 'index.divu'
_ODS_REGIONS = (0, True)
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
result() _ods_ir[_ods_ir]

Shortcut to get an op result if it has only one (throws an error otherwise).

class mlir.dialects.index.DivUOpAdaptor(operands: list, attributes: OpAttributeMap)
class mlir.dialects.index.DivUOpAdaptor(operands: list, opview: OpView)

Bases: _ods_ir

OPERATION_NAME = 'index.divu'
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
mlir.dialects.index.divu(lhs, rhs, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects.index.FloorDivSOp(lhs, rhs, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The index.floordivs operation takes two index values and computes their signed quotient. Treats the leading bit as the sign and rounds towards negative infinity, i.e. 5 / -2 = -3.

Note: division by zero and signed division overflow are undefined behaviour.

Example:

// c = floor(a / b)
%c = index.floordivs %a, %b
OPERATION_NAME = 'index.floordivs'
_ODS_REGIONS = (0, True)
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
result() _ods_ir[_ods_ir]

Shortcut to get an op result if it has only one (throws an error otherwise).

class mlir.dialects.index.FloorDivSOpAdaptor(operands: list, attributes: OpAttributeMap)
class mlir.dialects.index.FloorDivSOpAdaptor(operands: list, opview: OpView)

Bases: _ods_ir

OPERATION_NAME = 'index.floordivs'
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
mlir.dialects.index.floordivs(lhs, rhs, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects.index.MaxSOp(lhs, rhs, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The index.maxs operation takes two index values and computes their signed maximum value. Treats the leading bit as the sign, i.e. max(-2, 6) = 6.

Example:

// c = max(a, b)
%c = index.maxs %a, %b
OPERATION_NAME = 'index.maxs'
_ODS_REGIONS = (0, True)
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
result() _ods_ir[_ods_ir]

Shortcut to get an op result if it has only one (throws an error otherwise).

class mlir.dialects.index.MaxSOpAdaptor(operands: list, attributes: OpAttributeMap)
class mlir.dialects.index.MaxSOpAdaptor(operands: list, opview: OpView)

Bases: _ods_ir

OPERATION_NAME = 'index.maxs'
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
mlir.dialects.index.maxs(lhs, rhs, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects.index.MaxUOp(lhs, rhs, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The index.maxu operation takes two index values and computes their unsigned maximum value. Treats the leading bit as the most significant, i.e. max(15, 6) = 15 or max(-2, 6) = -2.

Example:

// c = max(a, b)
%c = index.maxu %a, %b
OPERATION_NAME = 'index.maxu'
_ODS_REGIONS = (0, True)
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
result() _ods_ir[_ods_ir]

Shortcut to get an op result if it has only one (throws an error otherwise).

class mlir.dialects.index.MaxUOpAdaptor(operands: list, attributes: OpAttributeMap)
class mlir.dialects.index.MaxUOpAdaptor(operands: list, opview: OpView)

Bases: _ods_ir

OPERATION_NAME = 'index.maxu'
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
mlir.dialects.index.maxu(lhs, rhs, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects.index.MinSOp(lhs, rhs, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The index.mins operation takes two index values and computes their signed minimum value. Treats the leading bit as the sign, i.e. min(-2, 6) = -2.

Example:

// c = min(a, b)
%c = index.mins %a, %b
OPERATION_NAME = 'index.mins'
_ODS_REGIONS = (0, True)
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
result() _ods_ir[_ods_ir]

Shortcut to get an op result if it has only one (throws an error otherwise).

class mlir.dialects.index.MinSOpAdaptor(operands: list, attributes: OpAttributeMap)
class mlir.dialects.index.MinSOpAdaptor(operands: list, opview: OpView)

Bases: _ods_ir

OPERATION_NAME = 'index.mins'
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
mlir.dialects.index.mins(lhs, rhs, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects.index.MinUOp(lhs, rhs, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The index.minu operation takes two index values and computes their unsigned minimum value. Treats the leading bit as the most significant, i.e. min(15, 6) = 6 or min(-2, 6) = 6.

Example:

// c = min(a, b)
%c = index.minu %a, %b
OPERATION_NAME = 'index.minu'
_ODS_REGIONS = (0, True)
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
result() _ods_ir[_ods_ir]

Shortcut to get an op result if it has only one (throws an error otherwise).

class mlir.dialects.index.MinUOpAdaptor(operands: list, attributes: OpAttributeMap)
class mlir.dialects.index.MinUOpAdaptor(operands: list, opview: OpView)

Bases: _ods_ir

OPERATION_NAME = 'index.minu'
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
mlir.dialects.index.minu(lhs, rhs, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects.index.MulOp(lhs, rhs, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The index.mul operation takes two index values and computes their product.

Example:

// c = a * b
%c = index.mul %a, %b
OPERATION_NAME = 'index.mul'
_ODS_REGIONS = (0, True)
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
result() _ods_ir[_ods_ir]

Shortcut to get an op result if it has only one (throws an error otherwise).

class mlir.dialects.index.MulOpAdaptor(operands: list, attributes: OpAttributeMap)
class mlir.dialects.index.MulOpAdaptor(operands: list, opview: OpView)

Bases: _ods_ir

OPERATION_NAME = 'index.mul'
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
mlir.dialects.index.mul(lhs, rhs, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects.index.OrOp(lhs, rhs, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The index.or operation takes two index values and computes their bitwise or.

Example:

// c = a | b
%c = index.or %a, %b
OPERATION_NAME = 'index.or'
_ODS_REGIONS = (0, True)
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
result() _ods_ir[_ods_ir]

Shortcut to get an op result if it has only one (throws an error otherwise).

class mlir.dialects.index.OrOpAdaptor(operands: list, attributes: OpAttributeMap)
class mlir.dialects.index.OrOpAdaptor(operands: list, opview: OpView)

Bases: _ods_ir

OPERATION_NAME = 'index.or'
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
mlir.dialects.index.or_(lhs, rhs, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects.index.RemSOp(lhs, rhs, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The index.rems operation takes two index values and computes their signed remainder. Treats the leading bit as the sign, i.e. 6 % -2 = 0.

Example:

// c = a % b
%c = index.rems %a, %b
OPERATION_NAME = 'index.rems'
_ODS_REGIONS = (0, True)
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
result() _ods_ir[_ods_ir]

Shortcut to get an op result if it has only one (throws an error otherwise).

class mlir.dialects.index.RemSOpAdaptor(operands: list, attributes: OpAttributeMap)
class mlir.dialects.index.RemSOpAdaptor(operands: list, opview: OpView)

Bases: _ods_ir

OPERATION_NAME = 'index.rems'
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
mlir.dialects.index.rems(lhs, rhs, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects.index.RemUOp(lhs, rhs, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The index.remu operation takes two index values and computes their unsigned remainder. Treats the leading bit as the most significant, i.e. 6 % -2 = 6.

Example:

// c = a % b
%c = index.remu %a, %b
OPERATION_NAME = 'index.remu'
_ODS_REGIONS = (0, True)
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
result() _ods_ir[_ods_ir]

Shortcut to get an op result if it has only one (throws an error otherwise).

class mlir.dialects.index.RemUOpAdaptor(operands: list, attributes: OpAttributeMap)
class mlir.dialects.index.RemUOpAdaptor(operands: list, opview: OpView)

Bases: _ods_ir

OPERATION_NAME = 'index.remu'
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
mlir.dialects.index.remu(lhs, rhs, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects.index.ShlOp(lhs, rhs, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The index.shl operation shifts an index value to the left by a variable amount. The low order bits are filled with zeroes. The RHS operand is always treated as unsigned. If the RHS operand is equal to or greater than the index bitwidth, the result is a poison value.

Example:

// c = a << b
%c = index.shl %a, %b
OPERATION_NAME = 'index.shl'
_ODS_REGIONS = (0, True)
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
result() _ods_ir[_ods_ir]

Shortcut to get an op result if it has only one (throws an error otherwise).

class mlir.dialects.index.ShlOpAdaptor(operands: list, attributes: OpAttributeMap)
class mlir.dialects.index.ShlOpAdaptor(operands: list, opview: OpView)

Bases: _ods_ir

OPERATION_NAME = 'index.shl'
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
mlir.dialects.index.shl(lhs, rhs, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects.index.ShrSOp(lhs, rhs, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The index.shrs operation shifts an index value to the right by a variable amount. The LHS operand is treated as signed. The high order bits are filled with copies of the most significant bit. If the RHS operand is equal to or greater than the index bitwidth, the result is a poison value.

Example:

// c = a >> b
%c = index.shrs %a, %b
OPERATION_NAME = 'index.shrs'
_ODS_REGIONS = (0, True)
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
result() _ods_ir[_ods_ir]

Shortcut to get an op result if it has only one (throws an error otherwise).

class mlir.dialects.index.ShrSOpAdaptor(operands: list, attributes: OpAttributeMap)
class mlir.dialects.index.ShrSOpAdaptor(operands: list, opview: OpView)

Bases: _ods_ir

OPERATION_NAME = 'index.shrs'
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
mlir.dialects.index.shrs(lhs, rhs, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects.index.ShrUOp(lhs, rhs, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The index.shru operation shifts an index value to the right by a variable amount. The LHS operand is treated as unsigned. The high order bits are filled with zeroes. If the RHS operand is equal to or greater than the index bitwidth, the result is a poison value.

Example:

// c = a >> b
%c = index.shru %a, %b
OPERATION_NAME = 'index.shru'
_ODS_REGIONS = (0, True)
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
result() _ods_ir[_ods_ir]

Shortcut to get an op result if it has only one (throws an error otherwise).

class mlir.dialects.index.ShrUOpAdaptor(operands: list, attributes: OpAttributeMap)
class mlir.dialects.index.ShrUOpAdaptor(operands: list, opview: OpView)

Bases: _ods_ir

OPERATION_NAME = 'index.shru'
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
mlir.dialects.index.shru(lhs, rhs, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects.index.SizeOfOp(*, results=None, loc=None, ip=None)

Bases: _ods_ir

The index.sizeof operation produces an index-typed SSA value equal to the size in bits of the index type. For example, on 32-bit systems, the result is 32 : index, and on 64-bit systems, the result is 64 : index.

Example:

%0 = index.sizeof
OPERATION_NAME = 'index.sizeof'
_ODS_REGIONS = (0, True)
result() _ods_ir[_ods_ir]

Shortcut to get an op result if it has only one (throws an error otherwise).

class mlir.dialects.index.SizeOfOpAdaptor(operands: list, attributes: OpAttributeMap)
class mlir.dialects.index.SizeOfOpAdaptor(operands: list, opview: OpView)

Bases: _ods_ir

OPERATION_NAME = 'index.sizeof'
mlir.dialects.index.sizeof(*, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects.index.SubOp(lhs, rhs, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The index.sub operation takes two index values and computes the difference of the first from the second operand.

Example:

// c = a - b
%c = index.sub %a, %b
OPERATION_NAME = 'index.sub'
_ODS_REGIONS = (0, True)
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
result() _ods_ir[_ods_ir]

Shortcut to get an op result if it has only one (throws an error otherwise).

class mlir.dialects.index.SubOpAdaptor(operands: list, attributes: OpAttributeMap)
class mlir.dialects.index.SubOpAdaptor(operands: list, opview: OpView)

Bases: _ods_ir

OPERATION_NAME = 'index.sub'
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
mlir.dialects.index.sub(lhs, rhs, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects.index.XOrOp(lhs, rhs, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The index.xor operation takes two index values and computes their bitwise xor.

Example:

// c = a ^ b
%c = index.xor %a, %b
OPERATION_NAME = 'index.xor'
_ODS_REGIONS = (0, True)
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
result() _ods_ir[_ods_ir]

Shortcut to get an op result if it has only one (throws an error otherwise).

class mlir.dialects.index.XOrOpAdaptor(operands: list, attributes: OpAttributeMap)
class mlir.dialects.index.XOrOpAdaptor(operands: list, opview: OpView)

Bases: _ods_ir

OPERATION_NAME = 'index.xor'
lhs() _ods_ir[_ods_ir]
rhs() _ods_ir[_ods_ir]
mlir.dialects.index.xor(lhs, rhs, *, results=None, loc=None, ip=None) _ods_ir
mlir.dialects.index.register_attribute_builder(kind, replace=False)
class mlir.dialects.index.IndexCmpPredicate

Bases: enum.IntEnum

index comparison predicate kind

EQ = 0
NE = 1
SLT = 2
SLE = 3
SGT = 4
SGE = 5
ULT = 6
ULE = 7
UGT = 8
UGE = 9
__str__()

Return str(self).