Polaris: StmtRanges Class Reference

StmtRanges Class Reference

Collection of ranges for a single statement. More...

#include <StmtRanges.h>

Inheritance diagram for StmtRanges:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 StmtRanges (const Symtab &symtab)
 StmtRanges.
 StmtRanges (const StmtRanges &other)
virtual ~StmtRanges ()
 ~StmtRanges
void set_range (const Symbol &var, Expression *range)
 Set the given variable to the given range.
void del_range (const Symbol &var)
 Delete the range associated with the given variable.
Expressiongrab_range (const Symbol &var)
 Grab and return the range associated with the given variable.
void simplify_min_max ()
 Simplify all ranges containing MIN and MAX expressions, using my range information.
StmtRangesoperator= (const StmtRanges &other)
 Completely copy the contents of the other constraint dictionary into myself.
int entries () const
 Return the number of constrained variable entries in myself.
void clear ()
 Discard all constraints within myself.
virtual RefSet< Symbol > * range_vars () const
 Return the set of variables that have ranges.
virtual Listablelistable_clone (void) const
 listable_clone
virtual int structures_OK () const
 Methods required by Listable.

Detailed Description

Collection of ranges for a single statement.

Polaris Range

See also:
StmtRanges.h

StmtRanges.h

StmtRanges.cc

Overview

A StmtRanges object is a collection ranges for each program variable for a single statement.

Description

This object holds all the ranges of a single statement. These objects are the main data structures of AIRangeDict.

Definition at line 36 of file StmtRanges.h.


Constructor & Destructor Documentation

StmtRanges::StmtRanges const Symtab symtab  ) 
 

StmtRanges.

... nothing to do

Definition at line 24 of file StmtRanges.cc.

References register_instance().

Referenced by listable_clone().

StmtRanges::StmtRanges const StmtRanges other  ) 
 

Definition at line 34 of file StmtRanges.cc.

References register_instance().

StmtRanges::~StmtRanges  )  [virtual]
 

~StmtRanges

... nothing to do

Definition at line 47 of file StmtRanges.cc.

References unregister_instance().


Member Function Documentation

void StmtRanges::set_range const Symbol var,
Expression range
[virtual]
 

Set the given variable to the given range.

Implements RangeComparator.

Definition at line 77 of file StmtRanges.cc.

References RangeComparator::_flush_sign_caches(), del_range(), Map< S, T >::ins(), and OMEGA_OP.

Referenced by AIRangeDict::_set_range(), _update_do_succs(), and simplify_min_max().

void StmtRanges::del_range const Symbol var  )  [virtual]
 

Delete the range associated with the given variable.

Implements RangeComparator.

Definition at line 93 of file StmtRanges.cc.

References RangeComparator::_flush_sign_caches(), Map< S, T >::del(), and ProtoMap< S, T >::find_ref().

Referenced by AIRangeDict::_del_range(), _update_succ_edges(), and set_range().

Expression * StmtRanges::grab_range const Symbol var  ) 
 

Grab and return the range associated with the given variable.

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

Definition at line 116 of file StmtRanges.cc.

References RangeComparator::_flush_sign_caches(), Map< S, T >::grab(), and ProtoMap< S, T >::member().

Referenced by simplify_min_max().

void StmtRanges::simplify_min_max  ) 
 

Simplify all ranges containing MIN and MAX expressions, using my range information.

Definition at line 130 of file StmtRanges.cc.

References contains_min_or_max(), Iterator< T >::current(), KeyIterator< S, T >::current_data(), KeyIterator< S, T >::current_key(), Expression::grab_left(), grab_range(), RefList< T >::ins_last(), Expression::left_guarded(), Expression::op(), RANGE_OP, remove_redundant_min_max_terms(), Expression::right_guarded(), set_range(), simplify(), sort_sym_list(), Iterator< T >::valid(), and KeyIterator< S, T >::valid().

StmtRanges & StmtRanges::operator= const StmtRanges other  ) 
 

Completely copy the contents of the other constraint dictionary into myself.

Definition at line 163 of file StmtRanges.cc.

References BaseStmtRanges::operator=().

int StmtRanges::entries  )  const [virtual]
 

Return the number of constrained variable entries in myself.

Implements BaseStmtRanges.

Definition at line 177 of file StmtRanges.cc.

References BaseMapRoot::entries().

Referenced by _collect_stats().

void StmtRanges::clear  )  [virtual]
 

Discard all constraints within myself.

Implements BaseStmtRanges.

Definition at line 186 of file StmtRanges.cc.

References BaseMapRoot::clear().

Referenced by _update_succ_edges().

RefSet< Symbol > * StmtRanges::range_vars  )  const [virtual]
 

Return the set of variables that have ranges.

Implements BaseStmtRanges.

Definition at line 62 of file StmtRanges.cc.

References KeyIterator< S, T >::current_key(), RefSet< T >::ins(), and KeyIterator< S, T >::valid().

Referenced by AIRangeDict::range_vars().

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

listable_clone

Implements Listable.

Definition at line 195 of file StmtRanges.cc.

References StmtRanges().

int StmtRanges::structures_OK  )  const [virtual]
 

Methods required by Listable.

Reimplemented from BaseStmtRanges.

Definition at line 204 of file StmtRanges.cc.

References BaseMapRoot::structures_OK().

Referenced by PropRangeWS::structures_OK().


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:22 2005