InlineFunctions¶
- class tket.passes.InlineFunctions(heuristic=MaxSize(size=64), follow_inline_hints=True, _scope=GlobalScope.PRESERVE_PUBLIC)[source]¶
Bases:
ComposablePassInline acyclic function calls below the selected scope.
Parameters: - heuristic: Heuristic used to choose which non-recursive functions to
inline. Defaults to MaxSize(64).
follow_inline_hints: Whether to follow compiler hints for inlining functions.
- __call__(hugr, *, inplace=True)¶
Call the pass to transform a HUGR, returning a Hugr.
- Return type:
Hugr
- __init__(heuristic=MaxSize(size=64), follow_inline_hints=True, _scope=GlobalScope.PRESERVE_PUBLIC)¶
- follow_inline_hints: bool = True¶
- heuristic: InlineFuncsHeuristic = MaxSize(size=64)¶
- property name: str¶
Returns the name of the pass.
- run(hugr, *, inplace=True)[source]¶
Run the pass to transform a HUGR, returning a PassResult.
See
implement_pass_run()for a helper function to implement this method.- Return type:
- then(other)¶
Perform another composable pass after this pass.
- Return type:
ComposablePass