GSAControlRangeDict Class Referencefile GSAControlRangeDict.h Collection of ranges extracted from GSA program's control flow
More...
#include <GSAControlRangeDict.h>
Inheritance diagram for GSAControlRangeDict:
[legend]List of all members.
|
Public Member Functions |
| | GSAControlRangeDict (ProgramUnit &pgm, int debug=0) |
| virtual | ~GSAControlRangeDict () |
| | Destructor.
|
| void | touch () |
| | Force this object to compute the ranges for each statement in the program unit.
|
| void | icdom_touch () |
| | Force each GSAControlRangeData 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 GSAControlRangeDict.h Collection of ranges extracted from GSA program's control flow
Polaris Range - See also:
- GSAControlRangeDict.h
GSAControlRangeDict.h
GSAControlRangeDict.cc
An GSAControlRangeDict object is a repository for variable ranges for a program unit in GSA form. Only those ranges that originate from FORTRAN control flow statements are collected.
An GSAControlRangeDict object is a repository of the variable ranges for all points of a program unit in GSA 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.
GSAControlRangeDict 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 GSA form can be found in Blume and Eigenmann, "Demand- Driven Symbolic Range Propagation".
Definition at line 54 of file GSAControlRangeDict.h.
Constructor & Destructor Documentation
| GSAControlRangeDict::GSAControlRangeDict |
( |
ProgramUnit & |
pgm, |
|
|
int |
debug = 0 |
|
) |
|
|
Member Function Documentation
| void GSAControlRangeDict::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 146 of file GSAControlRangeDict.cc.
References KeyIterator< S, T >::current_data(), KeyIterator< S, T >::current_key(), Type::data_type(), GSAControlRangeData::get_range_ref(), ProgramUnit::gsa_deflocs_guarded(), INTEGER_TYPE, Symbol::is_array(), DefLocMap::iterator(), representative_stmt(), DefLoc::stmt_valid(), Symbol::type(), and KeyIterator< S, T >::valid().
Referenced by GSAFullRangeDict::control_touch(), and stats(). |
| void GSAControlRangeDict::icdom_touch |
( |
|
) |
|
|
| const Statement & GSAControlRangeDict::representative_stmt |
( |
const Statement & |
stmt |
) |
const |
|
| void GSAControlRangeDict::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 182 of file GSAControlRangeDict.cc.
References ExprSet::clear(), GSAControlRangeData::clear_ranges(), clear_ranges(), KeyIterator< S, T >::current_data(), KeyIterator< S, T >::current_key(), Type::data_type(), GSAControlRangeData::get_range_ref(), ProgramUnit::gsa_deflocs_guarded(), GSAControlRangeData::icdom_ref(), INTEGER_TYPE, Symbol::is_array(), DefLocMap::iterator(), GSAControlRangeData::num_computed_ranges(), num_computed_ranges(), representative_stmt(), DefLoc::stmt_valid(), touch(), Symbol::type(), and KeyIterator< S, T >::valid(). |
| int GSAControlRangeDict::num_computed_ranges |
( |
|
) |
const |
|
| void GSAControlRangeDict::clear |
( |
|
) |
|
|
| void GSAControlRangeDict::clear_ranges |
( |
|
) |
|
|
| void GSAControlRangeDict::print |
( |
ostream & |
o |
) |
const [virtual] |
|
| void GSAControlRangeDict::pretty_print |
( |
ostream & |
o, |
|
|
const Statement & |
stmt |
|
) |
const [virtual] |
|
| Listable * GSAControlRangeDict::listable_clone |
( |
void |
|
) |
const [virtual] |
|
| int GSAControlRangeDict::structures_OK |
( |
|
) |
const [virtual] |
|
| void GSAControlRangeDict::_del_range |
( |
const Symbol & |
var, |
|
|
const Statement & |
stmt |
|
) |
[protected, virtual] |
|
The documentation for this class was generated from the following files:
|