kirin.dialects.py.unary
unary¶
kirin.dialects.py.unary
The unary dialect for Python.
This module contains the dialect for unary semantics in Python, including:
- The
UnaryOpbase class for unary operations. - The
UAdd,USub,Not, andInvertstatement classes. - The lowering pass for unary operations.
- The concrete implementation of unary operations.
- The type inference implementation of unary operations.
- The constant propagation implementation of unary operations.
- The Julia emitter for unary operations.
This dialect maps ast.UnaryOp nodes to the UAdd, USub, Not, and Invert statements.
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
dialect | — | ir.Dialect('py.unary') |