1
Fork 0
rust/compiler/rustc_mir_transform/src
Trevor Gross 5044b20028
Rollup merge of #128628 - khuey:simply-cfg-erase-source-info, r=nnethercote
When deduplicating unreachable blocks, erase the source information.

After deduplication the block conceptually belongs to multiple locations in the source. Although these blocks are unreachable, in #123341 we did come across a real side effect, an unreachable block that survives into the compiled code can cause a debugger to set a breakpoint on the wrong instruction. Erasing the source information ensures that a debugger will never be misled into thinking that the unreachable block is worth setting a breakpoint on, especially after #128627.

Technically we don't need to erase the source information if all the deduplicated blocks have identical source information, but tracking that seems like more effort than it's worth.

I'll let njn redirect this one too. r? `@nnethercote`
2024-08-18 23:41:47 -05:00
..
coroutine Fix projections when parent capture is by-ref 2024-08-14 13:24:07 -04:00
coverage Use more slice patterns inside the compiler 2024-08-07 13:37:52 +02:00
inline Reformat use declarations. 2024-07-29 08:26:52 +10:00
shim rename AddressOf -> RawBorrow inside the compiler 2024-08-18 19:46:53 +02:00
abort_unwinding_calls.rs Shrink TyKind::FnPtr. 2024-08-09 14:33:25 +10:00
add_call_guards.rs remove redundant imports 2023-12-10 10:56:22 +08:00
add_moves_for_packed_drops.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
add_retag.rs rename AddressOf -> RawBorrow inside the compiler 2024-08-18 19:46:53 +02:00
add_subtyping_projections.rs remove redundant imports 2023-12-10 10:56:22 +08:00
check_alignment.rs rename AddressOf -> RawBorrow inside the compiler 2024-08-18 19:46:53 +02:00
check_const_item_mutation.rs Rename TyCtxt::emit_spanned_lint as TyCtxt::emit_node_span_lint. 2024-01-23 08:09:05 +11:00
check_packed_ref.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
cleanup_post_borrowck.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
copy_prop.rs Merge borrowed locals too. 2024-04-20 19:20:38 +00:00
coroutine.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
cost_checker.rs Fix conflicts after rebase 2024-07-07 18:16:38 +02:00
cross_crate_inline.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
ctfe_limit.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
dataflow_const_prop.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
dead_store_elimination.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
deduce_param_attrs.rs rename AddressOf -> RawBorrow inside the compiler 2024-08-18 19:46:53 +02:00
deduplicate_blocks.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
deref_separator.rs remove redundant imports 2023-12-10 10:56:22 +08:00
dest_prop.rs rename AddressOf -> RawBorrow inside the compiler 2024-08-18 19:46:53 +02:00
dump_mir.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
early_otherwise_branch.rs Use more slice patterns inside the compiler 2024-08-07 13:37:52 +02:00
elaborate_box_derefs.rs Stop doing weird index stuff in ElaborateBoxDerefs 2024-08-02 17:45:55 -04:00
elaborate_drops.rs Stop using MoveDataParamEnv for places that don't need a param-env 2024-07-29 11:59:47 -04:00
errors.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
ffi_unwind_calls.rs Shrink TyKind::FnPtr. 2024-08-09 14:33:25 +10:00
function_item_references.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
gvn.rs rename AddressOf -> RawBorrow inside the compiler 2024-08-18 19:46:53 +02:00
inline.rs Add and use IndexVec::append 2024-08-13 13:40:05 -07:00
instsimplify.rs rename AddressOf -> RawBorrow inside the compiler 2024-08-18 19:46:53 +02:00
jump_threading.rs Disable jump threading of float equality 2024-07-27 15:11:59 +02:00
known_panics_lint.rs rename AddressOf -> RawBorrow inside the compiler 2024-08-18 19:46:53 +02:00
large_enums.rs rename AddressOf -> RawBorrow inside the compiler 2024-08-18 19:46:53 +02:00
lib.rs MIR required_consts, mentioned_items: ensure we do not forget to fill these lists 2024-08-01 15:49:25 +02:00
lint.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
lower_intrinsics.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
lower_slice_len.rs Replace NormalizeArrayLen with GVN 2024-06-20 22:16:59 -07:00
match_branches.rs Re-enable SimplifyToExp in match_branches. 2024-08-03 10:55:46 +08:00
mentioned_items.rs MIR required_consts, mentioned_items: ensure we do not forget to fill these lists 2024-08-01 15:49:25 +02:00
multiple_return_terminators.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
nrvo.rs Revert "Auto merge of #115105 - cjgillot:dest-prop-default, r=oli-obk" 2024-05-31 00:22:40 +00:00
pass_manager.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
prettify.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
promote_consts.rs rename AddressOf -> RawBorrow inside the compiler 2024-08-18 19:46:53 +02:00
ref_prop.rs rename AddressOf -> RawBorrow inside the compiler 2024-08-18 19:46:53 +02:00
remove_noop_landing_pads.rs Support tail calls in mir via TerminatorKind::TailCall 2024-07-07 17:11:04 +02:00
remove_place_mention.rs remove redundant imports 2023-12-10 10:56:22 +08:00
remove_storage_markers.rs Move condition enabling the pass to is_enabled 2024-01-23 20:58:44 +01:00
remove_uninit_drops.rs Stop using MoveDataParamEnv for places that don't need a param-env 2024-07-29 11:59:47 -04:00
remove_unneeded_drops.rs Merge dead bb pruning and unreachable bb deduplication. 2024-01-07 15:12:10 +00:00
remove_zsts.rs Add CoroutineClosure to TyKind, AggregateKind, UpvarArgs 2024-02-06 02:22:58 +00:00
required_consts.rs MIR required_consts, mentioned_items: ensure we do not forget to fill these lists 2024-08-01 15:49:25 +02:00
reveal_all.rs MIR visitor: constant -> const_operand 2024-06-13 15:37:13 +02:00
shim.rs Auto merge of #128812 - nnethercote:shrink-TyKind-FnPtr, r=compiler-errors 2024-08-14 00:56:53 +00:00
simplify.rs When deduplicating unreachable blocks, erase the source information. 2024-08-03 21:23:35 -07:00
simplify_branches.rs simplify_branches: add comment 2024-03-24 12:53:03 +01:00
simplify_comparison_integral.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
single_use_consts.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
sroa.rs Use is_lang_item more aggressively 2024-06-14 16:54:29 -04:00
ssa.rs rename AddressOf -> RawBorrow inside the compiler 2024-08-18 19:46:53 +02:00
unreachable_enum_branching.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
unreachable_prop.rs Remove extern crate rustc_middle from rustc_mir_transform. 2024-05-13 08:20:18 +10:00
validate.rs rename AddressOf -> RawBorrow inside the compiler 2024-08-18 19:46:53 +02:00