InterProcConstProp.cc File Reference
Go to the source code of this file.
Detailed Description
Definition in file InterProcConstProp.cc.
Function Documentation
|
|
normalize_func_calls Normalize the structure of function calls so that they only occur in assignment statements at the top level.
WARNING: This function assumes that all arguments in an expression and all expressions in a statement are executed left to right.
... Don't normalize function calls inside implied DO statements.
Definition at line 47 of file InterProcConstProp.cc.
References Expression::arg_list(), AS_SIDE_EFFECT_FREE, Statement::assertions(), assertions_of_type(), Mutator< T >::assign(), Assertion::clone(), Iterator< T >::current(), DO_OP, FUNCTION_CALL_OP, id(), List< T >::ins_before(), List< T >::ins_last(), NOT_FORMAL, NOT_SAVED, Mutator< T >::pull(), and Iterator< T >::valid().
Referenced by _normalize_func_calls(). |
| static void _normalize_func_calls |
( |
ProgramUnit & |
pgm |
) |
[static] |
|
|
|
... Now, check the arguments passed to the function call. ... If any are integer constants, assign the constants to ... variables and use the variables instead. This was done ... to prevent the problem where a constant is passed and ... IPVP places an assignment statement inside the routine, ... assigning the constant to the formal parameter (which ... breaks in some backend compilers).
... e.g. A= X(1) .... FUNCTION X(N) ; N = 1 ; ..... - jph
Definition at line 87 of file InterProcConstProp.cc.
References _norm_func_calls1(), Expression::arg_list(), Mutator< T >::assign(), ASSIGNMENT_STMT, Statement::build_refs(), CALL_STMT, Expression::clone(), contains_func_call(), Iterator< T >::current(), DO_STMT, RefSet< T >::entries(), FUNCTION_CALL_OP, id(), INTEGER_CONSTANT_OP, INTEGER_TYPE, Statement::iterate_expressions(), Expression::iterator(), NOT_FORMAL, NOT_SAVED, Expression::op(), Expression::parameters_guarded(), Statement::parameters_guarded(), Statement::pred(), Statement::prev_ref(), Mutator< T >::pull(), Statement::rhs(), Statement::stmt_class(), Iterator< T >::valid(), and WHILE_STMT. |
| static void _add_call_returns |
( |
ProgramUnit & |
pgm |
) |
[static] |
|
|