Normalize passes keep spans and clean warnings
This commit is contained in:
@ -93,9 +93,10 @@ impl MirVerifier {
|
||||
instruction_index
|
||||
);
|
||||
if let Some(bb) = function.blocks.get(block) {
|
||||
let inst_opt = bb.all_instructions().nth(*instruction_index);
|
||||
if let Some(inst) = inst_opt {
|
||||
eprintln!("[mir-ssa-debug-inst] inst={:?}", inst);
|
||||
let inst_opt =
|
||||
bb.all_spanned_instructions_enumerated().nth(*instruction_index);
|
||||
if let Some((_idx, sp)) = inst_opt {
|
||||
eprintln!("[mir-ssa-debug-inst] inst={:?}", sp.inst);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -291,8 +292,8 @@ impl MirVerifier {
|
||||
|
||||
// Collect values used in merge block
|
||||
let mut used_values = std::collections::HashSet::new();
|
||||
for inst in merge_bb.all_instructions() {
|
||||
for v in inst.used_values() {
|
||||
for sp in merge_bb.all_spanned_instructions() {
|
||||
for v in sp.inst.used_values() {
|
||||
used_values.insert(v);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user