Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion zjit/src/hir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7469,6 +7469,7 @@ impl Function {
// on inlining passes. If we reach the max, we run the loop one more time with inlining
// disabled in order to optimize the results of the last inlining operation.
let inline_max_iterations = get_option!(inline_max_iterations);
let mut has_inlined = false;
for iteration in 0..=inline_max_iterations {
// Function is assumed to have types inferred already
run_pass!(type_specialize);
Expand All @@ -7479,6 +7480,7 @@ impl Function {
} else {
false
};
has_inlined |= did_inline;
run_pass!(convert_no_profile_sends);
run_pass!(remove_trivial_block_params);
run_pass!(optimize_load_store);
Expand All @@ -7487,7 +7489,9 @@ impl Function {
run_pass!(clean_cfg);
run_pass!(remove_redundant_patch_points);
run_pass!(remove_duplicate_check_interrupts);
run_pass!(eliminate_empty_inline_frames);
if has_inlined {
run_pass!(eliminate_empty_inline_frames);
}
run_pass!(eliminate_dead_code);

if !did_inline {
Expand Down
Loading