Aggressive unroll
AggressiveUnroll
dataclass
AggressiveUnroll(
additional_inline_heuristic: Callable[
[Statement], bool
] = lambda node: True,
)
Bases: Pass
A pass to unroll structured control flow
inline_heuristic
inline_heuristic(node: Statement) -> bool
The heuristic to decide whether to inline a function call or not. inside loops and if-else, only inline simple functions, i.e. functions with a single block
Source code in .venv/lib/python3.12/site-packages/bloqade/rewrite/passes/aggressive_unroll.py
84 85 86 87 88 89 90 91 92 93 |
|