RegisterSet Type
Represents a set of register IDs. This is an efficient and architecture-agnostic set data structure that internally uses bit arrays. Since RegisterIDs always start from 0 for any architecture, we can use it directly as an index to the bit array.
Constructors
| Constructor |
Description
|
|
|
|
|
Instance members
| Instance member |
Description
|
Full Usage:
this.Add
Parameters:
int
|
Adds a register to the set by marking the corresponding bit.
|
Full Usage:
this.BucketCount
Returns: int
|
Gets the number of buckets in the bit array.
|
Full Usage:
this.Clear
|
Clears the set. |
Full Usage:
this.Contains
Parameters:
int
Returns: bool
|
Checks if the set contains the given register indexed by
|
|
Updates the current register set by making an intersection with the given set.
|
Full Usage:
this.IsEmpty
Returns: bool
|
Checks if the set is empty.
|
Full Usage:
this.Iterate
Parameters:
int -> unit
|
Iterates over the set and applies the given function to each element.
|
Full Usage:
this.MaxNumElems
Returns: int
|
Gets the maximum number of elements that this set can hold.
|
Full Usage:
this.Remove
Parameters:
int
|
Removes a register from the set by unmarking the corresponding bit.
|
|
Updates the current register set by making a union with the given set.
|
B2R2