Polaris: GSAFullRangeDict Class Reference

GSAFullRangeDict Class Reference

file GSAFullRangeDict.h Collection of ranges extracted from GSA program's control flow More...

#include <GSAFullRangeDict.h>

Inheritance diagram for GSAFullRangeDict:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 GSAFullRangeDict (ProgramUnit &pgm, int debug=0)
virtual ~GSAFullRangeDict ()
 Destructor.
void touch ()
 Force this object to compute the ranges for each statement in the program unit.
void control_touch ()
 Force this object to compute the ranges for each statement in the program unit.
void data_touch ()
 Force this object to compute the ranges for each statement in the program unit.
void clear ()
 Clear all saved data and control ranges stored within myself.
void clear_ranges ()
 Clear all saved data and control ranges stored within myself.
GSAControlRangeDictcontrol_range_dict ()
 Return my control range dictionary.
int num_data_ranges () const
 Return the number of data ranges created since my construction or the last call to clear().
int num_poisoned_ranges () const
 Return the number of poisoned ranges created during the last invocation of _get_range_ref().
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 Listablelistable_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.

Friends

class GSAFullRangeData

Detailed Description

file GSAFullRangeDict.h Collection of ranges extracted from GSA program's control flow

Polaris Range

See also:
GSAFullRangeDict.h

GSAFullRangeDict.h

GSAFullRangeDict.cc

Overview

An GSAFullRangeDict object is a repository for variable ranges for a program unit in GSA form. Ranges derived from both data flow and control flow are collected, (unlike GSAControlRangeDict.h).

Description

An GSAFullRangeDict object is a repository of the variable ranges for all points of a program unit in GSA form. These ranges are extracted from the data flow and control flow of the program; that is, they are taken from IF conditional tests, DO statements, and CSRD$ ASSERT statements, assignment statements, and phi statements.

GSAFullRangeDict 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 62 of file GSAFullRangeDict.h.


Constructor & Destructor Documentation

GSAFullRangeDict::GSAFullRangeDict ProgramUnit pgm,
int  debug = 0
 

GSAFullRangeDict::~GSAFullRangeDict  )  [virtual]
 

Destructor.

Definition at line 59 of file GSAFullRangeDict.cc.


Member Function Documentation

void GSAFullRangeDict::touch  ) 
 

Force this object to compute the ranges for each statement in the program unit.

Definition at line 68 of file GSAFullRangeDict.cc.

References _get_range_ref(), Iterator< T >::current(), data_touch(), StmtList::iterator(), GSAControlRangeDict::range_vars(), GSAControlRangeDict::representative_stmt(), ProgramUnit::stmts(), and Iterator< T >::valid().

void GSAFullRangeDict::control_touch  ) 
 

Force this object to compute the ranges for each statement in the program unit.

Only ranges derived from control flow is touched.

Definition at line 94 of file GSAFullRangeDict.cc.

References GSAControlRangeDict::touch().

void GSAFullRangeDict::data_touch  ) 
 

Force this object to compute the ranges for each statement in the program unit.

Only ranges derived from data flow is touched. (However, touching these data ranges may cause some control ranges to be computed.)

Definition at line 103 of file GSAFullRangeDict.cc.

References Type::data_type(), ProgramUnit::gsa_deflocs_guarded(), INTEGER_TYPE, Symbol::is_array(), DefLocMap::iterator(), DefLoc::stmt_valid(), and Symbol::type().

Referenced by touch().

void GSAFullRangeDict::clear  ) 
 

Clear all saved data and control ranges stored within myself.

Definition at line 918 of file GSAFullRangeDict.cc.

References ExprSet::clear(), BaseMapRoot::clear(), and GSAControlRangeDict::clear().

void GSAFullRangeDict::clear_ranges  ) 
 

Clear all saved data and control ranges stored within myself.

Like clear() except some control range information is still kept.

Definition at line 934 of file GSAFullRangeDict.cc.

References ExprSet::clear(), BaseMapRoot::clear(), and GSAControlRangeDict::clear_ranges().

GSAControlRangeDict & GSAFullRangeDict::control_range_dict  ) 
 

Return my control range dictionary.

Definition at line 951 of file GSAFullRangeDict.cc.

int GSAFullRangeDict::num_data_ranges  )  const
 

Return the number of data ranges created since my construction or the last call to clear().

Definition at line 122 of file GSAFullRangeDict.cc.

References BaseMapRoot::entries().

int GSAFullRangeDict::num_poisoned_ranges  )  const
 

Return the number of poisoned ranges created during the last invocation of _get_range_ref().

Definition at line 131 of file GSAFullRangeDict.cc.

void GSAFullRangeDict::print ostream &  o  )  const [virtual]
 

Print out the range dictionary.

This operation is essentially just a dump of the data structures of the range dictionary.

Implements Listable.

Definition at line 960 of file GSAFullRangeDict.cc.

References KeyIterator< S, T >::current_data(), KeyIterator< S, T >::current_key(), Symbol::name_ref(), Statement::tag(), and KeyIterator< S, T >::valid().

void GSAFullRangeDict::pretty_print ostream &  o,
const Statement stmt
const [virtual]
 

Print out the range dictionary in a more user-readable manner.

Implements RangeDict.

Definition at line 1034 of file GSAFullRangeDict.cc.

References _debug_level, RefList< T >::clear(), Iterator< T >::current(), KeyIterator< S, T >::current_key(), ProtoRefMap< S, T >::find_ref(), ProtoMap< S, T >::find_ref(), RefList< T >::ins_last(), OMEGA_OP, Expression::op(), GSAControlRangeDict::pretty_print(), pretty_print_range(), Iterator< T >::reset(), sort_sym_list(), Iterator< T >::valid(), and KeyIterator< S, T >::valid().

Listable * GSAFullRangeDict::listable_clone void   )  const [virtual]
 

listable_clone

Implements Listable.

Definition at line 1112 of file GSAFullRangeDict.cc.

int GSAFullRangeDict::structures_OK  )  const [virtual]
 

Methods required by Listable.

Definition at line 1123 of file GSAFullRangeDict.cc.

void GSAFullRangeDict::_set_range const Symbol var,
const Statement stmt,
Expression range
[protected, virtual]
 

Not implemented. Will p_assert if called.

Implements RangeDict.

Definition at line 140 of file GSAFullRangeDict.cc.

void GSAFullRangeDict::_del_range const Symbol var,
const Statement stmt
[protected, virtual]
 

Not implemented. Will p_assert if called.

Implements RangeDict.

Definition at line 152 of file GSAFullRangeDict.cc.

const Expression * GSAFullRangeDict::_get_range_ref const Symbol var,
const Statement stmt
[protected, virtual]
 

Return the range associated with the given variable.

If the variable doesn't have an associated range, return 0;

Implements RangeDict.

Definition at line 843 of file GSAFullRangeDict.cc.

References ExprSet::clear(), RefMap< S, T >::del(), ProtoRefMap< S, T >::find_ref(), ProtoMap< S, T >::find_ref(), RangeAccessor::get_range_ref(), ExprSet::ins(), RefMap< S, T >::ins(), Map< S, T >::ins(), INTEGER_TYPE, intersect_ranges(), omega(), OMEGA_OP, Expression::op(), and GSAControlRangeDict::representative_stmt().

Referenced by touch().


Friends And Related Function Documentation

friend class GSAFullRangeData [friend]
 

Definition at line 63 of file GSAFullRangeDict.h.


The documentation for this class was generated from the following files:
 © 1995-2005 University of Illinois, Urbana-Champaign. All rights reserved.  Fri Mar 25 23:07:28 2005