about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src/driver
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2021-02-01 10:11:46 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2021-02-01 10:11:46 +0100
commit27855331e8fc27163bac49c9dc10ab0fe6a04d5a (patch)
treeb019249ee1989c6d0ef7dc62dc18df644619c4ec /compiler/rustc_codegen_cranelift/src/driver
parentfee0d31397c5ac46d08867e903131d1d73825a9e (diff)
parentd556c56f792756dd7cfec742b9f2e07612dc10f4 (diff)
downloadrust-27855331e8fc27163bac49c9dc10ab0fe6a04d5a.tar.gz
rust-27855331e8fc27163bac49c9dc10ab0fe6a04d5a.zip
Merge commit 'd556c56f792756dd7cfec742b9f2e07612dc10f4' into sync_cg_clif-2021-02-01
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/driver')
-rw-r--r--compiler/rustc_codegen_cranelift/src/driver/aot.rs7
-rw-r--r--compiler/rustc_codegen_cranelift/src/driver/jit.rs12
-rw-r--r--compiler/rustc_codegen_cranelift/src/driver/mod.rs9
3 files changed, 7 insertions, 21 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/driver/aot.rs b/compiler/rustc_codegen_cranelift/src/driver/aot.rs
index 16f9bfc9918..df89883f0bb 100644
--- a/compiler/rustc_codegen_cranelift/src/driver/aot.rs
+++ b/compiler/rustc_codegen_cranelift/src/driver/aot.rs
@@ -281,9 +281,6 @@ pub(super) fn run_aot(
         None
     };
 
-    rustc_incremental::assert_dep_graph(tcx);
-    rustc_incremental::save_dep_graph(tcx);
-
     let metadata_module = if need_metadata_module {
         let _timer = tcx.prof.generic_activity("codegen crate metadata");
         let (metadata_cgu_name, tmp_file) = tcx.sess.time("write compressed metadata", || {
@@ -322,10 +319,6 @@ pub(super) fn run_aot(
         None
     };
 
-    if tcx.sess.opts.output_types.should_codegen() {
-        rustc_incremental::assert_module_sources::assert_module_sources(tcx);
-    }
-
     Box::new((
         CodegenResults {
             crate_name: tcx.crate_name(LOCAL_CRATE),
diff --git a/compiler/rustc_codegen_cranelift/src/driver/jit.rs b/compiler/rustc_codegen_cranelift/src/driver/jit.rs
index 9a42c675cc1..2d14ff2c022 100644
--- a/compiler/rustc_codegen_cranelift/src/driver/jit.rs
+++ b/compiler/rustc_codegen_cranelift/src/driver/jit.rs
@@ -156,12 +156,8 @@ extern "C" fn __clif_jit_fn(instance_ptr: *const Instance<'static>) -> *const u8
             let jit_module = jit_module.as_mut().unwrap();
             let mut cx = crate::CodegenCx::new(tcx, jit_module, false, false);
 
-            let (name, sig) = crate::abi::get_function_name_and_sig(
-                tcx,
-                cx.module.isa().triple(),
-                instance,
-                true,
-            );
+            let name = tcx.symbol_name(instance).name.to_string();
+            let sig = crate::abi::get_function_sig(tcx, cx.module.isa().triple(), instance);
             let func_id = cx
                 .module
                 .declare_function(&name, Linkage::Export, &sig)
@@ -246,8 +242,8 @@ pub(super) fn codegen_shim<'tcx>(cx: &mut CodegenCx<'tcx, impl Module>, inst: In
 
     let pointer_type = cx.module.target_config().pointer_type();
 
-    let (name, sig) =
-        crate::abi::get_function_name_and_sig(tcx, cx.module.isa().triple(), inst, true);
+    let name = tcx.symbol_name(inst).name.to_string();
+    let sig = crate::abi::get_function_sig(tcx, cx.module.isa().triple(), inst);
     let func_id = cx
         .module
         .declare_function(&name, Linkage::Export, &sig)
diff --git a/compiler/rustc_codegen_cranelift/src/driver/mod.rs b/compiler/rustc_codegen_cranelift/src/driver/mod.rs
index 9f4ea9a3865..2497f9dfdfb 100644
--- a/compiler/rustc_codegen_cranelift/src/driver/mod.rs
+++ b/compiler/rustc_codegen_cranelift/src/driver/mod.rs
@@ -50,12 +50,9 @@ fn predefine_mono_items<'tcx>(
         for &(mono_item, (linkage, visibility)) in mono_items {
             match mono_item {
                 MonoItem::Fn(instance) => {
-                    let (name, sig) = get_function_name_and_sig(
-                        cx.tcx,
-                        cx.module.isa().triple(),
-                        instance,
-                        false,
-                    );
+                    let name = cx.tcx.symbol_name(instance).name.to_string();
+                    let _inst_guard = crate::PrintOnPanic(|| format!("{:?} {}", instance, name));
+                    let sig = get_function_sig(cx.tcx, cx.module.isa().triple(), instance);
                     let linkage = crate::linkage::get_clif_linkage(mono_item, linkage, visibility);
                     cx.module.declare_function(&name, linkage, &sig).unwrap();
                 }