ControlRangeDict.cc File Reference
Go to the source code of this file.
|
Functions |
| static void | _init_workspaces (ProgramUnit &pgm) |
| | init_workspaces Initialize the workspaces for each statement in the program.
|
| static PropCtrlRangeWS & | _get_workspace (const Statement &stmt) |
| | get_workspace Get the workspace for the given statement.
|
| static void | _dump_workspaces (ostream &o, const ProgramUnit &pgm) |
| | dump_workspaces Dump out the data inside all of the workspaces of the program
|
| static void | _make_nonlocals_modified_at_calls (ProgramUnit &pgm) |
| | _make_nonlocals_modified_at_calls Make all non-local variables be marked as potentially modified for all call statements and all statements containing function calls.
|
| static void | _calc_toporder1 (Statement &stmt, int &toporder) |
| | _calc_toporder Calculate toporder for the flow graph.
|
| static void | _calc_toporder (ProgramUnit &pgm, Array< Statement * > &toporder_to_stmt) |
| static bool | _is_else_branch (const Statement &pred, const Statement &succ) |
| | is_else_branch Return true if the control flow edge between statements pred and succ corresponds to the else branch of an IF statement.
|
| void | _intersect_range_maps (Map< Symbol, RefSet< Expression > > &range_map, const Map< Symbol, RefSet< Expression > > &inter_map) |
| | intersect_range_maps Intersect the ranges of the two variable to range set maps.
|
| static bool | _range_maps_equal (const Map< Symbol, RefSet< Expression > > &range_map1, const Map< Symbol, RefSet< Expression > > &range_map2) |
| | range_maps_equal Return true if the two range maps are equal
|
| static void | _put_succ_on_work_list (IntSet &work_list, Statement &stmt) |
| | put_succ_on_work_list Put all of my successors on the work list.
|
| static void | _iterate_to_fixed_point (ProgramUnit &pgm, const Array< Statement * > &toporder_to_stmt) |
| | iterate_to_fixed_point Propagate the constants contained in the statement's const_maps until a fixed point is reached.
|
Variables |
| static unsigned int | _pass_tag |
| static int | _debug_level = 0 |
| | ... Pass tag associated with this pass
|
Detailed Description
Definition in file ControlRangeDict.cc.
Function Documentation
| static void _init_workspaces |
( |
ProgramUnit & |
pgm |
) |
[static] |
|
| static void _dump_workspaces |
( |
ostream & |
o, |
|
|
const ProgramUnit & |
pgm |
|
) |
[static] |
|
| static void _make_nonlocals_modified_at_calls |
( |
ProgramUnit & |
pgm |
) |
[static] |
|
|
|
_make_nonlocals_modified_at_calls Make all non-local variables be marked as potentially modified for all call statements and all statements containing function calls.
... Calculate the set of non-local variables.
... Also place any aliased variables in the set.
... Add the non-local variables to the mod_set of all statements that ... are either call statements or contain function calls.
Definition at line 89 of file ControlRangeDict.cc.
References _get_workspace(), Statement::act_refs(), ASSIGNMENT_STMT, Expression::base_variable_ref(), CALL_STMT, Symbol::common_ref(), contains_func_call(), Iterator< T >::current(), DictionaryIter< T >::current(), Type::data_type(), RefSet< T >::del(), equiv_aliases(), Symbol::formal(), RefSet< T >::ins(), INTEGER_TYPE, IS_FORMAL, Statement::lhs(), PropConstWS::mod_set, Statement::stmt_class(), stmt_maymods(), Symbol::sym_class(), symbol(), Symbol::type(), Iterator< T >::valid(), KeyIterator< String, T >::valid(), and VARIABLE_CLASS. |
| static void _calc_toporder1 |
( |
Statement & |
stmt, |
|
|
int & |
toporder |
|
) |
[static] |
|
|
|
intersect_range_maps Intersect the ranges of the two variable to range set maps.
Definition at line 248 of file ControlRangeDict.cc.
References Iterator< T >::current(), KeyIterator< S, T >::current_data(), KeyIterator< S, T >::current_key(), RefSet< T >::del(), Mutator< T >::del(), RefSet< T >::ins(), RefSet< T >::member(), Iterator< T >::valid(), and KeyIterator< S, T >::valid().
Referenced by _iterate_to_fixed_point(). |
| static void _put_succ_on_work_list |
( |
IntSet & |
work_list, |
|
|
Statement & |
stmt |
|
) |
[static] |
|
|
|
iterate_to_fixed_point Propagate the constants contained in the statement's const_maps until a fixed point is reached.
... List of statements that need to be updated.
... Mark all variables for entry statements as non-const and put all ... entries on the work list.
... Iterate until there are no more elements on the work list
... Visit each statement in the work list, in topological order
... Generate the new live variable set for the end of the statement.
... New entering live variable set differs from the old ... one. So update the entering and exiting live variable ... sets for the statement.
... Exiting live var set has changed, so place ... the statement's predecessors on the work list so ... that they can update their live variable sets ... with my live var set.
Definition at line 323 of file ControlRangeDict.cc.
References _debug_level, _get_workspace(), _intersect_range_maps(), _is_else_branch(), _put_succ_on_work_list(), _range_maps_equal(), Iterator< T >::current(), PropCtrlRangeWS::in_ranges, PropCtrlRangeWS::incr_num_visits(), PropCtrlRangeWS::num_visits(), PropCtrlRangeWS::out_else_ranges, PropCtrlRangeWS::out_ranges, Statement::pred(), PropCtrlRangeWS::print(), Statement::print_debug(), PropConstWS::toporder(), PropCtrlRangeWS::update_out_ranges(), and Iterator< T >::valid(). |
Variable Documentation
|