fixes for correctly tracking which functions have been fully inlined

This commit is contained in:
Vern Paxson 2023-07-20 09:40:39 -07:00
parent 91d70e6dd4
commit 3f64858335
3 changed files with 17 additions and 7 deletions

View file

@ -218,6 +218,8 @@ ExprPtr Inliner::CheckForInlining(CallExprPtr c)
return nullptr; // signals "stop inlining"
}
did_inline.insert(func_vf);
num_stmts += oi->num_stmts;
num_exprs += oi->num_exprs;
@ -265,9 +267,9 @@ ExprPtr Inliner::CheckForInlining(CallExprPtr c)
else
max_inlined_frame_size = hold_max_inlined_frame_size;
ListExprPtr args = {NewRef{}, c->Args()};
auto t = c->GetType();
auto ie = make_intrusive<InlineExpr>(args, std::move(params), body_dup, curr_frame_size, t);
auto ie = make_intrusive<InlineExpr>(c->ArgsPtr(), std::move(params), body_dup, curr_frame_size,
t);
ie->SetOriginal(c);
return ie;