From 1c408407385b791c9c643e018ade22535e1203cb Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Thu, 15 Oct 2020 15:39:06 +0200 Subject: [PATCH] Fix warning --- src/optimize/mod.rs | 2 +- src/optimize/stack2reg.rs | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/optimize/mod.rs b/src/optimize/mod.rs index 3ce7f8cd9a8..1386e47ebfc 100644 --- a/src/optimize/mod.rs +++ b/src/optimize/mod.rs @@ -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); } diff --git a/src/optimize/stack2reg.rs b/src/optimize/stack2reg.rs index 8df33fd2fc7..37056e94d3a 100644 --- a/src/optimize/stack2reg.rs +++ b/src/optimize/stack2reg.rs @@ -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);