Sync from rust aa067fb984d36462548bb785da221bfaf38253f0
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")
|
||||
.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);
|
||||
fx.bcx.switch_to_block(block);
|
||||
|
||||
@ -789,7 +789,7 @@ fn codegen_stmt<'tcx>(
|
||||
layout.offset_of_subfield(fx, fields.iter()).bytes()
|
||||
}
|
||||
NullOp::UbChecks => {
|
||||
let val = fx.tcx.sess.opts.debug_assertions;
|
||||
let val = fx.tcx.sess.ub_checks();
|
||||
let val = CValue::by_val(
|
||||
fx.bcx.ins().iconst(types::I8, i64::try_from(val).unwrap()),
|
||||
fx.layout_of(fx.tcx.types.bool),
|
||||
|
@ -341,6 +341,8 @@ fn emit_cgu(
|
||||
object: Some(global_asm_object_file),
|
||||
dwarf_object: None,
|
||||
bytecode: None,
|
||||
assembly: None,
|
||||
llvm_ir: None,
|
||||
}),
|
||||
existing_work_product: None,
|
||||
})
|
||||
@ -378,7 +380,15 @@ fn emit_module(
|
||||
|
||||
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(
|
||||
@ -426,6 +436,8 @@ fn reuse_workproduct_for_cgu(
|
||||
object: Some(obj_out_regular),
|
||||
dwarf_object: None,
|
||||
bytecode: None,
|
||||
assembly: None,
|
||||
llvm_ir: None,
|
||||
},
|
||||
module_global_asm: has_global_asm.then(|| CompiledModule {
|
||||
name: cgu.name().to_string(),
|
||||
@ -433,6 +445,8 @@ fn reuse_workproduct_for_cgu(
|
||||
object: Some(obj_out_global_asm),
|
||||
dwarf_object: None,
|
||||
bytecode: None,
|
||||
assembly: None,
|
||||
llvm_ir: None,
|
||||
}),
|
||||
existing_work_product: Some((cgu.work_product_id(), work_product)),
|
||||
})
|
||||
@ -678,6 +692,8 @@ pub(crate) fn run_aot(
|
||||
object: Some(tmp_file),
|
||||
dwarf_object: None,
|
||||
bytecode: None,
|
||||
assembly: None,
|
||||
llvm_ir: None,
|
||||
})
|
||||
} else {
|
||||
None
|
||||
|
Loading…
x
Reference in New Issue
Block a user