Source code for srdatalog.ir.dialects.iir.cf.print

'''Print_i for the iir.cf (control-flow) dialect.

Per docs/stage3a_execution_plan.md §1: Print is one of three distinct
operations on IR data (Lowering / Render / Print). This module is
iir.cf's contribution to Print_i. Style mirrors mir/print.py — Racket-
canonical `#:keyword` form.

Children of an op recurse through `srdatalog.ir.print_iir.print_iir`
so a sub-tree mixing dialects renders cleanly.
'''

from __future__ import annotations

from srdatalog.ir.dialects.iir.cf.ops import (
  AddCount,
  Bind,
  BlankLine,
  Block,
  Cartesian2DDecompose,
  CartesianFlatLoop,
  CartesianNDecompose,
  Comment,
  GridStrideLoop,
  If,
  IfContinueIfNot,
  IfReturnIfNot,
  IndentBlock,
  IntersectIter,
  LaneZeroGuard,
  OuterAnchor,
  ParallelFor,
  Phase,
  RawString,
  TiledBallotBlock,
  VarRef,
  WriteOutput,
)
from srdatalog.ir.print_iir import _bool, _ind, _quoted, _str_tuple, print_iir

OPS: tuple[type, ...] = (
  AddCount,
  BlankLine,
  Bind,
  Block,
  Cartesian2DDecompose,
  CartesianFlatLoop,
  CartesianNDecompose,
  Comment,
  GridStrideLoop,
  If,
  IfContinueIfNot,
  IfReturnIfNot,
  IndentBlock,
  IntersectIter,
  LaneZeroGuard,
  OuterAnchor,
  ParallelFor,
  Phase,
  RawString,
  TiledBallotBlock,
  VarRef,
  WriteOutput,
)






# Silence ruff unused-imports for helpers re-exported as building blocks.
_ = (_bool,)

__all__ = ['OPS', 'print_op']