SSAControlRangeDict Class Referencefile SSAControlRangeDict.h Collection of ranges extracted from SSA program's control flow
More...
#include <SSAControlRangeDict.h>
Inheritance diagram for SSAControlRangeDict:
[legend]List of all members.
|
Public Member Functions |
| | SSAControlRangeDict (SSAProgramUnit &pgm, int debug=0) |
| virtual | ~SSAControlRangeDict () |
| | Destructor.
|
| void | touch () |
| | Force this object to compute the ranges for each statement in the program unit.
|
| void | icdom_touch () |
| | Force each SSAControlRangeData object within myself to compute its immediate control dominator.
|
| const Statement & | representative_stmt (const Statement &stmt) const |
| | Return a statement that has the same control ranges as the given statement.
|
| RefSet< Symbol > * | range_vars (const Statement &stmt) const |
| | Return the set of variables that have constraints for the given statement.
|
| void | stats (float &avg_num_icdoms, int &max_num_icdoms, int &tot_num_icdoms, float &avg_num_ranges, int &max_num_ranges, int &tot_num_ranges) |
| | Compute statistics on the number of icdoms and the number of computed ranges for each statement.
|
| int | num_computed_ranges () const |
| | Return the number of ranges that this object has computed so far.
|
| void | clear () |
| | Delete all saved information within myself for each of program's statements.
|
| void | clear_ranges () |
| | Delete all saved ranges within myself.
|
| virtual void | print (ostream &o) const |
| | Print out the range dictionary.
|
| virtual void | pretty_print (ostream &o, const Statement &stmt) const |
| | Print out the range dictionary in a more user-readable manner.
|
| virtual Listable * | listable_clone (void) const |
| | listable_clone
|
| virtual int | structures_OK () const |
| | Methods required by Listable.
|
Protected Member Functions |
| virtual void | _set_range (const Symbol &var, const Statement &stmt, Expression *range) |
| | Not implemented. Will p_assert if called.
|
| virtual void | _del_range (const Symbol &var, const Statement &stmt) |
| | Not implemented. Will p_assert if called.
|
| virtual const Expression * | _get_range_ref (const Symbol &var, const Statement &stmt) |
| | Return the range associated with the given variable.
|
Detailed Description
file SSAControlRangeDict.h Collection of ranges extracted from SSA program's control flow
Polaris Range - See also:
- SSAControlRangeDict.h
SSAControlRangeDict.h
SSAControlRangeDict.cc
An SSAControlRangeDict object is a repository for variable ranges for a program unit in SSA form. Only those ranges that originate from FORTRAN control flow statements are collected.
An SSAControlRangeDict object is a repository of the variable ranges for all points of a program unit in SSA form. These ranges are extracted from the control flow statements of the program; that is, they are taken from IF conditional tests, DO statements, and CSRD$ ASSERT statements.
SSAControlRangeDict objects are demand-driven. That is, they compute the ranges for a particular statement only when they are asked for. If instead, the user wishes to have all the program unit's ranges to be computed at once, the user can call the touch() method.
The algorithm for computing the ranges of a program on demand using SSA form can be found in Blume and Eigenmann, "Demand- Driven Symbolic Range Propagation".
Definition at line 51 of file SSAControlRangeDict.h.
Constructor & Destructor Documentation
| SSAControlRangeDict::SSAControlRangeDict |
( |
SSAProgramUnit & |
pgm, |
|
|
int |
debug = 0 |
|
) |
|
|
Member Function Documentation
| void SSAControlRangeDict::touch |
( |
|
) |
|
|
|
|
Force this object to compute the ranges for each statement in the program unit.
... RefSet<Symbol> *vars = data.range_vars(); ... Iterator<Symbol> var_iter = *vars; ... ... for ( ; var_iter.valid(); ++var_iter) ... data.get_range_ref(var_iter.current());
... delete vars;
Definition at line 136 of file SSAControlRangeDict.cc.
References KeyIterator< S, T >::current_data(), KeyIterator< S, T >::current_key(), Type::data_type(), SSAControlRangeData::get_range_ref(), INTEGER_TYPE, Symbol::is_array(), representative_stmt(), Symbol::type(), and KeyIterator< S, T >::valid().
Referenced by SSAFullRangeDict::control_touch(), and stats(). |
| void SSAControlRangeDict::icdom_touch |
( |
|
) |
|
|
| const Statement & SSAControlRangeDict::representative_stmt |
( |
const Statement & |
stmt |
) |
const |
|
| void SSAControlRangeDict::stats |
( |
float & |
avg_num_icdoms, |
|
|
int & |
max_num_icdoms, |
|
|
int & |
tot_num_icdoms, |
|
|
float & |
avg_num_ranges, |
|
|
int & |
max_num_ranges, |
|
|
int & |
tot_num_ranges |
|
) |
|
|
|
|
Compute statistics on the number of icdoms and the number of computed ranges for each statement.
... Clear out all the ranges in my data object, ... but keep the icdoms intact.
Definition at line 170 of file SSAControlRangeDict.cc.
References ExprSet::clear(), SSAControlRangeData::clear_ranges(), clear_ranges(), KeyIterator< S, T >::current_data(), KeyIterator< S, T >::current_key(), Type::data_type(), SSAControlRangeData::get_range_ref(), SSAControlRangeData::icdom_ref(), INTEGER_TYPE, Symbol::is_array(), SSAControlRangeData::num_computed_ranges(), num_computed_ranges(), representative_stmt(), touch(), Symbol::type(), and KeyIterator< S, T >::valid(). |
| int SSAControlRangeDict::num_computed_ranges |
( |
|
) |
const |
|
| void SSAControlRangeDict::clear |
( |
|
) |
|
|
| void SSAControlRangeDict::clear_ranges |
( |
|
) |
|
|
| void SSAControlRangeDict::print |
( |
ostream & |
o |
) |
const [virtual] |
|
| void SSAControlRangeDict::pretty_print |
( |
ostream & |
o, |
|
|
const Statement & |
stmt |
|
) |
const [virtual] |
|
| Listable * SSAControlRangeDict::listable_clone |
( |
void |
|
) |
const [virtual] |
|
| int SSAControlRangeDict::structures_OK |
( |
|
) |
const [virtual] |
|
| void SSAControlRangeDict::_del_range |
( |
const Symbol & |
var, |
|
|
const Statement & |
stmt |
|
) |
[protected, virtual] |
|
The documentation for this class was generated from the following files:
|