Class Hierarchy Compound List File List Header Files Compound Members File Members
SemanticHelper Class Reference
This class understands the semantics of IR nodes.
More...
#include <utils/semantic_helper.h>
List of all members.
Static Public Members
- unsigned get_src_var (const ExecutionObject* exp, suif_vector<VariableSymbol*>* lst = NULL)
- Collect all source variables from an ExecutionObject. More...
- unsigned get_dst_var (const Statement* stmt, suif_vector<VariableSymbol*>* lst = NULL)
- Collect all destination variables from a Statement. More...
Detailed Description
This class understands the semantics of IR nodes.
Example: To retrieve all source var into a suif_vector:
To iterate over all source vars in an execution object:
for (SemanticHelper::SrcVarIter iter(execution_object);
iter.is_valid();
iter.next()) {
... iter.current() ...
To retrieve all destination variables in a statement
To iterate over all destination variables in a statement
for (SemanticHelper::DstVarIter iter(statement);
iter.is_valid();
iter.next()) {
... iter.current() ...
Member Function Documentation
unsigned SemanticHelper::get_src_var (const ExecutionObject * exp, suif_vector<VariableSymbol *>* lst = NULL) [static]
Collect all source variables from an ExecutionObject.
-
Parameters:
-
exp - the ExecutionObject.
-
lst - a vector to collect the variables.
-
Returns:
-
number of source variables found in exp.
The source variables will be appended to
lst, and the number of variables appended will be returned.
unsigned SemanticHelper::get_dst_var (const Statement * stmt, suif_vector<VariableSymbol *>* lst = NULL) [static]
Collect all destination variables from a Statement.
-
Parameters:
-
exp - the Statement.
-
lst - a vector to collect the variables.
-
Returns:
-
number of destination variables found in exp.
The destination variables will be appended to
lst, and the number of variables appended will be returned.
The documentation for this class was generated from the following file:
Generated at Mon Nov 22 19:43:45 1999 for NCI SUIF by
written by Dimitri van Heesch, © 1997-1999