changes
This commit is contained in:
@@ -184,7 +184,7 @@ impl BlockLoweringOrder {
|
||||
visit_block_succs(f, block, |_, succ, from_table| {
|
||||
block_out_count[block] += 1;
|
||||
block_in_count[succ] += 1;
|
||||
block_succs.push(LoweredBlock::Orig { block: succ, cold: f.layout.is_cold(succ), indirect_branch_target: from_table });
|
||||
block_succs.push(LoweredBlock::Orig { block: succ, cold: f.layout.is_cold(succ), indirect_branch_target: false });
|
||||
|
||||
if from_table {
|
||||
indirect_branch_target_clif_blocks.insert(succ);
|
||||
@@ -254,7 +254,19 @@ impl BlockLoweringOrder {
|
||||
&LoweredBlock::Orig { block, .. } => {
|
||||
let range = block_succ_range[block].clone();
|
||||
lowered_succ_indices
|
||||
.extend(block_succs[range].iter().map(|lb| lb_to_bindex[lb]));
|
||||
.extend(block_succs[range].iter().map(|lb| {
|
||||
match lb {
|
||||
LoweredBlock::Orig { block, cold, .. } => {
|
||||
match lb_to_bindex.get(&LoweredBlock::Orig { block: *block, cold: *cold, indirect_branch_target: indirect_branch_target_clif_blocks.contains(block) } ) {
|
||||
Some(idx) => idx,
|
||||
None => {
|
||||
panic!("Trying to hashlookup {:?} in HashMap: {:?}", lb, lb_to_bindex);
|
||||
}
|
||||
}
|
||||
},
|
||||
_ => panic!("Invalid block type in block_succs")
|
||||
}
|
||||
}));
|
||||
|
||||
let last = f.layout.last_inst(block).unwrap();
|
||||
let opcode = f.dfg.insts[last].opcode();
|
||||
|
||||
Reference in New Issue
Block a user