+ source_func = call.declaration->definition;
+
+ // Collect all declarations the inlined function depends on.
+ pass = DEPENDS;
+ source_func->visit(*this);
+
+ /* Populate referenced_names from the target function so we can rename
+ variables from the inlined function that would conflict. */
+ pass = REFERENCED;
+ target_func.visit(*this);
+
+ /* Inline and rename passes must be interleaved so used variable names are
+ known when inlining the return statement. */
+ pass = INLINE;
+ staging_block.parent = &tgt_blk;
+ staging_block.variables.clear();