Coalesce some formats into MultiAry.

Allow some flexibility in the signature matching for instruction
formats. In particular, look for a value list format as a second chance
option.

The Return, ReturnReg, and TernaryOverflow formats all fit the single
MultiAry catch-all format for instructions without immediate operands.
This commit is contained in:
Jakob Stoklund Olesen
2017-03-10 12:17:12 -08:00
parent 9fbfd0d2a6
commit 910e4e6174
8 changed files with 50 additions and 99 deletions

View File

@@ -50,10 +50,12 @@ def unwrap_inst(iref, node, fmt):
fmt.line('{},'.format(m))
if nvops == 1:
fmt.line('arg,')
elif nvops != 0:
fmt.line('args,')
elif iform.has_value_list or nvops > 1:
fmt.line('ref args,')
fmt.line('..')
fmt.outdented_line('} = dfg[inst] {')
if iform.has_value_list:
fmt.line('let args = args.as_slice(&dfg.value_lists);')
# Generate the values for the tuple.
outs = list()
prefix = 'data.' if iform.boxed_storage else ''