diff --git a/src/backend.rs b/src/backend.rs index eca88dd3172..9f58db62a1f 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -142,12 +142,8 @@ pub(crate) fn with_object(sess: &Session, name: &str, f: impl FnOnce(&mut Object } pub(crate) fn make_module(sess: &Session, isa: Box, name: String) -> ObjectModule { - let mut builder = ObjectBuilder::new( - isa, - name + ".o", - cranelift_module::default_libcall_names(), - ) - .unwrap(); + let mut builder = + ObjectBuilder::new(isa, name + ".o", cranelift_module::default_libcall_names()).unwrap(); // Unlike cg_llvm, cg_clif defaults to disabling -Zfunction-sections. For cg_llvm binary size // is important, while cg_clif cares more about compilation times. Enabling -Zfunction-sections // can easily double the amount of time necessary to perform linking. diff --git a/src/base.rs b/src/base.rs index c4e0c9676f6..8b7a7caade5 100644 --- a/src/base.rs +++ b/src/base.rs @@ -101,12 +101,7 @@ pub(crate) fn codegen_fn<'tcx>(cx: &mut crate::CodegenCx<'_, 'tcx>, instance: In // Perform rust specific optimizations tcx.sess.time("optimize clif ir", || { - crate::optimize::optimize_function( - tcx, - instance, - context, - &mut clif_comments, - ); + crate::optimize::optimize_function(tcx, instance, context, &mut clif_comments); }); // If the return block is not reachable, then the SSA builder may have inserted an `iconst.i128` @@ -351,13 +346,7 @@ fn codegen_fn_content(fx: &mut FunctionCx<'_, '_, '_>) { from_hir_call: _, } => { fx.tcx.sess.time("codegen call", || { - crate::abi::codegen_terminator_call( - fx, - *fn_span, - func, - args, - *destination, - ) + crate::abi::codegen_terminator_call(fx, *fn_span, func, args, *destination) }); } TerminatorKind::InlineAsm { diff --git a/src/driver/aot.rs b/src/driver/aot.rs index 6ce174eec81..5bfe0b3ad49 100644 --- a/src/driver/aot.rs +++ b/src/driver/aot.rs @@ -227,7 +227,8 @@ pub(super) fn run_aot( tcx.sess.abort_if_errors(); let isa = crate::build_isa(tcx.sess, &backend_config); - let mut allocator_module = crate::backend::make_module(tcx.sess, isa, "allocator_shim".to_string()); + let mut allocator_module = + crate::backend::make_module(tcx.sess, isa, "allocator_shim".to_string()); assert_eq!(pointer_ty(tcx), allocator_module.target_config().pointer_type()); let mut allocator_unwind_context = UnwindContext::new(tcx, allocator_module.isa(), true); let created_alloc_shim = diff --git a/src/lib.rs b/src/lib.rs index 9a417f35ae2..d31e05bdbd5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -162,7 +162,6 @@ fn finalize(self) -> (String, Option>, UnwindContext<'tcx>) { } } - pub struct CraneliftCodegenBackend { pub config: Option, } diff --git a/src/pretty_clif.rs b/src/pretty_clif.rs index 166151ecc70..30e487a99f4 100644 --- a/src/pretty_clif.rs +++ b/src/pretty_clif.rs @@ -247,10 +247,7 @@ pub(crate) fn write_clif_file<'tcx>( &mut clif_comments, &mut clif, &context.func, - &DisplayFunctionAnnotations { - isa, - value_ranges: value_ranges.as_ref(), - }, + &DisplayFunctionAnnotations { isa, value_ranges: value_ranges.as_ref() }, ) .unwrap();