qat.experimental.dialect.q1_cf.ir.attrs module

Predicate attributes for the q1_cf conditional branches.

Two enumerations classify the conditions a branch may test:

  • FlagPredicate — a condition-code test (zero/sign) on a single register.

  • ComparisonPredicate — a signed/unsigned comparison between two operands, matching the arith.cmpi predicate set.

Each enumeration is wrapped in an EnumAttribute so it can be attached to an operation as a property.

Reference: https://docs.qblox.com/en/main/products/qblox_instruments/q1/index.html

class ComparisonPredicate(value)

Bases: StrEnum

Comparison applied between two operand values.

eq = 'eq'
ne = 'ne'
sge = 'sge'
sgt = 'sgt'
sle = 'sle'
slt = 'slt'
uge = 'uge'
ugt = 'ugt'
ule = 'ule'
ult = 'ult'
class ComparisonPredicateAttr(data)

Bases: EnumAttribute[ComparisonPredicate], SpacedOpaqueSyntaxAttribute

Attribute wrapper carrying a ComparisonPredicate.

data: DataElement
enum_type

alias of ComparisonPredicate

name: ClassVar[str] = 'q1_cf.comparison_predicate'

The attribute name should be a static field in the attribute classes.

class FlagPredicate(value)

Bases: StrEnum

Condition-code test applied to a single register value.

eqz = 'eqz'
gez = 'gez'
ltz = 'ltz'
nez = 'nez'
class FlagPredicateAttr(data)

Bases: EnumAttribute[FlagPredicate], SpacedOpaqueSyntaxAttribute

Attribute wrapper carrying a FlagPredicate.

data: DataElement
enum_type

alias of FlagPredicate

name: ClassVar[str] = 'q1_cf.flag_predicate'

The attribute name should be a static field in the attribute classes.