Inline
Inline dataclass
Inline(heuristic: Callable[[Statement], bool])
Bases: RewriteRule
flowchart TD
kirin.rewrite.inline.Inline[Inline]
kirin.rewrite.abc.RewriteRule[RewriteRule]
kirin.rewrite.abc.RewriteRule --> kirin.rewrite.inline.Inline
click kirin.rewrite.inline.Inline href "" "kirin.rewrite.inline.Inline"
click kirin.rewrite.abc.RewriteRule href "" "kirin.rewrite.abc.RewriteRule"
heuristic instance-attribute
heuristic: Callable[[Statement], bool]
inline heuristic that determines whether a function should be inlined
inline_call_like
inline_call_like(
call_like: Statement,
args: tuple[SSAValue, ...],
region: Region,
)
Inline a function call-like statement
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
call_like | Statement | the call-like statement | required |
args | tuple[SSAValue, ...] | the arguments of the call (first one is the callee) | required |
region | Region | the region of the callee | required |
Source code in src/kirin/rewrite/inline.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | |