You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should take as input a Vec<Node> and an &mut impl HugrMut. These nodes must be Call nodes.
The pass should construct a call graph from the hugr and ensure that the edges corresponding to the input calls do not form a cycle in the call graph. If they do, then return a "Can't inline a recursive cycle" error.
It should then iterate the sorted list and apply InlineRewrite to the call nodes. This reverse-toposort ensures that we always inline a call before the function-thats-the-parent-of-the-call is inlined. Otherwise there would be copies of the input calls(with different Node ids) that would not be inlined
We should then create an InlineEverything pass here that collects all the call nodes in the Hugr and applies the Inline pass.
The text was updated successfully, but these errors were encountered:
we need to inline all functions to product valid qir.
We can do this in llvm, but I suggest we should do it in hugr, using:
InlineCall
: feat: Rewrite for inlining a single Call hugr#1934CallGraph
: https://docs.rs/hugr/0.14.4/hugr/algorithms/call_graph/index.htmlWe should create an
Inline
pass. I suggest that:Vec<Node>
and an&mut impl HugrMut
. These nodes must beCall
nodes.InlineRewrite
to the call nodes. This reverse-toposort ensures that we always inline a call before the function-thats-the-parent-of-the-call is inlined. Otherwise there would be copies of the input calls(with different Node ids) that would not be inlinedWe should then create an
InlineEverything
pass here that collects all the call nodes in the Hugr and applies the Inline pass.The text was updated successfully, but these errors were encountered: