zirium 0.5.1

Lossless textual MLIR syntax parsing and semantic processing
Documentation
{
  "presets": [],
  "builtins": [
    "builtin.module",
    "func.func",
    "func.call",
    "func.return"
  ],
  "operation_shapes": [
    {"name": "llvm.add", "shape": "binary_operands"},
    {"name": "llvm.sub", "shape": "binary_operands"},
    {"name": "llvm.mul", "shape": "binary_operands"},
    {"name": "llvm.udiv", "shape": "binary_operands"},
    {"name": "llvm.sdiv", "shape": "binary_operands"},
    {"name": "llvm.urem", "shape": "binary_operands"},
    {"name": "llvm.srem", "shape": "binary_operands"},
    {"name": "llvm.and", "shape": "binary_operands"},
    {"name": "llvm.or", "shape": "binary_operands"},
    {"name": "llvm.xor", "shape": "binary_operands"},
    {"name": "llvm.shl", "shape": "binary_operands"},
    {"name": "llvm.lshr", "shape": "binary_operands"},
    {"name": "llvm.ashr", "shape": "binary_operands"},
    {"name": "llvm.fadd", "shape": "binary_operands"},
    {"name": "llvm.fsub", "shape": "binary_operands"},
    {"name": "llvm.fmul", "shape": "binary_operands"},
    {"name": "llvm.fdiv", "shape": "binary_operands"},
    {"name": "llvm.frem", "shape": "binary_operands"},
    {"name": "llvm.fneg", "shape": "unary_operand"},
    {"name": "llvm.alloca", "shape": "operand_clauses"},
    {"name": "llvm.bitcast", "shape": "unary_operand"},
    {"name": "llvm.addrspacecast", "shape": "unary_operand"},
    {"name": "llvm.inttoptr", "shape": "unary_operand"},
    {"name": "llvm.ptrtoint", "shape": "unary_operand"},
    {"name": "llvm.sext", "shape": "unary_operand"},
    {"name": "llvm.zext", "shape": "unary_operand"},
    {"name": "llvm.trunc", "shape": "unary_operand"},
    {"name": "llvm.sitofp", "shape": "unary_operand"},
    {"name": "llvm.uitofp", "shape": "unary_operand"},
    {"name": "llvm.fptosi", "shape": "unary_operand"},
    {"name": "llvm.fptoui", "shape": "unary_operand"},
    {"name": "llvm.fpext", "shape": "unary_operand"},
    {"name": "llvm.fptrunc", "shape": "unary_operand"},
    {"name": "llvm.va_arg", "shape": "unary_operand"},
    {"name": "llvm.freeze", "shape": "unary_operand"},
    {"name": "llvm.return", "shape": "optional_typed_operands"},
    {"name": "llvm.resume", "shape": "optional_typed_operands"},
    {"name": "llvm.unreachable", "shape": "optional_typed_operands"},
    {"name": "llvm.mlir.none", "shape": "variadic_operands"},
    {"name": "llvm.mlir.undef", "shape": "variadic_operands"},
    {"name": "llvm.mlir.poison", "shape": "variadic_operands"},
    {"name": "llvm.mlir.zero", "shape": "variadic_operands"},

    {"name": "llvm.intr.copysign", "shape": "operand_clauses"},
    {"name": "llvm.intr.exp", "shape": "operand_clauses"},
    {"name": "llvm.intr.exp2", "shape": "operand_clauses"},
    {"name": "llvm.intr.exp10", "shape": "operand_clauses"},
    {"name": "llvm.intr.ldexp", "shape": "operand_clauses"},
    {"name": "llvm.intr.frexp", "shape": "operand_clauses"},
    {"name": "llvm.intr.fabs", "shape": "operand_clauses"},
    {"name": "llvm.intr.ceil", "shape": "operand_clauses"},
    {"name": "llvm.intr.floor", "shape": "operand_clauses"},
    {"name": "llvm.intr.fma", "shape": "operand_clauses"},
    {"name": "llvm.intr.fmuladd", "shape": "operand_clauses"},
    {"name": "llvm.intr.log10", "shape": "operand_clauses"},
    {"name": "llvm.intr.log2", "shape": "operand_clauses"},
    {"name": "llvm.intr.log", "shape": "operand_clauses"},
    {"name": "llvm.intr.roundeven", "shape": "operand_clauses"},
    {"name": "llvm.intr.round", "shape": "operand_clauses"},
    {"name": "llvm.intr.trunc", "shape": "operand_clauses"},
    {"name": "llvm.intr.sqrt", "shape": "operand_clauses"},
    {"name": "llvm.intr.pow", "shape": "operand_clauses"},
    {"name": "llvm.intr.powi", "shape": "operand_clauses"},
    {"name": "llvm.intr.rint", "shape": "operand_clauses"},
    {"name": "llvm.intr.nearbyint", "shape": "operand_clauses"},
    {"name": "llvm.intr.lround", "shape": "operand_clauses"},
    {"name": "llvm.intr.llround", "shape": "operand_clauses"},
    {"name": "llvm.intr.lrint", "shape": "operand_clauses"},
    {"name": "llvm.intr.llrint", "shape": "operand_clauses"},
    {"name": "llvm.intr.bitreverse", "shape": "operand_clauses"},
    {"name": "llvm.intr.bswap", "shape": "operand_clauses"},
    {"name": "llvm.intr.ctpop", "shape": "operand_clauses"},
    {"name": "llvm.intr.fshl", "shape": "operand_clauses"},
    {"name": "llvm.intr.fshr", "shape": "operand_clauses"},
    {"name": "llvm.intr.maxnum", "shape": "operand_clauses"},
    {"name": "llvm.intr.minnum", "shape": "operand_clauses"},
    {"name": "llvm.intr.maximum", "shape": "operand_clauses"},
    {"name": "llvm.intr.minimum", "shape": "operand_clauses"},
    {"name": "llvm.intr.smax", "shape": "operand_clauses"},
    {"name": "llvm.intr.smin", "shape": "operand_clauses"},
    {"name": "llvm.intr.umax", "shape": "operand_clauses"},
    {"name": "llvm.intr.umin", "shape": "operand_clauses"},
    {"name": "llvm.intr.scmp", "shape": "operand_clauses"},
    {"name": "llvm.intr.ucmp", "shape": "operand_clauses"},
    {"name": "llvm.intr.sin", "shape": "operand_clauses"},
    {"name": "llvm.intr.cos", "shape": "operand_clauses"},
    {"name": "llvm.intr.tan", "shape": "operand_clauses"},
    {"name": "llvm.intr.sincos", "shape": "operand_clauses"},
    {"name": "llvm.intr.asin", "shape": "operand_clauses"},
    {"name": "llvm.intr.acos", "shape": "operand_clauses"},
    {"name": "llvm.intr.atan", "shape": "operand_clauses"},
    {"name": "llvm.intr.atan2", "shape": "operand_clauses"},
    {"name": "llvm.intr.sinh", "shape": "operand_clauses"},
    {"name": "llvm.intr.cosh", "shape": "operand_clauses"},
    {"name": "llvm.intr.tanh", "shape": "operand_clauses"},
    {"name": "llvm.intr.sadd.sat", "shape": "operand_clauses"},
    {"name": "llvm.intr.uadd.sat", "shape": "operand_clauses"},
    {"name": "llvm.intr.ssub.sat", "shape": "operand_clauses"},
    {"name": "llvm.intr.usub.sat", "shape": "operand_clauses"},
    {"name": "llvm.intr.sshl.sat", "shape": "operand_clauses"},
    {"name": "llvm.intr.ushl.sat", "shape": "operand_clauses"},

    {"name": "llvm.intr.ptrmask", "shape": "operand_clauses"},
    {"name": "llvm.intr.lifetime.start", "shape": "optional_typed_operands"},
    {"name": "llvm.intr.lifetime.end", "shape": "optional_typed_operands"},
    {"name": "llvm.intr.invariant.end", "shape": "operand_clauses"},
    {"name": "llvm.intr.launder.invariant.group", "shape": "unary_operand"},
    {"name": "llvm.intr.strip.invariant.group", "shape": "unary_operand"},
    {"name": "llvm.intr.experimental.constrained.uitofp", "shape": "operand_clauses"},
    {"name": "llvm.intr.experimental.constrained.sitofp", "shape": "operand_clauses"},
    {"name": "llvm.intr.experimental.constrained.fptrunc", "shape": "operand_clauses"},
    {"name": "llvm.intr.experimental.constrained.fpext", "shape": "operand_clauses"},
    {"name": "llvm.intr.ssa.copy", "shape": "unary_operand"},
    {"name": "llvm.intr.expect", "shape": "binary_operands"},
    {"name": "llvm.intr.expect.with.probability", "shape": "operand_clauses"},
    {"name": "llvm.intr.coro.id", "shape": "operand_clauses"},
    {"name": "llvm.intr.coro.begin", "shape": "operand_clauses"},
    {"name": "llvm.intr.coro.size", "shape": "variadic_operands"},
    {"name": "llvm.intr.coro.align", "shape": "variadic_operands"},
    {"name": "llvm.intr.coro.save", "shape": "operand_clauses"},
    {"name": "llvm.intr.coro.end", "shape": "operand_clauses"},
    {"name": "llvm.intr.coro.free", "shape": "operand_clauses"},
    {"name": "llvm.intr.coro.resume", "shape": "optional_typed_operands"},
    {"name": "llvm.intr.coro.promise", "shape": "operand_clauses"},
    {"name": "llvm.intr.vastart", "shape": "optional_typed_operands"},
    {"name": "llvm.intr.vaend", "shape": "optional_typed_operands"},
    {"name": "llvm.intr.eh.typeid.for", "shape": "operand_clauses"},
    {"name": "llvm.intr.stacksave", "shape": "variadic_operands"},
    {"name": "llvm.intr.stackrestore", "shape": "optional_typed_operands"},
    {"name": "llvm.intr.vector.reduce.fmax", "shape": "operand_clauses"},
    {"name": "llvm.intr.vector.reduce.fmin", "shape": "operand_clauses"},
    {"name": "llvm.intr.vector.reduce.fmaximum", "shape": "operand_clauses"},
    {"name": "llvm.intr.vector.reduce.fminimum", "shape": "operand_clauses"},
    {"name": "llvm.intr.matrix.multiply", "shape": "operand_clauses"},
    {"name": "llvm.intr.masked.load", "shape": "operand_clauses"},
    {"name": "llvm.intr.masked.gather", "shape": "operand_clauses"},
    {"name": "llvm.intr.trap", "shape": "optional_typed_operands"},
    {"name": "llvm.intr.debugtrap", "shape": "optional_typed_operands"},
    {"name": "llvm.intr.stepvector", "shape": "variadic_operands"}
  ],
  "operation_formats": [
    {
      "name": "llvm.select",
      "format": "$operands[0] `,` $operands[1] `,` $operands[2] attr-dict `:` type($operands[0]) `,` type($operands[1], $operands[2], $results)"
    }
  ]
}