When lowering br_table to branches, delete the old jump tables.
This prevents codegen from emitting unused readonly data.
This commit is contained in:
committed by
Benjamin Bouvier
parent
997424a4c5
commit
bdcc06eb15
@@ -110,6 +110,11 @@ pub fn legalize_function(func: &mut ir::Function, cfg: &mut ControlFlowGraph, is
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Now that we've lowered all br_tables, we don't need the jump tables anymore.
|
||||
if !isa.flags().jump_tables_enabled() {
|
||||
pos.func.jump_tables.clear();
|
||||
}
|
||||
}
|
||||
|
||||
// Include legalization patterns that were generated by `gen_legalizer.py` from the `XForms` in
|
||||
|
||||
Reference in New Issue
Block a user