Implement a poor man's jump table.
We will eventually support real jump tables, but for now just expand br_table into a sequence of conditional branches.
This commit is contained in:
@@ -53,6 +53,7 @@ expand.custom_legalize(insts.heap_addr, 'expand_heap_addr')
|
||||
# TODO: Add sufficient XForm syntax that we don't need to hand-code these.
|
||||
expand.custom_legalize(insts.trapz, 'expand_cond_trap')
|
||||
expand.custom_legalize(insts.trapnz, 'expand_cond_trap')
|
||||
expand.custom_legalize(insts.br_table, 'expand_br_table')
|
||||
|
||||
# Custom expansions for floating point constants.
|
||||
# These expansions require bit-casting or creating constant pool entries.
|
||||
|
||||
Reference in New Issue
Block a user