Polaris: StmtRefRanges Class Reference

StmtRefRanges Class Reference

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

#include <StmtRefRanges.h>

Inheritance diagram for StmtRefRanges:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 StmtRefRanges (const Symtab &symtab, ExprSet &range_set)
 StmtRefRanges.
 StmtRefRanges (const StmtRefRanges &other)
virtual ~StmtRefRanges ()
 ~StmtRefRanges
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.
StmtRefRangesoperator= (const StmtRefRanges &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:
StmtRefRanges.h

StmtRefRanges.h

StmtRefRanges.cc

Overview

A StmtRefRanges 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 ranges are stored as references to the ranges stored in the given variable range_set. This is done so to prevent the unneccessary duplication of expressions and to speed up the copying of StmtRefRanges.

Definition at line 40 of file StmtRefRanges.h.


Constructor & Destructor Documentation

StmtRefRanges::StmtRefRanges const Symtab symtab,
ExprSet range_set
 

StmtRefRanges.

Definition at line 24 of file StmtRefRanges.cc.

Referenced by listable_clone().

StmtRefRanges::StmtRefRanges const StmtRefRanges other  ) 
 

Definition at line 30 of file StmtRefRanges.cc.

StmtRefRanges::~StmtRefRanges  )  [virtual]
 

~StmtRefRanges

... nothing to do

Definition at line 40 of file StmtRefRanges.cc.


Member Function Documentation

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

Set the given variable to the given range.

Implements RangeComparator.

Definition at line 66 of file StmtRefRanges.cc.

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

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

Delete the range associated with the given variable.

Implements RangeComparator.

Definition at line 84 of file StmtRefRanges.cc.

References RangeComparator::_flush_sign_caches(), RefMap< S, T >::del(), and ProtoRefMap< S, T >::find_ref().

Referenced by set_range().

StmtRefRanges & StmtRefRanges::operator= const StmtRefRanges other  ) 
 

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

Definition at line 107 of file StmtRefRanges.cc.

References BaseStmtRanges::operator=().

int StmtRefRanges::entries  )  const [virtual]
 

Return the number of constrained variable entries in myself.

Implements BaseStmtRanges.

Definition at line 122 of file StmtRefRanges.cc.

References BaseMapRoot::entries().

void StmtRefRanges::clear  )  [virtual]
 

Discard all constraints within myself.

Implements BaseStmtRanges.

Definition at line 131 of file StmtRefRanges.cc.

References BaseMapRoot::clear().

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

Return the set of variables that have ranges.

Implements BaseStmtRanges.

Definition at line 51 of file StmtRefRanges.cc.

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

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

listable_clone

Implements Listable.

Definition at line 140 of file StmtRefRanges.cc.

References StmtRefRanges().

int StmtRefRanges::structures_OK  )  const [virtual]
 

Methods required by Listable.

Reimplemented from BaseStmtRanges.

Definition at line 149 of file StmtRefRanges.cc.

References ExprSet::structures_OK(), and BaseMapRoot::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