class documentation
Computes for each variable its possible last reads and last writes.
Method | __init__ |
Undocumented |
Method | aggregate |
Computes the before value for a node from the previous after values. |
Method | compute |
Computes the after value for a node from the node and the before value. |
Inherited from Analysis
:
Method | visit |
Visit the nodes of the control flow graph, performing the analysis. |
Instance Variable | after |
Either the in_label or out_label depending on the direction of the analysis. Marks the after_value on a node during an analysis. |
Instance Variable | before |
Either the in_label or out_label depending on the direction of the analysis. Marks the before_value on a node during an analysis. |
Instance Variable | forward |
(bool) True for forward analyses, False for backward analyses. |
Instance Variable | in |
The name of the analysis, suffixed with _in. |
Instance Variable | label |
The name of the analysis. |
Instance Variable | out |
The name of the analysis, suffixed with _out. |
Computes the before value for a node from the previous after values.
This is the 'meet' or 'join' function of the analysis. TODO(dbieber): Update terminology to match standard textbook notation.
Parameters | |
previous | The after values of all before nodes. |
Returns | |
The before value for the current node. |
Computes the after value for a node from the node and the before value.
This is the 'transfer' function of the analysis. TODO(dbieber): Update terminology to match standard textbook notation.
Parameters | |
node | The node or block for which to compute the after value. |
before | The before value of the node. |
Returns | |
The computed after value for the node. |