List< T > Class Template Referencetemplate for types derived from Listable
More...
#include <List.h>
Inheritance diagram for List< T >:
[legend]List of all members.
|
Public Member Functions |
| INLINE | List () |
| | create an empty list
|
| INLINE | List (const List< T > &l) |
| | create a list identical to l
|
| virtual INLINE | ~List () |
| INLINE | List (unsigned static_size) |
| | Create a static list of size static_size initialized with all elements invalid.
|
| INLINE | List (const T *el1, const T *el2 GIV(0)) |
| | create a static list of 1 or 2 elements.
|
| INLINE void | make_static_list (int static_size) |
| | Clear the list and set it to a static list of size static_size with all elements invalid.
|
| INLINE Boolean | static_size () const |
| | Is the size of the collection static?
|
| INLINE void | fix_size () |
| | Make the size constant.
|
| INLINE void | unfix_size () |
| | Make the size variable.
|
| INLINE int | entries () const |
| | Return the number of entries within the List.
|
| INLINE Boolean | member (const T &el) const |
| | Check to see if node 'el' is a member of the List.
|
| INLINE int | index (const T &el) const |
| | Check to see if node 'el' is a member of the List.
|
| INLINE const T & | operator[] (int sub) const |
| INLINE T & | operator[] (int sub) |
| | Implements the subscript operator (indexed from 0).
|
| INLINE void | print (ostream &out, char *sep) const |
| | print list to out with 'sep' sepperating each element.
|
| virtual INLINE void | ins (const T *new_element, int loc) |
| | Insert new_element at location loc, where 0 <= loc <= entries().
|
| virtual INLINE void | del (int loc) |
| | Random Access Delete.
|
| virtual INLINE void | del (T &el) |
| | Delete node 'el'.
|
| virtual INLINE T * | grab (int loc) |
| | Random Access Grab.
|
| virtual INLINE T * | grab (T &el) |
| | Grab (i.e.
|
| virtual INLINE T * | modify_and_grab (T &el, T *replacement) |
| | Modify the list by grabbing 'el' out of the list and replacing it with 'replacement' in the spot which 'el' had taken in the list.
|
| virtual INLINE void | modify (T &el, T *replacement) |
| | Modify the list by grabbing 'el' out of the list and replacing it with 'replacement' in the spot which 'el' had taken in the list.
|
| virtual INLINE void | modify (int loc, T *replacement) |
| | Modify the list by grabbing the locth element out of the list and replacing it with 'replacement'.
|
| virtual INLINE void | ins_first (const T *new_element) |
| | Prepend new_element to the beginning of the list.
|
| virtual INLINE void | ins_last (const T *new_element) |
| | Append new_element to the end of the list.
|
| virtual INLINE void | ins_before (const T *new_element, const T *ref) |
| | Insert new_element before the reference element 'ref' (if ref == 0, insert at END of list).
|
| virtual INLINE void | ins_after (const T *new_element, const T *ref) |
| | Insert new_element after the reference element 'ref' (if ref == 0, insert at BEGINNING of list).
|
| virtual INLINE T * | pull (int loc) |
| | Temporarily remove the locth element from the list so that it can be operated on by assign and replaced.
|
| virtual INLINE T * | pull (T &el) |
| | Temporarily remove the element el from the list so that it can be operated on by assign and replaced.
|
| virtual INLINE Assign< T > | assign (int loc) |
| | Return control of a pulled element to its list in its original position.
|
| virtual INLINE Assign< T > | assign (T &el) |
| | Return control of a pulled element to its list in its original position.
|
| INLINE const T * | next_ref (const T &el) const |
| INLINE T * | next_ref (const T &el) |
| | Return the element after 'el' (return 0 if none).
|
| INLINE const T * | prev_ref (const T &el) const |
| INLINE T * | prev_ref (const T &el) |
| | Return the element before 'el' (return 0 if none).
|
| INLINE const T * | first_ref () const |
| INLINE T * | first_ref () |
| | Return the first element.
|
| INLINE const T * | last_ref () const |
| INLINE T * | last_ref () |
| | Return the last element.
|
| INLINE Boolean | valid (int loc) const |
| | is the locth element valid?
|
| virtual INLINE void | clear () |
| | Delete the entire list and, for static lists, set all entries to invalid.
|
| virtual INLINE List< T > & | operator= (const List< T > &l) |
| | Copy operator copies all elements of a list If the LHS list is static, the RHS list must be of equal or smaller size and the LHS list will be padded with invalid nodes.
|
| virtual INLINE int | structures_OK () const |
| | Check the structure of the data for errors or inconsistency Return 0 and print error message if problems found, otherwise return 1 without message.
|
| virtual INLINE Listable * | listable_clone () const |
| | Needed for Listable class.
|
| virtual INLINE void | print (ostream &o) const |
| | Needed for Listable class.
|
Protected Member Functions |
| virtual INLINE const Collection & | _base_collection () const |
| virtual INLINE Collection & | _base_collection () |
Protected Attributes |
| BaseList | _list |
Friends |
| class | Iterator<T> |
| class | Mutator<T> |
| class | TopSorter |
| | gcc-2.96 need the stupid "<>" pair friend ostream & operator << (ostream & o, const List<T> &l);
|
| ostream & | operator<< (ostream &o, const List< T > &l) |
Detailed Description
template<class T>
class List< T >
template for types derived from Listable
Polaris C++ VDL - See also:
- List.h
The List class creates a templatized linked-list object for objects which must be derived from Listable. Since the List is built from Collection it works with Iterators. When an object is placed into a List, the List assumes ownership of the object and that object can not be placed in any other live structure. An object must be in a live structure, like List, before it can be used in a reference structure, like RefList.
If a list is static, its size must remain constant. Thus, calls to either ins or del methods result in errors. If an element is grabbed from a static list, the element's position becomes invalid (a state which can be checked). That position can then be modified to another object which will revalidate it. All modify routines operate on static lists. A static list can be initialized to a fixed size by passing a positive integer value to the constructor. This creates a staic list of invlaid elements which can changed using 'modify' commands.
Note that Lists are indexed from 0.
These Lists provide reference counting so List elements, if deleted or grabbed from the owner list while still being referenced by some reference structures, will become \'invalid\'--a state which can be checked by the ref. structure before any dereferencing takes place.
assign/pull is designed to allow the functionality of modifying an element of a list to be some function of the old value of that position. The assign() is meant to be executed first, to capture the original position in the under-lying list for the element. The Assign<T> object returned by assign() stores the position information of the element. Then, pull() is used to remove the element from the list, without losing its position in the list.
The 'pull' method removes the specified object from its list (like grab) but maintains it's 'place' in the list. Once an object has been pulled, it is no longer possible to access the List using the pulled object as a reference. Once an object has been pulled it can be modified in any way. Once the modification is complete, the object can be returned to its position in the list by assigning to the Assign<T> object (the one created by the original assign() call).
The user, of course, is responsible for garbage collecting any intermediate forms of the pulled object which may be created. A complete use would be as follows:
'function' is simply a funtion which returns the modified value. If the modified value is a different object than the original, function is responsible for garbage collecting the original. In this case, the specified object is pulled from the list, modified somehow by function and the returned value takes it's place in the list.
IMPORTANT - Note:
Due to the order in which different C++ compilers evaluate assignment statements, the statement:
list.assign(el) = f(list.pull(el));
may not function correctly. Also, the following code is INCORRECT:
x = list.pull(el);
list.assign(el) = f(x);
will result in a run-time error. The assign() member function must ALWAYS execute prior to the corresponding pull() member function!
List does not directly inherit from Collection. Instead it inherits from TypedCollection (which forms the interface to all Iterator routines) and contains a BaseList which inherits from Collection. The hierarchy can be represented by:
Collection, Listable, Wrapper, Iterator, TypedCollection, Zombie, BaseList
Definition at line 161 of file List.h.
Constructor & Destructor Documentation
|
template<class T> |
| INLINE List< T >::List |
( |
|
) |
|
|
|
|
create an empty list
< nothing to do
Definition at line 377 of file List.h. |
|
template<class T> |
| INLINE List< T >::List |
( |
const List< T > & |
l |
) |
|
|
|
template<class T> |
| INLINE List< T >::~List |
( |
|
) |
[virtual] |
|
|
|
< nothing to do
Definition at line 405 of file List.h. |
|
template<class T> |
| INLINE List< T >::List |
( |
unsigned |
static_size |
) |
|
|
|
template<class T> |
| INLINE List< T >::List |
( |
const T * |
el1, |
|
|
const T *el2 |
GIV(0) |
|
) |
|
|
Member Function Documentation
|
template<class T> |
| INLINE const Collection & List< T >::_base_collection |
( |
|
) |
const [protected, virtual] |
|
|
template<class T> |
| INLINE Collection & List< T >::_base_collection |
( |
|
) |
[protected, virtual] |
|
|
template<class T> |
| INLINE void List< T >::make_static_list |
( |
int |
static_size |
) |
|
|
|
|
Clear the list and set it to a static list of size static_size with all elements invalid.
Definition at line 398 of file List.h.
References List< T >::_list, and BaseList::make_static_list().
Referenced by AllocateStmt::AllocateStmt(), ArithmeticIfStmt::ArithmeticIfStmt(), ArrayBounds::ArrayBounds(), AssignedGotoStmt::AssignedGotoStmt(), AssignmentStmt::AssignmentStmt(), AssignStmt::AssignStmt(), CallStmt::CallStmt(), ComputedGotoStmt::ComputedGotoStmt(), Statement::copy_base(), DeallocateStmt::DeallocateStmt(), DoStmt::DoStmt(), ElseIfStmt::ElseIfStmt(), EntryStmt::EntryStmt(), BinRep::ief_format(), IfStmt::IfStmt(), IOStmt::IOStmt(), NullifyStmt::NullifyStmt(), PauseStmt::PauseStmt(), ReturnStmt::ReturnStmt(), s_control_type::s_control_type(), SharedBounds::SharedBounds(), StopStmt::StopStmt(), and WhileStmt::WhileStmt(). |
|
template<class T> |
| INLINE Boolean List< T >::static_size |
( |
|
) |
const |
|
|
template<class T> |
| INLINE void List< T >::fix_size |
( |
|
) |
|
|
|
template<class T> |
| INLINE void List< T >::unfix_size |
( |
|
) |
|
|
|
template<class T> |
| INLINE int List< T >::entries |
( |
|
) |
const |
|
|
|
Return the number of entries within the List.
Definition at line 424 of file List.h.
References List< T >::_list, and Collection::entries().
Referenced by EvolutionGraph::_add_approximations(), _add_data_assigns(), EvolutionGraph::_add_evolutions(), _add_subscript_constraints_to_ranges(), _additive_inverse(), VDL::_append(), _combine_int_relations(), _combine_min_max(), _combine_other_logicals(), _create_data_assigns(), _create_new_actual_consts(), _delete_dead_code(), _determine_relation(), _factor_out_var_top(), _fold_divisible_in_mult(), _fold_divisible_in_plus(), _handle_omega_in_mod(), BinRep::_ief_format(), _init_data_preds(), _int_diff(), _join(), _logical_complement(), _p_mm_o_of_add(), _p_mm_o_of_mult(), _p_r_o_of_add(), _p_r_o_of_min_max(), _p_r_o_of_mod(), _p_r_o_of_mult(), ProgramUnit::_propagate_symbol_dimensions(), _pull_min_max_out_top(), _pull_out_common_min_max1(), _pull_ranges_out(), _range_bound_multiply(), _recognize(), _remove_assertion(), _remove_truncates1(), BinRep::_setl_format(), _solve_linear_expr(), _sort_expr_list(), TranslateObject::_translate_symbol_refs_expr(), _update_do_succs(), _update_enddo_succs(), _update_if_succs(), DDgraph::add(), IPCPProcData::add_consts_to_pgm(), alternate_expr_valid(), ar_intersect(), AssertPartialFirstValue::arg_list_valid(), AssertPartialReduction::arg_list_valid(), base_offset(), AbstractAccess::calc_overlap(), cdg(), cdg_dag2tree(), Statement::check_common_fields(), AbstractAccess::check_sort(), clean_program(), Equivalence::clear(), RecurrenceAssertion::clone(), AbstractAccess::coalesce(), coalese_loop_pu(), compute_top_range_from_actuals(), conformable_test(), contains_side_effect_call(), copy_directives(), StmtList::create_assertions(), StmtList::create_directives(), BinRep::del(), AbstractAccess::del_dimension(), eg_range_array_1_to_i(), VDL::end_object(), enforce_standard_within_bounds(), WorkSpaceStack::entries(), Equivalence::entries(), evaluate_dag2tree(), Expression::exchange_expr(), BinRep::find_ref(), EntryStmt::fortran_write(), gating(), DoStmt::get_loop_name(), IPCPProcData::have_consts_sets_changed(), incompatible_gates(), RecurrenceAssertion::index(), infer_preds(), RecurrenceAssertion::init(), InsertPhiStmt(), VariableSymbol::is_array(), VariableSymbol::is_scalar(), VariableSymbol::is_shared(), Statement::iterate_in_exprs_valid(), last_element_offset(), AbstractAccess::lastoffset(), RecurrenceAssertion::limit(), linearize_zero_registered(), Directive::lines(), main(), InlineObject::make_conformable(), IPCPProcData::make_consts_sets_old(), MakeGSA_test(), merge_DVs(), Expression::node_compare(), normalize_loop_pu(), AbstractAccess::number_of_dimensions(), open_output_file(), BinRep::operator[](), peel_first_loop_pu(), peel_last_loop_pu(), peel_loop_last(), WorkSpaceStack::pop(), Predicates::Predicates(), preroll_loop_pu(), RecurrenceAssertion::print(), Statement::print_fields(), process(), pull_min_max_out(), WorkSpaceStack::push(), Program::read(), read_pu(), InlineObject::remap_arg_names(), remap_args_precalc_expr(), SymbolAccessMap::remap_interface_vars(), remove_redundant_min_max_terms(), replace_lambda_call(), reshape_array(), reverse_loop_pu(), SSAProgramUnit::SEARCH(), SEARCH(), AbstractAccess::sort_add_dim(), RecurrenceAssertion::step(), strip_horiz_loop_pu(), strip_vert_loop_pu(), Summation::sum_mul(), WorkSpaceStack::top_ref(), unroll_loop_pu(), VariableSymbol::VariableSymbol(), and SymbolAccess::write(). |
|
template<class T> |
| INLINE Boolean List< T >::member |
( |
const T & |
el |
) |
const |
|
|
template<class T> |
| INLINE int List< T >::index |
( |
const T & |
el |
) |
const |
|
|
template<class T> |
| INLINE const T & List< T >::operator[] |
( |
int |
sub |
) |
const |
|
|
template<class T> |
| INLINE T & List< T >::operator[] |
( |
int |
sub |
) |
|
|
|
|
Implements the subscript operator (indexed from 0).
Should be used for random access only. Consecutive searching should use the Iterator<T> class. It is much more efficient.
Definition at line 459 of file List.h.
References List< T >::_list, and sub(). |
|
template<class T> |
| INLINE void List< T >::print |
( |
ostream & |
out, |
|
|
char * |
sep |
|
) |
const |
|
|
template<class T> |
| INLINE void List< T >::ins |
( |
const T * |
new_element, |
|
|
int |
loc |
|
) |
[virtual] |
|
|
|
Insert new_element at location loc, where 0 <= loc <= entries().
This results in an error if the List is static sized.
Definition at line 473 of file List.h.
References List< T >::_list, and BaseList::ins().
Referenced by _add_data_assigns(), _get_top_scalars(), _remove_divs_from_term(), AbstractAccess::add_dimension(), compute_top_range_from_actuals(), Statement::exchange_convert(), Namelist::ins(), main(), make_gsa_var(), optimize_ssa_eta(), optimize_ssa_mu(), and process(). |
|
template<class T> |
| INLINE void List< T >::del |
( |
int |
loc |
) |
[virtual] |
|
|
|
Random Access Delete.
Delete the Node in position loc where 0 <= loc < entries()-1. If references to the deleted element exist in RefStructures, the references will now be invalid, making access illegal. This results in an error for static lists.
Definition at line 480 of file List.h.
References List< T >::_list, and BaseList::del().
Referenced by _combine_int_relations(), _combine_min_max(), _delete_dead_code(), _factor_out_var_top(), _init_data_preds(), TranslateObject::_translate_symbol_refs_expr(), cdg_dag2tree(), clean_program(), VariableSymbol::clear_equivalence(), FunctionSymbol::clear_equivalence(), clone_loop(), clone_loop_body(), StmtList::del(), Namelist::del(), ExprSet::del(), BinRep::del(), AbstractAccess::del_dimension(), main(), peel_loop_last(), WorkSpaceStack::pop(), process(), process2(), remap_args_precalc_expr(), remove_maymod_assertions(), remove_preamble(), StmtList::split_elseif(), and AbstractAccess::try_coalescing(). |
|
template<class T> |
| INLINE void List< T >::del |
( |
T & |
el |
) |
[virtual] |
|
|
|
Delete node 'el'.
el MUST be in the BaseList (this is not necessarily checked). If the list is static a error is raised. If references to the deleted element exist in RefStructures, the references will now be invalid, making access illegal.
Reimplemented in StmtList.
Definition at line 487 of file List.h.
References List< T >::_list, and BaseList::del(). |
|
template<class T> |
| INLINE T * List< T >::grab |
( |
int |
loc |
) |
[virtual] |
|
|
|
Random Access Grab.
Grab (i.e. unlink and return the pointer to, but DO NOT delete) the element at location loc. If the list is static, the locth Node becomes invalid.
Reimplemented in StmtList.
Definition at line 494 of file List.h.
References List< T >::_list, and BaseList::grab().
Referenced by _additive_inverse(), _combine_int_relations(), _combine_min_max(), _combine_other_logicals(), IntrinsicCallExpr::_combine_top(), _divide_by_factor1(), _extract_ranges_rel(), _factor_out_var_top(), _fold_divisible_in_mult(), _fold_divisible_in_plus(), UnaryExpr::_grab_expr(), BinaryExpr::_grab_left(), BinaryExpr::_grab_right(), _handle_omega_in_mod(), _invert_expr(), _join(), _p_mm_o_of_add(), _p_mm_o_of_mult(), _p_r_o_of_abs(), _p_r_o_of_mod(), _p_r_o_of_mult(), _pull_out_common_min_max1(), _range_bound_multiply(), _remove_divs_from_rel(), _remove_divs_from_term(), _remove_truncates1(), _solve_linear_expr(), _sort_expr_list(), TranslateObject::_translate_symbol_refs_expr(), abs_to_max(), DDgraph::add(), ar_intersect(), clean_variables(), eg_range_array_1_to_i(), VDL::end_set(), VDL::end_tuple(), StmtList::grab(), main(), InlineObject::make_conformable(), IPCPProcData::make_consts_sets_old(), InlineObject::map_existing_common_block(), Predicates::Predicates(), process2(), remove_redundant_min_max_terms(), and TranslateObject::translate_GSA_symbol_refs(). |
|
template<class T> |
| INLINE T * List< T >::grab |
( |
T & |
el |
) |
[virtual] |
|
|
|
Grab (i.e.
unlink and return the reference to, but DO NOT delete) the element 'el', which MUST be in the list (this is not necessarily checked). If the list is static the node which was grabbed becomes invalid. If references to the deleted element exist in RefStructures, the references will now be invalid, making access illegal.
Reimplemented in StmtList.
Definition at line 501 of file List.h.
References List< T >::_list, and BaseList::grab(). |
|
template<class T> |
| INLINE T * List< T >::modify_and_grab |
( |
T & |
el, |
|
|
T * |
replacement |
|
) |
[virtual] |
|
|
|
Modify the list by grabbing 'el' out of the list and replacing it with 'replacement' in the spot which 'el' had taken in the list.
A pointer to 'el' is returned, and the user becomes responsible for deleting 'el'. If 'el' is the same element as 'replacement', a run-time error message occurs.
Reimplemented in StmtList.
Definition at line 651 of file List.h.
References List< T >::_list, and BaseList::modify_and_grab(). |
|
template<class T> |
| INLINE void List< T >::modify |
( |
T & |
el, |
|
|
T * |
replacement |
|
) |
[virtual] |
|
|
|
Modify the list by grabbing 'el' out of the list and replacing it with 'replacement' in the spot which 'el' had taken in the list.
'el' is deleted. 'el' MAY be the same element as 'replacement'. In this case, the call is simply ignored.
Reimplemented in StmtList.
Definition at line 658 of file List.h.
References List< T >::_list, and BaseList::modify().
Referenced by NonBinaryExpr::_divide_by_int(), UnaryExpr::_expr(), _factor_out_var_top(), BinaryExpr::_left(), _p_r_o_of_ifix(), _p_r_o_of_mod(), BinaryExpr::_right(), AssignedGotoStmt::_setptrs(), ComputedGotoStmt::_setptrs(), ArithmeticIfStmt::_setptrs(), IOStmt::_setptrs(), AllocateStmt::AllocateStmt(), ArithmeticIfStmt::ArithmeticIfStmt(), ArrayBounds::ArrayBounds(), AssignedGotoStmt::AssignedGotoStmt(), AssignmentStmt::AssignmentStmt(), AssignStmt::AssignStmt(), CallStmt::CallStmt(), clone_loop(), clone_loop_body(), ComputedGotoStmt::ComputedGotoStmt(), Statement::copy_base(), DeallocateStmt::DeallocateStmt(), DoStmt::DoStmt(), ElseIfStmt::ElseIfStmt(), EntryStmt::EntryStmt(), WhileStmt::expr(), AssignedGotoStmt::expr(), ComputedGotoStmt::expr(), ReturnStmt::expr(), PauseStmt::expr(), StopStmt::expr(), ElseIfStmt::expr(), IfStmt::expr(), ArithmeticIfStmt::expr(), BinRep::ief_format(), IfStmt::IfStmt(), DoStmt::index(), DoStmt::init(), IOStmt::io_list(), IOStmt::IOStmt(), AssignStmt::lhs(), AssignmentStmt::lhs(), DoStmt::limit(), SharedBounds::lower(), ArrayBounds::lower(), NullifyStmt::NullifyStmt(), WhileStmt::operator=(), NullifyStmt::operator=(), DeallocateStmt::operator=(), AllocateStmt::operator=(), AssignedGotoStmt::operator=(), ComputedGotoStmt::operator=(), ArithmeticIfStmt::operator=(), ReturnStmt::operator=(), EntryStmt::operator=(), CallStmt::operator=(), PauseStmt::operator=(), StopStmt::operator=(), IOStmt::operator=(), AssignStmt::operator=(), ElseIfStmt::operator=(), IfStmt::operator=(), DoStmt::operator=(), AssignmentStmt::operator=(), SharedBounds::operator=(), ArrayBounds::operator=(), optimize_ssa_beta(), NullifyStmt::parameters(), DeallocateStmt::parameters(), EntryStmt::parameters(), CallStmt::parameters(), AllocateStmt::parameters(), PauseStmt::PauseStmt(), process(), Namelist::relink_dptrs(), ReturnStmt::ReturnStmt(), AssignmentStmt::rhs(), EntryStmt::routine(), CallStmt::routine(), s_control_type::s_control_type(), SSAProgramUnit::SEARCH(), SEARCH(), SharedBounds::SharedBounds(), DoStmt::step(), StopStmt::StopStmt(), SharedBounds::upper(), ArrayBounds::upper(), and WhileStmt::WhileStmt(). |
|
template<class T> |
| INLINE void List< T >::modify |
( |
int |
loc, |
|
|
T * |
replacement |
|
) |
[virtual] |
|
|
|
Modify the list by grabbing the locth element out of the list and replacing it with 'replacement'.
If the locth element is valid, it is deleted, if it is not valid, 'replacement' takes the locth position. 'el' MAY be the same element as teh locth element. In this case, the call is simply ignored. This is the only method of revalidating invalid nodes.
Reimplemented in StmtList.
Definition at line 665 of file List.h.
References List< T >::_list, and BaseList::modify(). |
|
template<class T> |
| INLINE void List< T >::ins_first |
( |
const T * |
new_element |
) |
[virtual] |
|
|
|
Prepend new_element to the beginning of the list.
This results in an error for static lists.
Definition at line 508 of file List.h.
References List< T >::_list, and BaseList::ins().
Referenced by _additive_inverse(), _combine_int_relations(), _combine_min_max(), _fold_divisible_in_mult(), _join(), _join_nonbinary_exprs(), _range_bound_multiply(), _remove_divs_from_term(), abs_to_max(), DDgraphTester::add(), DDgraph::add(), IPCPProcData::add_constant_set(), SymbolAccess::add_read(), SymbolAccess::add_readwrite(), SymbolAccess::add_write(), ar_interleave(), Directive::break_line(), compute_top(), convert_assert_list(), Equivalence::Equivalence(), find_id_exprs(), force_parallel(), Directive::generate_convex_parallel_directive(), Directive::generate_convex_spp_parallel_directive(), Directive::generate_csrd_parallel_directive(), Directive::generate_omp_do_directive(), Directive::generate_omp_parallel_directive(), Directive::generate_sgi_parallel_directive(), CDRepository::ins(), AbstractAccess::lastoffset(), main(), InlineObject::make_conformable(), IPCPProcData::make_consts_sets_old(), merge_DVs(), process(), process2(), WorkSpaceStack::push(), remap_args_precalc_expr(), reshape_array(), SSAProgramUnit::SEARCH(), SEARCH(), VDL::start_set(), VDL::start_tuple(), and unlinearize_array_ref(). |
|
template<class T> |
| INLINE void List< T >::ins_last |
( |
const T * |
new_element |
) |
[virtual] |
|
|
|
Append new_element to the end of the list.
This results in an error for staic lists.
Definition at line 515 of file List.h.
References List< T >::_list, Collection::entries(), and BaseList::ins().
Referenced by _add_flow_edges(), VDL::_append(), _combine_int_relations(), _combine_min_max(), _combine_other_logicals(), SymbolAccess::_copy_access_lists(), _create_data_assigns(), _create_new_actual_consts(), _create_parent(), _factor_out_var_top(), _find_scalar_sources(), _fold_divisible_in_mult(), _fold_divisible_in_plus(), _join(), _join_nonbinary_exprs(), _norm_func_calls1(), _p_mm_o_of_add(), _p_mm_o_of_mult(), _pull_out_common_min_max1(), _pull_out_divisible(), _range_bound_multiply(), _remove_duplicates(), _remove_truncates1(), _solve_linear_expr(), _sort_expr_list(), _subst_var_in_assert(), TranslateObject::_translate_symbol_refs_expr(), DDgraphTester::add(), DDgraph::add(), TreeInMaking::add_arg(), IPCPProcData::add_constant_set(), AbstractAccess::add_dimension(), IPCPProcData::add_maymods(), TopSortNode::add_to_source_list(), TopSortNode::add_to_target_list(), append_shared_data_objects(), AssertPartialFirstValue::AssertPartialFirstValue(), AssertPartialReduction::AssertPartialReduction(), aux_ief_parse(), aux_setl_parse(), build_def_map(), build_expr(), build_mu(), cdg2cfg(), clean_program(), clean_variables(), cleanup_gate_inferences(), clone_loop(), clone_loop_body(), collect_lambda_formals(), compute_top(), compute_top_range_from_actuals(), contains_side_effect_call(), StmtList::convert(), convert_assert_list(), SSAProgramUnit::convert_to_standard(), SimGraphIterator::current(), SimBiGraphIterator::current(), DVfield::dv(), ProgramUnit::exchange(), Symtab::exchange_convert(), NamelistSymbol::exchange_convert(), BlockDataSymbol::exchange_convert(), SymbolicConstantSymbol::exchange_convert(), VariableSymbol::exchange_convert(), SubroutineSymbol::exchange_convert(), FunctionSymbol::exchange_convert(), ProgramSymbol::exchange_convert(), Symbol::exchange_convert(), StmtList::exchange_convert(), BlockExitStmt::exchange_convert(), BlockEntryStmt::exchange_convert(), WhileStmt::exchange_convert(), DirectiveStmt::exchange_convert(), NullifyStmt::exchange_convert(), DeallocateStmt::exchange_convert(), AllocateStmt::exchange_convert(), AssignedGotoStmt::exchange_convert(), ComputedGotoStmt::exchange_convert(), ArithmeticIfStmt::exchange_convert(), GotoStmt::exchange_convert(), LabelStmt::exchange_convert(), ReturnStmt::exchange_convert(), EntryStmt::exchange_convert(), CallStmt::exchange_convert(), FlowExitStmt::exchange_convert(), FlowEntryStmt::exchange_convert(), PauseStmt::exchange_convert(), StopStmt::exchange_convert(), IOStmt::exchange_convert(), AssignStmt::exchange_convert(), ElseStmt::exchange_convert(), EndIfStmt::exchange_convert(), ImpliedGotoStmt::exchange_convert(), ElseIfStmt::exchange_convert(), IfStmt::exchange_convert(), EndDoStmt::exchange_convert(), DoStmt::exchange_convert(), AssignmentStmt::exchange_convert(), Statement::exchange_convert(), StmtPointer::exchange_convert(), NamelistDict::exchange_convert(), FormatDB::exchange_convert(), EquivalenceDict::exchange_convert(), DataList::exchange_convert(), CommonBlockDict::exchange_convert(), UnaryExpr::exchange_expr(), TableExpr::exchange_expr(), SubStringExpr::exchange_expr(), StringExpr::exchange_expr(), StringConstExpr::exchange_expr(), StmtLabelExpr::exchange_expr(), ReturnStarExpr::exchange_expr(), RealConstExpr::exchange_expr(), GSAExpr::exchange_expr(), OmegaExpr::exchange_expr(), NonBinaryExpr::exchange_expr(), KeyExpr::exchange_expr(), LogicalConstExpr::exchange_expr(), LambdaCallExpr::exchange_expr(), LabelExpr::exchange_expr(), IntrinsicCallExpr::exchange_expr(), IntConstExpr::exchange_expr(), InfinityExpr::exchange_expr(), IOStarExpr::exchange_expr(), IDExpr::exchange_expr(), HollerithConstExpr::exchange_expr(), FunctionCallExpr::exchange_expr(), FormatExpr::exchange_expr(), EqualExpr::exchange_expr(), DoExpr::exchange_expr(), ComplexExpr::exchange_expr(), CommaExpr::exchange_expr(), ArrayRefExpr::exchange_expr(), ArgNumberExpr::exchange_expr(), Expression::exchange_expr(), find_defs(), gating(), Directive::generate_comment_directive(), Directive::generate_convex_parallel_directive(), Directive::generate_convex_private_directive(), Directive::generate_convex_serial_directive(), Directive::generate_convex_spp_critical_directive(), Directive::generate_convex_spp_lastvalue_directive(), Directive::generate_convex_spp_nodependence_directive(), Directive::generate_convex_spp_parallel_directive(), Directive::generate_convex_spp_private_directive(), Directive::generate_convex_spp_serial_directive(), Directive::generate_cray_t3d_private_directive(), Directive::generate_cray_t3d_shared_directive(), Directive::generate_csrd_assert_directive(), Directive::generate_csrd_critical_directive(), Directive::generate_csrd_dep_io_directive(), Directive::generate_csrd_dep_overlap_directive(), Directive::generate_csrd_dep_ROvsRW_directive(), Directive::generate_csrd_dep_RWvsWF_directive(), Directive::generate_csrd_dep_WFvsRO_directive(), Directive::generate_csrd_dynlastvalue_directive(), Directive::generate_csrd_epilogue_directive(), Directive::generate_csrd_firstvalue_directive(), Directive::generate_csrd_forward_directive(), Directive::generate_csrd_induction_directive(), Directive::generate_csrd_inline_directive(), Directive::generate_csrd_instrument_directive(), Directive::generate_csrd_lastvalue_directive(), Directive::generate_csrd_looplabel_directive(), Directive::generate_csrd_maymod_directive(), Directive::generate_csrd_nodependence_directive(), Directive::generate_csrd_noinline_directive(), Directive::generate_csrd_nomod_directive(), Directive::generate_csrd_noputget_directive(), Directive::generate_csrd_overlap_directive(), Directive::generate_csrd_overlap_sort_directive(), Directive::generate_csrd_parallel_directive(), Directive::generate_csrd_parcondition_directive(), Directive::generate_csrd_postamble_directive(), Directive::generate_csrd_preamble_directive(), Directive::generate_csrd_private_descr_directive(), Directive::generate_csrd_private_directive(), Directive::generate_csrd_privaterefs_directive(), Directive::generate_csrd_prologue_directive(), Directive::generate_csrd_rangewritten_directive(), Directive::generate_csrd_readonlyrefs_directive(), Directive::generate_csrd_recursive_inline_directive(), Directive::generate_csrd_reduct_descr_directive(), Directive::generate_csrd_reduction_directive(), Directive::generate_csrd_rtshadow_directive(), Directive::generate_csrd_runtimetest_directive(), Directive::generate_csrd_safe_condition_directive(), Directive::generate_csrd_schedule_directive(), Directive::generate_csrd_serial_directive(), Directive::generate_csrd_shared_directive(), Directive::generate_csrd_sharedrefs_directive(), Directive::generate_csrd_sideeffectfree_directive(), Directive::generate_csrd_test_monotone_directive(), Directive::generate_omp_critical_directive(), Directive::generate_omp_do_directive(), Directive::generate_omp_end_parallel_directive(), Directive::generate_recurrence_directive(), get_all_variable_clone(), get_phinode_entries(), EvolutionGraph::get_trace_details(), DDiterator::grab(), infer_preds(), initial_array_ref(), BinRep::ins(), insert_pseudo_assignment_stmts(), IOStmt::IOStmt(), is_affine(), main(), InlineObject::make_conformable(), make_maymod(), SSAProgramUnit::make_phi_function(), make_phi_function(), mark_loops_with_location(), merge_DVs(), move_saved_vars(), Namelist::Namelist(), NonBinaryExpr::NonBinaryExpr(), parse_comment_or_directive(), parse_directives(), parse_non_binary_args(), pDominanceFrontier(), Predicates::Predicates(), process(), read_pu(), remap_args_precalc_expr(), SymbolAccessRef::remap_interface_vars(), SymbolAccess::remap_interface_vars(), AbstractAccess::remap_interface_vars(), remove_redundant_min_max_terms(), replace_lambda_call(), reshape_array(), SSAProgramUnit::SEARCH(), SEARCH(), EvolutionGraph::sequence_type(), setup_to_return_handle(), split(), Summation::sum_mul(), IPCPProcData::transfer_const_set(), and Predicates::Repository::~Repository(). |
|
template<class T> |
| INLINE void List< T >::ins_before |
( |
const T * |
new_element, |
|
|
const T * |
ref |
|
) |
[virtual] |
|
|
template<class T> |
| INLINE void List< T >::ins_after |
( |
const T * |
new_element, |
|
|
const T * |
ref |
|
) |
[virtual] |
|
|
|
Insert new_element after the reference element 'ref' (if ref == 0, insert at BEGINNING of list).
ref MUST be in the list (this is not necessarily checked). This results in an error for staic lists.
Definition at line 529 of file List.h.
References List< T >::_list, and BaseList::ins_after().
Referenced by _add_data_assigns(), _extract_ranges_rel(), _remove_divs_from_rel(), ExprSet::ins(), StmtList::ins_after(), InsertPhiStmt(), DDiterator::modify(), process(), process2(), and StmtList::split_elseif(). |
|
template<class T> |
| INLINE T * List< T >::pull |
( |
int |
loc |
) |
[virtual] |
|
|
template<class T> |
| INLINE T * List< T >::pull |
( |
T & |
el |
) |
[virtual] |
|
|
|
Temporarily remove the element el from the list so that it can be operated on by assign and replaced.
The pulled element must be replaced using an assign call which must be on the same line. See detailed description in the section "Assign Operation".
Definition at line 559 of file List.h.
References List< T >::_list, and BaseList::pull(). |
|
template<class T> |
| INLINE Assign< T > List< T >::assign |
( |
int |
loc |
) |
[virtual] |
|
|
template<class T> |
| INLINE Assign< T > List< T >::assign |
( |
T & |
el |
) |
[virtual] |
|
|
|
Return control of a pulled element to its list in its original position.
The assign call must be on the same line as the pull operation. See detailed description in the above section "Assign Operation".
Definition at line 544 of file List.h.
References List< T >::_list, and BaseList::assign(). |
|
template<class T> |
| INLINE const T * List< T >::next_ref |
( |
const T & |
el |
) |
const |
|
|
template<class T> |
| INLINE T * List< T >::next_ref |
( |
const T & |
el |
) |
|
|
|
template<class T> |
| INLINE const T * List< T >::prev_ref |
( |
const T & |
el |
) |
const |
|
|
template<class T> |
| INLINE T * List< T >::prev_ref |
( |
const T & |
el |
) |
|
|
|
template<class T> |
| INLINE const T * List< T >::first_ref |
( |
|
) |
const |
|
|
|
Definition at line 594 of file List.h.
References List< T >::_list, and Collection::first_ref().
Referenced by EvolutionGraph::_add_approximations(), EvolutionGraph::_add_evolutions(), _additive_inverse(), EvolutionGraph::_build(), _combine_int_relations(), _combine_min_max(), _combine_other_logicals(), _extract_a_range(), _factor_out_var_top(), _fold_divisible_in_mult(), _fold_divisible_in_plus(), _handle_omega_in_mod(), _int_diff(), _ipcp_build_jump_functions(), _ipcp_compute_constants(), _ipcp_propagate_constants(), _p_mm_o_of_add(), _p_mm_o_of_mult(), _p_r_o_of_abs(), _p_r_o_of_ifix(), _p_r_o_of_mod(), _p_r_o_of_mult(), _pull_out_common_min_max1(), _solve_linear_expr(), _sort_expr_list(), _sym_factor(), _update_do_succs(), _update_enddo_succs(), _update_if_succs(), Translator::actual(), add_dummy_global_assignments_at_calls(), Equivalence::clear(), SSAProgramUnit::convert_to_SSA(), IntraPCodeDomain::expand_context_after(), IntraPCodeDomain::expand_context_before(), gen_maymods(), MakeGSA_test(), move_saved_vars(), optimize_ssa_beta(), peel_loop_first(), peel_loop_last(), WorkSpaceStack::pop(), preroll_loop(), propagate_constants(), WorkSpaceStack::push(), Program::read(), remove_dummy_assignments(), remove_redundant_min_max_terms(), SSAControlRangeDict::representative_stmt(), GSAControlRangeDict::representative_stmt(), WorkSpaceStack::top_ref(), and translate_var(). |
|
template<class T> |
| INLINE T * List< T >::first_ref |
( |
|
) |
|
|
|
template<class T> |
| INLINE const T * List< T >::last_ref |
( |
|
) |
const |
|
|
|
Definition at line 608 of file List.h.
References List< T >::_list, and Collection::last_ref().
Referenced by EvolutionGraph::_add_approximations(), EvolutionGraph::_add_evolutions(), EvolutionGraph::_build(), _extract_a_range(), _handle_omega_in_mod(), _int_diff(), _ipcp_build_jump_functions(), _ipcp_compute_constants(), _ipcp_propagate_constants(), _join(), _p_r_o_of_mod(), _range_bound_multiply(), EvolutionGraph::_relax(), _replace_vars_with_omega(), _sort_expr_list(), _update_do_succs(), _update_enddo_succs(), _update_if_succs(), Translator::actual(), compute_top_range_from_actuals(), EvolutionGraph::EvolutionGraph(), IntraPCodeDomain::expand_context_after(), IntraPCodeDomain::expand_context_before(), optimize_ssa_beta(), parse_directives(), EvolutionGraph::perfect_trace_from_mu(), propagate_constants(), Program::read(), SSAProgramUnit::SEARCH(), and untranslate_var(). |
|
template<class T> |
| INLINE T * List< T >::last_ref |
( |
|
) |
|
|
|
template<class T> |
| INLINE Boolean List< T >::valid |
( |
int |
loc |
) |
const |
|
|
|
is the locth element valid?
Definition at line 622 of file List.h.
References List< T >::_list, and Collection::valid().
Referenced by Statement::_add_act_params(), Statement::_add_act_refs(), Statement::_add_in_refs(), Statement::_add_out_refs(), MultipleArgWildcard::_backup_aux(), SymbolAccess::_copy_access_lists(), _determine_relation(), UnaryExpr::_expr_guarded(), UnaryExpr::_expr_valid(), BinRep::_ief_format(), BinRep::_ief_length(), _is_comparable(), BinaryExpr::_left_guarded(), BinaryExpr::_left_valid(), ProgramUnit::_propagate_types(), BinaryExpr::_right_guarded(), BinaryExpr::_right_valid(), BinRep::_setl_format(), BinRep::_setl_length(), _subst_var_in_assert(), WildcardContains::_try_for_match(), ar_interleave(), ar_intersect(), base_offset(), IOStmt::build_refs(), cdg2cfg(), cdg_dag2tree(), AbstractAccess::check_access_patterns(), ProgramUnit::clean(), clean_program(), clean_statement(), clean_variables(), clone_loop(), clone_loop_body(), collect_all_symbols(), collect_lambda_formals(), CommonBlock::CommonBlock(), AbstractAccess::compute_new_dimension(), compute_top_range_from_actuals(), contains_side_effect_call(), convert_assert_list(), AbstractAccess::convert_size(), SSAProgramUnit::convert_to_standard(), Expression::create_signature(), ProgramUnit::distribution_of(), evaluate_dag2tree(), CommaExpr::exchange_expr(), StopStmt::expr_guarded(), ReturnStmt::expr_guarded(), PauseStmt::expr_guarded(), StopStmt::expr_valid(), ReturnStmt::expr_valid(), PauseStmt::expr_valid(), Equivalence::find_ref(), EntryStmt::fortran_write(), gating(), Directive::generate_comment_directive(), Directive::generate_convex_directive(), Directive::generate_convex_parallel_directive(), Directive::generate_convex_private_directive(), Directive::generate_convex_serial_directive(), Directive::generate_convex_spp_directive(), Directive::generate_convex_spp_lastvalue_directive(), Directive::generate_convex_spp_nodependence_directive(), Directive::generate_convex_spp_parallel_directive(), Directive::generate_convex_spp_private_directive(), Directive::generate_convex_spp_serial_directive(), Directive::generate_cray_directive(), Directive::generate_cray_t3d_directive(), Directive::generate_cray_t3d_private_directive(), Directive::generate_cray_t3d_shared_directive(), Directive::generate_csrd_assert_directive(), Directive::generate_csrd_critical_directive(), Directive::generate_csrd_dep_overlap_directive(), Directive::generate_csrd_dep_ROvsRW_directive(), Directive::generate_csrd_dep_RWvsWF_directive(), Directive::generate_csrd_dep_WFvsRO_directive(), Directive::generate_csrd_directive(), Directive::generate_csrd_dynlastvalue_directive(), Directive::generate_csrd_epilogue_directive(), Directive::generate_csrd_firstvalue_directive(), Directive::generate_csrd_forward_directive(), Directive::generate_csrd_induction_directive(), Directive::generate_csrd_lastvalue_directive(), Directive::generate_csrd_maymod_directive(), Directive::generate_csrd_nodependence_directive(), Directive::generate_csrd_nomod_directive(), Directive::generate_csrd_overlap_directive(), Directive::generate_csrd_overlap_sort_directive(), Directive::generate_csrd_parallel_directive(), Directive::generate_csrd_parcondition_directive(), Directive::generate_csrd_private_descr_directive(), Directive::generate_csrd_private_directive(), Directive::generate_csrd_privaterefs_directive(), Directive::generate_csrd_prologue_directive(), Directive::generate_csrd_rangewritten_directive(), Directive::generate_csrd_readonlyrefs_directive(), Directive::generate_csrd_reduct_descr_directive(), Directive::generate_csrd_reduction_directive(), Directive::generate_csrd_rtshadow_directive(), Directive::generate_csrd_safe_condition_directive(), Directive::generate_csrd_serial_directive(), Directive::generate_csrd_shared_directive(), Directive::generate_csrd_sharedrefs_directive(), Directive::generate_csrd_sideeffectfree_directive(), Directive::generate_csrd_test_monotone_directive(), Directive::generate_omp_critical_directive(), Directive::generate_omp_directive(), Directive::generate_omp_do_directive(), Directive::generate_omp_end_parallel_directive(), Directive::generate_omp_parallel_directive(), Directive::generate_recurrence_directive(), Directive::generate_sgi_directive(), Directive::generate_sgi_parallel_directive(), InsertPhiStmt(), interface_vars(), IOStmt::io_list_guarded(), IOStmt::io_list_valid(), is_expr_variable(), is_singleton(), is_var_in_expr(), AssignmentStmt::iterate_in_exprs_valid(), AssignmentStmt::iterate_out_exprs_valid(), AbstractAccess::lastoffset(), CDRepository::lookup(), SharedBounds::lower_exists(), ArrayBounds::lower_exists(), SharedBounds::lower_guarded(), ArrayBounds::lower_guarded(), main(), mark_loops_with_location(), AbstractAccess::match_dims(), AbstractAccess::match_dims_stride(), may_be_reduction(), Namelist::Namelist(), optimize_ssa_beta(), EntryStmt::parameters_guarded(), EntryStmt::parameters_valid(), DeallocateStmt::parameters_valid(), AllocateStmt::parameters_valid(), peel_loop_last(), pDominatorWorkSpace::print(), GSAWorkSpace::print(), DominatorWorkSpace::print(), Directive::print(), DVfield::print(), NullifyStmt::print_debug(), DeallocateStmt::print_debug(), AllocateStmt::print_debug(), ReturnStmt::print_debug(), EntryStmt::print_debug(), CallStmt::print_debug(), PauseStmt::print_debug(), StopStmt::print_debug(), IOStmt::print_debug(), DoStmt::print_debug(), print_stmt_list(), print_wildcard_matches(), read_pu(), ExpressionAssertion::relink_aptrs(), ARDAssertion::relink_aptrs(), Namelist::relink_dptrs(), SymbolAccess::relink_eptrs(), AbstractAccess::relink_eptrs(), Statement::relink_lptrs(), remap_args_precalc(), remap_args_precalc_expr(), AbstractAccess::remap_interface_vars(), replace_lambda_call(), replace_parameters(), EntryStmt::routine_valid(), DDgraphTester::show_program(), simplify_subs_exprs(), VariableSymbol::size(), Expression::standardize(), substitute_var(), top_sort_expressions(), AbstractAccess::translate_GSA_symbols(), unroll_loop(), Expression::update_signature(), SharedBounds::upper_exists(), ArrayBounds::upper_exists(), SharedBounds::upper_guarded(), ArrayBounds::upper_guarded(), and Directive::write(). |
|
template<class T> |
| INLINE void List< T >::clear |
( |
|
) |
[virtual] |
|
|
|
Delete the entire list and, for static lists, set all entries to invalid.
Reimplemented in StmtList.
Definition at line 629 of file List.h.
References List< T >::_list, and Collection::clear().
Referenced by DDgraph::add(), cleanup_gate_inferences(), StmtList::clear(), ExprSet::clear(), StmtList::create_assertions(), VDL::end_object(), main(), IPCPProcData::make_consts_sets_old(), Directive::operator=(), ARDAssertion::operator=(), ExpressionAssertion::operator=(), StringAssertion::operator=(), parse_directives(), StmtList::remove_directives(), SSAProgramUnit::SEARCH(), VDL::start_object(), ArrayBounds::~ArrayBounds(), s_control_type::~s_control_type(), and SharedBounds::~SharedBounds(). |
|
template<class T> |
| INLINE List< T > & List< T >::operator= |
( |
const List< T > & |
l |
) |
[virtual] |
|
|
template<class T> |
| INLINE int List< T >::structures_OK |
( |
|
) |
const [virtual] |
|
|
template<class T> |
| INLINE Listable * List< T >::listable_clone |
( |
|
) |
const [virtual] |
|
|
template<class T> |
| INLINE void List< T >::print |
( |
ostream & |
o |
) |
const [virtual] |
|
Friends And Related Function Documentation
|
template<class T> |
friend class Iterator<T> [friend] |
|
|
template<class T> |
friend class Mutator<T> [friend] |
|
|
template<class T> |
friend class TopSorter [friend] |
|
|
|
gcc-2.96 need the stupid "<>" pair friend ostream & operator << (ostream & o, const List<T> &l);
Definition at line 165 of file List.h. |
|
template<class T> |
| ostream& operator<< |
( |
ostream & |
o, |
|
|
const List< T > & |
l |
|
) |
[friend] |
|
|
|
< return o << l._list; ->
Definition at line 718 of file List.h. |
Member Data Documentation
|
|
Definition at line 170 of file List.h.
Referenced by List< T >::_base_collection(), List< T >::assign(), List< T >::clear(), List< T >::del(), List< T >::entries(), List< T >::first_ref(), List< T >::fix_size(), List< T >::grab(), List< T >::index(), List< T >::ins(), List< T >::ins_after(), List< T >::ins_before(), List< T >::ins_first(), List< T >::ins_last(), List< T >::last_ref(), List< T >::List(), List< T >::make_static_list(), List< T >::member(), List< T >::modify(), List< T >::modify_and_grab(), List< T >::next_ref(), List< T >::operator=(), List< T >::operator[](), List< T >::prev_ref(), List< T >::print(), List< T >::pull(), List< T >::static_size(), List< T >::structures_OK(), List< T >::unfix_size(), and List< T >::valid(). |
The documentation for this class was generated from the following file:
|