RangeAccessor Class Referencefile RangeAccessor.h Interface to a RangeDict object
More...
#include <RangeAccessor.h>
Inheritance diagram for RangeAccessor:
[legend]List of all members.
Detailed Description
file RangeAccessor.h Interface to a RangeDict object
Polaris Range - See also:
- RangeAccessor.h
RangeAccessor.h
RangeAccessor.cc
A RangeAccessor object is an interface to a RangeDict object. RangeAccessors are typically used to compare expressions or to determine whether a single expression is always positive or always negative. See the compare() and sign() methods for more details.
A RangeAccessor is created by giving it an RangeDict object and one or two statements. Subsequent comparisons performed by the RangeAccessor would be done using those ranges that hold on the entry of the given statement (or both of the two given statements) in the program unit.
Ranges can also be modified by a RangeAccessor object. However, these modifications are local to this object; that is the modifications are only seen by this object and are discarded when the object is deleted. The associated RangeDict object is not modified.
Many of the comparison operators can be found in the superclass of this object, RangeComparator.h.
Definition at line 51 of file RangeAccessor.h.
Constructor & Destructor Documentation
|
|
Create a RangeAccessor object that only uses those ranges that hold on the entries of the given pair of statements.
If union_ranges=true, the sets of ranges of the two statements are unioned together, otherwise they are intersected togethor. (Unioning means use the weaker of the two ranges, while intersecting means to use the stronger of the two.) |
Member Function Documentation
| void RangeAccessor::set_range |
( |
const Symbol & |
var, |
|
|
Expression * |
range |
|
) |
[virtual] |
|
| void RangeAccessor::del_range |
( |
const Symbol & |
var |
) |
[virtual] |
|
| const Expression * RangeAccessor::get_range_ref |
( |
const Symbol & |
var |
) |
[virtual] |
|
|
|
Return the range associated with the given variable.
If the variable doesn't have an associated range, return 0;
Implements RangeComparator.
Definition at line 78 of file RangeAccessor.cc.
References RangeDict::_get_range_ref(), ProtoMap< S, T >::find_ref(), intersect_ranges(), OMEGA_OP, Expression::op(), set_range(), and union_ranges().
Referenced by _filter_arrays(), SSAFullRangeDict::_get_range_ref(), GSAFullRangeDict::_get_range_ref(), and print_gsa_data_range_stats(). |
| void RangeAccessor::print |
( |
ostream & |
out |
) |
const [virtual] |
|
| void RangeAccessor::pretty_print |
( |
ostream & |
out |
) |
const |
|
|
|
Return the algebraic relationship between the two expressions, taking my ranges into account.
silvius: there seems to be an error: compare(N, Inf) results in <=, but it should be <
... <
... >
... <
... >
... The method compare determines relationships between two expressions ... by subtracting one expression from the other, and testing whether this ... difference is less than, equal, or greater than zero.
... Set main part of relation
... Now test for circularity if e2 is non-constant
... Set main part of relation
... Now test for circularity if e1 is non-constant
Reimplemented from RangeComparator.
Definition at line 255 of file RangeAccessor.cc.
References RangeComparator::compare().
Referenced by _eg_compare(), accessor_test(), ar_aggregate(), ar_interleave(), ar_offsets_match(), ar_subregion(), SimBiGraph::calc_similarity(), and eg_compare(). |
| Listable * RangeAccessor::listable_clone |
( |
void |
|
) |
const [virtual] |
|
| int RangeAccessor::structures_OK |
( |
|
) |
const [virtual] |
|
The documentation for this class was generated from the following files:
|