Fix warning

This commit is contained in:
bjorn3 2020-10-15 15:39:06 +02:00
parent fed612c75a
commit 1c40840738
2 changed files with 2 additions and 5 deletions

View File

@ -19,7 +19,7 @@ pub(crate) fn optimize_function<'tcx>(
if tcx.sess.opts.optimize == rustc_session::config::OptLevel::No {
return; // FIXME classify optimizations over opt levels
}
self::stack2reg::optimize_function(ctx, clif_comments);
self::stack2reg::optimize_function(ctx);
crate::pretty_clif::write_clif_file(tcx, "stack2reg", None, instance, &ctx, &*clif_comments);
crate::base::verify_func(tcx, &*clif_comments, &ctx.func);
}

View File

@ -182,10 +182,7 @@ fn for_context(ctx: &'a mut Context) -> Self {
}
}
pub(super) fn optimize_function(
ctx: &mut Context,
clif_comments: &mut crate::pretty_clif::CommentWriter,
) {
pub(super) fn optimize_function(ctx: &mut Context) {
combine_stack_addr_with_load_store(&mut ctx.func);
let mut opt_ctx = OptimizeContext::for_context(ctx);