Use value lists for call arguments.
Add a new kind of instruction format that keeps all of its value arguments in a value list. These value lists are all allocated out of the dfg.value_lists memory pool. Instruction formats with the value_list property set store *all* of their value arguments in a single value list. There is no distinction between fixed arguments and variable arguments. Change the Call instruction format to use the value list representation for its arguments. This change is only the beginning. The intent is to eliminate the boxed_storage instruction formats completely. Value lists use less memory, and when the transition is complete, InstructionData will have a trivial Drop implementation.
This commit is contained in:
@@ -34,6 +34,8 @@ class InstructionFormat(object):
|
||||
enums.
|
||||
:param multiple_results: Set to `True` if this instruction format allows
|
||||
more than one result to be produced.
|
||||
:param value_list: Set to `True` if this instruction format uses a
|
||||
`ValueList` member to store its value operands.
|
||||
:param boxed_storage: Set to `True` is this instruction format requires a
|
||||
`data: Box<...>` pointer to additional storage in its `InstructionData`
|
||||
variant.
|
||||
@@ -52,6 +54,7 @@ class InstructionFormat(object):
|
||||
# type: (*Union[OperandKind, Tuple[str, OperandKind]], **Any) -> None # noqa
|
||||
self.name = kwargs.get('name', None) # type: str
|
||||
self.multiple_results = kwargs.get('multiple_results', False)
|
||||
self.has_value_list = kwargs.get('value_list', False)
|
||||
self.boxed_storage = kwargs.get('boxed_storage', False)
|
||||
self.members = list() # type: List[str]
|
||||
self.kinds = tuple(self._process_member_names(kinds))
|
||||
|
||||
Reference in New Issue
Block a user