Hashable module
hashable_module
¶
HashableModule
dataclass
¶
Bases: Hashable
A class wrapping a ModuleOp, that forwards to structural equality checking for ==.
The module in this class should not be mutated.
Source code in xdsl/utils/hashable_module.py
module: ModuleOp
instance-attribute
¶
__init__(module: ModuleOp) -> None
¶
__eq__(other: object) -> bool
¶
__hash__() -> int
¶
The hash of the module is a hash of the ordered combination of operation names. As most transformations on IR modify at least one operation, this should be enough to minimise collisions.