Move jump tables to the DataFlowGraph (#5745)
Move the storage for jump tables off of FunctionStencil and onto DataFlowGraph. This change is in service of #5731, making it easier to access the jump table data in the context of helpers like inst_values.
This commit is contained in:
@@ -139,6 +139,8 @@ impl<'short, 'long> InstBuilderBase<'short> for FuncInstBuilder<'short, 'long> {
|
||||
for dest_block in self
|
||||
.builder
|
||||
.func
|
||||
.stencil
|
||||
.dfg
|
||||
.jump_tables
|
||||
.get(*table)
|
||||
.expect("you are referencing an undeclared jump table")
|
||||
|
||||
@@ -601,7 +601,7 @@ impl SSABuilder {
|
||||
let middle_block = dfg.blocks.add();
|
||||
func.stencil.layout.append_block(middle_block);
|
||||
|
||||
let table = &mut func.stencil.jump_tables[*jt];
|
||||
let table = &mut dfg.jump_tables[*jt];
|
||||
for block in table.iter_mut() {
|
||||
if *block == dest_block {
|
||||
*block = middle_block;
|
||||
|
||||
Reference in New Issue
Block a user