Polaris: SSAFullRangeDict Class Reference

SSAFullRangeDict Class Reference

file SSAFullRangeDict.h Collection of ranges extracted from SSA program's control flow More...

#include <SSAFullRangeDict.h>

Inheritance diagram for SSAFullRangeDict:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 SSAFullRangeDict (SSAProgramUnit &pgm, int debug=0)
virtual ~SSAFullRangeDict ()
 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.
SSAControlRangeDictcontrol_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.

Detailed Description

file SSAFullRangeDict.h Collection of ranges extracted from SSA program's control flow

Polaris Range

See also:
SSAFullRangeDict.h

SSAFullRangeDict.h

SSAFullRangeDict.cc

Overview

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

Description

An SSAFullRangeDict object is a repository of the variable ranges for all points of a program unit in SSA 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.

SSAFullRangeDict 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 59 of file SSAFullRangeDict.h.


Constructor & Destructor Documentation

SSAFullRangeDict::SSAFullRangeDict SSAProgramUnit pgm,
int  debug = 0
 

SSAFullRangeDict::~SSAFullRangeDict  )  [virtual]
 

Destructor.

Definition at line 54 of file SSAFullRangeDict.cc.


Member Function Documentation

void SSAFullRangeDict::touch  ) 
 

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

Definition at line 63 of file SSAFullRangeDict.cc.

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

void SSAFullRangeDict::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 89 of file SSAFullRangeDict.cc.

References SSAControlRangeDict::touch().

void SSAFullRangeDict::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 98 of file SSAFullRangeDict.cc.

References SSAProgramUnit::_def_map, KeyIterator< S, T >::current_key(), Type::data_type(), INTEGER_TYPE, Symbol::is_array(), Symbol::type(), and KeyIterator< S, T >::valid().

Referenced by touch().

void SSAFullRangeDict::clear  ) 
 

Clear all saved data and control ranges stored within myself.

Definition at line 898 of file SSAFullRangeDict.cc.

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

void SSAFullRangeDict::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 914 of file SSAFullRangeDict.cc.

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

SSAControlRangeDict & SSAFullRangeDict::control_range_dict  ) 
 

Return my control range dictionary.

Definition at line 931 of file SSAFullRangeDict.cc.

int SSAFullRangeDict::num_data_ranges  )  const
 

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

Definition at line 115 of file SSAFullRangeDict.cc.

References BaseMapRoot::entries().

int SSAFullRangeDict::num_poisoned_ranges  )  const
 

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

Definition at line 124 of file SSAFullRangeDict.cc.

void SSAFullRangeDict::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 940 of file SSAFullRangeDict.cc.

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

void SSAFullRangeDict::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 1014 of file SSAFullRangeDict.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(), SSAControlRangeDict::pretty_print(), pretty_print_range(), Iterator< T >::reset(), sort_sym_list(), Iterator< T >::valid(), and KeyIterator< S, T >::valid().

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

listable_clone

Implements Listable.

Definition at line 1092 of file SSAFullRangeDict.cc.

int SSAFullRangeDict::structures_OK  )  const [virtual]
 

Methods required by Listable.

Definition at line 1103 of file SSAFullRangeDict.cc.

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

Not implemented. Will p_assert if called.

Implements RangeDict.

Definition at line 133 of file SSAFullRangeDict.cc.

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

Not implemented. Will p_assert if called.

Implements RangeDict.

Definition at line 144 of file SSAFullRangeDict.cc.

const Expression * SSAFullRangeDict::_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 823 of file SSAFullRangeDict.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 SSAControlRangeDict::representative_stmt().

Referenced by touch().


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:08:16 2005