Make unused stack slots zero sized in stack2reg

This commit is contained in:
bjorn3 2020-01-18 18:31:01 +01:00
parent 167c7f2201
commit aa5c49cf2f

View File

@ -237,7 +237,7 @@ pub(super) fn optimize_function<T: std::fmt::Debug>(
}
if users.stack_store.is_empty() && users.stack_load.is_empty() {
// FIXME make stack_slot zero sized.
opt_ctx.ctx.func.stack_slots[stack_slot.0].size = 0;
}
}