mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-29 11:37:39 +00:00
Sync from rust aa067fb984
This commit is contained in:
commit
c183c6194e
@ -267,7 +267,7 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
|
|||||||
.generic_activity("codegen prelude")
|
.generic_activity("codegen prelude")
|
||||||
.run(|| crate::abi::codegen_fn_prelude(fx, start_block));
|
.run(|| crate::abi::codegen_fn_prelude(fx, start_block));
|
||||||
|
|
||||||
for (bb, bb_data) in fx.mir.basic_blocks.iter_enumerated() {
|
for (bb, bb_data) in traversal::mono_reachable(fx.mir, fx.tcx, fx.instance) {
|
||||||
let block = fx.get_block(bb);
|
let block = fx.get_block(bb);
|
||||||
fx.bcx.switch_to_block(block);
|
fx.bcx.switch_to_block(block);
|
||||||
|
|
||||||
@ -789,7 +789,7 @@ fn codegen_stmt<'tcx>(
|
|||||||
layout.offset_of_subfield(fx, fields.iter()).bytes()
|
layout.offset_of_subfield(fx, fields.iter()).bytes()
|
||||||
}
|
}
|
||||||
NullOp::UbChecks => {
|
NullOp::UbChecks => {
|
||||||
let val = fx.tcx.sess.opts.debug_assertions;
|
let val = fx.tcx.sess.ub_checks();
|
||||||
let val = CValue::by_val(
|
let val = CValue::by_val(
|
||||||
fx.bcx.ins().iconst(types::I8, i64::try_from(val).unwrap()),
|
fx.bcx.ins().iconst(types::I8, i64::try_from(val).unwrap()),
|
||||||
fx.layout_of(fx.tcx.types.bool),
|
fx.layout_of(fx.tcx.types.bool),
|
||||||
|
@ -341,6 +341,8 @@ fn emit_cgu(
|
|||||||
object: Some(global_asm_object_file),
|
object: Some(global_asm_object_file),
|
||||||
dwarf_object: None,
|
dwarf_object: None,
|
||||||
bytecode: None,
|
bytecode: None,
|
||||||
|
assembly: None,
|
||||||
|
llvm_ir: None,
|
||||||
}),
|
}),
|
||||||
existing_work_product: None,
|
existing_work_product: None,
|
||||||
})
|
})
|
||||||
@ -378,7 +380,15 @@ fn emit_module(
|
|||||||
|
|
||||||
prof.artifact_size("object_file", &*name, file.metadata().unwrap().len());
|
prof.artifact_size("object_file", &*name, file.metadata().unwrap().len());
|
||||||
|
|
||||||
Ok(CompiledModule { name, kind, object: Some(tmp_file), dwarf_object: None, bytecode: None })
|
Ok(CompiledModule {
|
||||||
|
name,
|
||||||
|
kind,
|
||||||
|
object: Some(tmp_file),
|
||||||
|
dwarf_object: None,
|
||||||
|
bytecode: None,
|
||||||
|
assembly: None,
|
||||||
|
llvm_ir: None,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fn reuse_workproduct_for_cgu(
|
fn reuse_workproduct_for_cgu(
|
||||||
@ -426,6 +436,8 @@ fn reuse_workproduct_for_cgu(
|
|||||||
object: Some(obj_out_regular),
|
object: Some(obj_out_regular),
|
||||||
dwarf_object: None,
|
dwarf_object: None,
|
||||||
bytecode: None,
|
bytecode: None,
|
||||||
|
assembly: None,
|
||||||
|
llvm_ir: None,
|
||||||
},
|
},
|
||||||
module_global_asm: has_global_asm.then(|| CompiledModule {
|
module_global_asm: has_global_asm.then(|| CompiledModule {
|
||||||
name: cgu.name().to_string(),
|
name: cgu.name().to_string(),
|
||||||
@ -433,6 +445,8 @@ fn reuse_workproduct_for_cgu(
|
|||||||
object: Some(obj_out_global_asm),
|
object: Some(obj_out_global_asm),
|
||||||
dwarf_object: None,
|
dwarf_object: None,
|
||||||
bytecode: None,
|
bytecode: None,
|
||||||
|
assembly: None,
|
||||||
|
llvm_ir: None,
|
||||||
}),
|
}),
|
||||||
existing_work_product: Some((cgu.work_product_id(), work_product)),
|
existing_work_product: Some((cgu.work_product_id(), work_product)),
|
||||||
})
|
})
|
||||||
@ -678,6 +692,8 @@ pub(crate) fn run_aot(
|
|||||||
object: Some(tmp_file),
|
object: Some(tmp_file),
|
||||||
dwarf_object: None,
|
dwarf_object: None,
|
||||||
bytecode: None,
|
bytecode: None,
|
||||||
|
assembly: None,
|
||||||
|
llvm_ir: None,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
|
Loading…
Reference in New Issue
Block a user