Builder
builder
PyASTBuilder
dataclass
Builder for xDSL modules from aspects of a Python function.
Source code in xdsl/frontend/pyast/utils/builder.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | |
type_registry: TypeRegistry
instance-attribute
Mappings between source code and IR type.
function_registry: FunctionRegistry
instance-attribute
Mappings between functions and their operation types.
file: str | None
instance-attribute
The file path of the function being built.
globals: dict[str, Any]
instance-attribute
Global information for the function being built, including all the imports.
function_ast: ast.FunctionDef
instance-attribute
The AST tree for the function being built.
build_context: Context
instance-attribute
The xDSL context to use when applying transformations to the built module.
post_transforms: PassPipeline
instance-attribute
An ordered list of passes and callbacks to apply to the built module.
__init__(type_registry: TypeRegistry, function_registry: FunctionRegistry, file: str | None, globals: dict[str, Any], function_ast: ast.FunctionDef, build_context: Context, post_transforms: PassPipeline) -> None
build() -> ModuleOp
Build a module from the builder state.
Source code in xdsl/frontend/pyast/utils/builder.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | |