Polaris: expr_funcs.h File Reference

expr_funcs.h File Reference

Go to the source code of this file.

Functions

Boolean is_integer_constant (const Expression &e)
 Description: Returns 1 iff 'e' is an INTEGER_CONSTANT_OP.
Boolean is_integer_constant (const Expression &e, int val)
 Description: Returns 1 iff 'e' is an INTEGER_CONSTANT_OP with the given value.
Boolean is_integer_zero (const Expression &e)
 Description: Returns 1 iff 'e' is an INTEGER_CONSTANT_OP and == 0.
Boolean is_integer_one (const Expression &e)
 Description: Returns 1 iff 'e' is an INTEGER_CONSTANT_OP and == 1.
Boolean is_logical_false (const Expression &e)
 Description: Returns 1 iff 'e' is a LOGICAL_CONSTANT_OP and == .FALSE.
bool is_phi_function (const Expression &e)
 Description: Returns true iff 'e' is a GSA phi function (GAMMA or MU).
bool is_pseudo_function (const Expression &e)
 Description: Returns true iff 'op' is a GSA pseudo function (ALPHA, GAMMA, MU or BETA).
Boolean is_commutative (OP_TYPE op)
 Description: Returns 1 iff 'op' is a commutative operator.
Boolean is_relational_op (OP_TYPE op)
 Description: Returns 1 iff 'op' is a relational operator.
Boolean is_conjunctive_op (OP_TYPE op)
 Description: Returns 1 iff 'op' is a conjunctive operator.
void propagate_expr_types (Expression &expr)
 Description: Propagate rank information through an expression.
Type expr_type (const OP_TYPE op, const Type &left_type, const Type &right_type)
 Description: Calculates the type of an expression involving the given operator (op) and two operands.
Type expr_type (const OP_TYPE op, const List< Expression > &args)
 Description: Calculates the type of an expression involving the given operator (op) and a list containing any positive number of arguments (it is a run-time error to call this function with an empty 'args' list).
Type string_type (const char *data_string, Boolean ignore_errors=False)
 Description: Determines the type of a constant given as a character string.
List< Expression > * expr_list (Expression *expr1=0, Expression *expr2=0, Expression *expr3=0, Expression *expr4=0, Expression *expr5=0, Expression *expr6=0, Expression *expr7=0, Expression *expr8=0, Expression *expr9=0, Expression *expr10=0)
 Description: Returns a new list of Expressions with the arguments filled in.
Expressionconstant (const char *data_string)
 Description: Returns a pointer to an expression for a Fortran constant specified as a char string.
Expressionconstant (int value)
 Description: Returns a pointer to an expression for a Fortran INTEGER_CONST_EXPR.
Expressionlabel (const char *data_string)
 Description: Returns a pointer to an expression for a Fortran label (like that used in an ERR=100).
Expressionarray_reference (Expression *array, Expression *subscripts)
 Description: Returns a pointer to an expression for a Fortran Complex constant.
Expressionsubstring (Expression *string, Expression *bounds)
 Description: Returns a pointer to an expression for a Fortran substring expression.
Expressionfunction_call (Expression *function, Expression *parameters)
 Description: Returns a pointer to an expression for a Fortran function call 'function' may be an id-expression for an external or intrinsic Fortran function symbol.
Expressionintrinsic_call (Expression *intrinsic, Expression *parameters)
 Description: Returns a pointer to an expression for a Fortran intrinsic call.
Expressionlambda_call (Expression *expr, Expression *parameters)
 Description: Returns a pointer to an expression for a lambda call.
Expressionalternate_return (Expression *arg)
 Description: Returns a pointer to an expression for an alternate return (e.g.
Expressionio_star ()
 Description: Returns a pointer to an expression for the * used in an I/O statement (PRINT *, ...).
Expressionformat (const char *data_string)
 Description: Returns a pointer to an expression for a Fortran format statement.
Expressionnew_variable (const char *varname, const Type &t, ProgramUnit &pgm)
 Description: Returns a pointer to an expression for a new Fortran identifier.
Expressionnew_function (const char *varname, const Type &t, ProgramUnit &pgm)
 Description: Returns a pointer to an expression for a new Fortran function identifier.
Expressionnew_subroutine (const char *varname, ProgramUnit &pgm)
 Description: Returns a pointer to an expression for a new Fortran subroutine identifier.
Expressionnew_intrinsic (const char *varname, const Type &t, ProgramUnit &pgm)
 Description: Returns a pointer to an expression for a new Fortran intrinsic function identifier.
Expressionnew_array_variable (const char *varname, const Type &t, ProgramUnit &pgm, Expression *bounds1, Expression *bounds2=0, Expression *bounds3=0, Expression *bounds4=0, Expression *bounds5=0)
 Description: Returns a pointer to an expression for a new Fortran array identifier.
Expressionid (const char *data_string, const ProgramUnit &pgm)
 Description: Returns a pointer to an expression for an existing Fortran identifier.
Expressionid (const Symbol &symbol)
 Description: Returns a pointer to an expression for an existing Fortran symbol.
Expressionunary_plus (Expression *expr)
 Description: Returns a pointer to an expression for a unary plus expression.
Expressionunary_minus (Expression *expr)
 Description: Returns a pointer to an expression for a unary minus expression.
Expressionnot (Expression *expr)
 Description: Returns a pointer to an expression for a unary .NOT.
Expressioneq (Expression *expr1, Expression *expr2)
 Description: Returns a pointer to an expression for a Fortran .EQ.
Expressionne (Expression *expr1, Expression *expr2)
 Description: Returns a pointer to an expression for a Fortran .NE.
Expressionlt (Expression *expr1, Expression *expr2)
 Description: Returns a pointer to an expression for a Fortran .LT.
Expressionle (Expression *expr1, Expression *expr2)
 Description: Returns a pointer to an expression for a Fortran .LE.
Expressiongt (Expression *expr1, Expression *expr2)
 Description: Returns a pointer to an expression for a Fortran .GT.
Expressionge (Expression *expr1, Expression *expr2)
 Description: Returns a pointer to an expression for a Fortran .GE.
Expressionsub (Expression *expr1, Expression *expr2)
 Description: Returns a pointer to an expression for expr1 - expr2.
Expressiondiv (Expression *expr1, Expression *expr2)
 Description: Returns a pointer to an expression for expr1 / expr2.
Expressionexponent (Expression *expr1, Expression *expr2)
 Description: Returns a pointer to an expression for expr1 ** expr2.
Expressionconcat (Expression *expr1, Expression *expr2)
 Description: Returns a pointer to an expression for expr1 // expr2.
Expressionadd (Expression *expr1, Expression *expr2)
 Description: Returns a pointer to an expression for expr1 + expr2.
Expressionadd (List< Expression > *args)
 Description: Returns a pointer to an expression for (*args)[0] + (*args)[1] + (*args)[2] + ...
Expressionmul (Expression *expr1, Expression *expr2)
 Description: Returns a pointer to an expression for expr1 * expr2.
Expressionmul (List< Expression > *args)
 Description: Returns a pointer to an expression for (*args)[0] * (*args)[1] * (*args)[2] * ...
Expressionor (Expression *expr1, Expression *expr2)
 Description: Returns a pointer to an expression for expr1 .OR.
Expressionor (List< Expression > *args)
 Description: Returns a pointer to an expression for (*args)[0] .OR.
Expressionand (Expression *expr1, Expression *expr2)
 Description: Returns a pointer to an expression for expr1 .AND.
Expressionand (List< Expression > *args)
 Description: Returns a pointer to an expression for (*args)[0] .AND.
Expressioneqv (Expression *expr1, Expression *expr2)
 Description: Returns a pointer to an expression for expr1 .EQV.
Expressioneqv (List< Expression > *args)
 Description: Returns a pointer to an expression for (*args)[0] .EQV.
Expressionneqv (Expression *expr1, Expression *expr2)
 Description: Returns a pointer to an expression for expr1 .NEQV.
Expressionneqv (List< Expression > *args)
 Description: Returns a pointer to an expression for (*args)[0] .NEQV.
Expressiondo_expression (Expression *expr1, Expression *expr2)
 Description: Returns a pointer to an expression for expr1 * expr2.
Expressionequal (Expression *index, Expression *iter_space)
 Description: Returns a pointer to an expression for an EqualExpr (e.g.
Expressioncomma ()
 Description: Returns a pointer to an expression for a CommaExpr with no arguments.
Expressioncomma (Expression *expr1)
 Description: Returns a pointer to an expression for a CommaExpr.
Expressioncomma (Expression *expr1, Expression *expr2, Expression *expr3=0, Expression *expr4=0, Expression *expr5=0)
 Description: Returns a pointer to an expression for a CommaExpr.
Expressioncomma (List< Expression > *args)
 Description: Returns a pointer to an expression for (*args)[0] , (*args)[1] , (*args)[2] , ...
Expressioncolon (Expression *expr1, Expression *expr2, Expression *expr3=0)
 Description: Returns a pointer to an expression for a ColonExpr ( 1:10 ).
Expressionparen (Expression *expr)
 Description: Returns a pointer to a parenthesized expression.
Expressionomega ()
 Description: Returns a pointer to a null expression.
Expressionnull_to_omega (Expression *expr)
 Description: Return a pointer to a null expression if the given expression is 0 (NULL).
Expressioninfinity (int sign=1)
 Description: Returns a pointer to an infinity expression with a sign equal to the sign of the given integer.
Expressionalpha (Expression *parameters)
 Description: Create a alpha GSA function with the given parameters.
Expressiongamma (Expression *gate, Expression *parameters)
 Description: Create a gamma GSA function with the given gate function and parameters.
Expressionmu (Expression *parameters)
 Description: Create a mu GSA function with the given parameters.
Expressionmu (Expression *parameters, Expression *gate)
Expressioncoerce (Expression *expr, EXPR_TYPE type, ProgramUnit &pgm)
 Description: Returns a new expression which coerces 'expr' into the same type as that of 'type', IF NECESSARY (if 'expr' is already of the same type as 'type', it returns 'expr' unchanged).
Expressionkeyword (const char *data_string)
 Description: Create a keyword node for the keypair function.
Expressionkeypair (Expression *expr1, Expression *expr2)
 Description: Returns a pointer to an expression for a Fortran MASK=X expression.
Expressionsum (Expression *ex, Expression &id, const Expression &lower, const Expression &upper)
 Description: Returns a the summation of id from lower to upper over the expression ex.
Expressionsubstitute_var (Expression *e, const Symbol &var, const Expression &value)
 Description: Substitute all occurences of the given variable in the given expression with the given value, then return the result.
void substitute_var (Expression &e, const Symbol &var, const Symbol &new_var)
 Description: Substitute (in place) all occurances of the given variable in the given expression with the given new variable.


Function Documentation

Boolean is_integer_constant const Expression e  ) 
 

Description: Returns 1 iff 'e' is an INTEGER_CONSTANT_OP.

Definition at line 353 of file Expression.cc.

Referenced by _determine_relation(), _grab_divisible(), _int_diff(), _recognize(), _skip_int_const_exprs(), eliminate_loop(), expr_divides(), main(), normalize_loop(), peel_loop_first(), preroll_loop(), PropCtrlRangeWS::PropCtrlRangeWS(), stripmine_horiz_loop(), stripmine_vert_loop(), subsume_relation(), and unroll_loop().

Boolean is_integer_constant const Expression e,
int  val
 

Description: Returns 1 iff 'e' is an INTEGER_CONSTANT_OP with the given value.

Definition at line 359 of file Expression.cc.

References e, INTEGER_CONSTANT_OP, Expression::op(), and Expression::value().

Boolean is_integer_zero const Expression e  ) 
 

Description: Returns 1 iff 'e' is an INTEGER_CONSTANT_OP and == 0.

Definition at line 341 of file Expression.cc.

References e, INTEGER_CONSTANT_OP, Expression::op(), and Expression::value().

Referenced by _combine_int_relations(), _extract_ranges_rel(), _handle_omega_in_mod(), _remove_truncates1(), ar_offsets_match(), SimBiGraph::calc_similarity(), divides_diff(), intersect_ARDs(), is_affine(), main(), InlineObject::remap_arg_names(), and subsume_relation().

Boolean is_integer_one const Expression e  ) 
 

Description: Returns 1 iff 'e' is an INTEGER_CONSTANT_OP and == 1.

Definition at line 347 of file Expression.cc.

References e, INTEGER_CONSTANT_OP, Expression::op(), and Expression::value().

Referenced by _divide_by_factor1(), _p_r_o_of_add(), ar_subregion(), and expr_divides().

Boolean is_logical_false const Expression e  ) 
 

Description: Returns 1 iff 'e' is a LOGICAL_CONSTANT_OP and == .FALSE.

Definition at line 335 of file Expression.cc.

References e, LOGICAL_CONSTANT_OP, Expression::op(), and Expression::str_data().

Referenced by EvolutionGraph::_add_evolutions(), and Predicates::contradicts().

bool is_phi_function const Expression e  ) 
 

Description: Returns true iff 'e' is a GSA phi function (GAMMA or MU).

Definition at line 365 of file Expression.cc.

References e, ETA_OP, GAMMA_OP, MU_OP, Expression::op(), and THETA_OP.

bool is_pseudo_function const Expression e  ) 
 

Description: Returns true iff 'op' is a GSA pseudo function (ALPHA, GAMMA, MU or BETA).

Definition at line 380 of file Expression.cc.

References ALPHA_OP, e, ETA_OP, Expression::function(), FUNCTION_CALL_OP, GAMMA_OP, MU_OP, Symbol::name_ref(), Expression::op(), Expression::symbol(), and THETA_OP.

Referenced by TranslateObject::_translate_symbol_refs_expr(), occurs(), optimize_ssa_beta(), substitute_argument(), and TranslateObject::translate_GSA_symbol_refs().

Boolean is_commutative OP_TYPE  op  ) 
 

Description: Returns 1 iff 'op' is a commutative operator.

Definition at line 264 of file Expression.cc.

References ADD_OP, AND_OP, EQV_OP, False, MULT_OP, NEQV_OP, OR_OP, and True.

Referenced by _standardize_top(), same_commutative(), and Expression::standardize().

Boolean is_relational_op OP_TYPE  op  ) 
 

Description: Returns 1 iff 'op' is a relational operator.

Definition at line 296 of file Expression.cc.

References EQ_OP, False, GE_OP, GT_OP, LE_OP, LT_OP, NE_OP, and True.

Referenced by _elim_known_facts(), and subsume_relation().

Boolean is_conjunctive_op OP_TYPE  op  ) 
 

Description: Returns 1 iff 'op' is a conjunctive operator.

Definition at line 281 of file Expression.cc.

References AND_OP, EQV_OP, False, NEQV_OP, OR_OP, and True.

void propagate_expr_types Expression expr  ) 
 

Description: Propagate rank information through an expression.

Update the Type with dimension data. WARNING: This routine makes heavy use of casting away consts in order to modify the const type expression.

... An IDExpr has the same dimensionality as it`s symbol

... mark constants as scalar (NOTE: this does not handle ... array constants)

... Determine types of the sub-expressions

Definition at line 1005 of file Expression.cc.

References determine_root_expr_type(), HOLLERITH_CONSTANT_OP, ID_OP, INTEGER_CONSTANT_OP, LOGICAL_CONSTANT_OP, propagate_expr_types(), REAL_CONSTANT_OP, Type::redimension(), and STRING_CONSTANT_OP.

Referenced by ProgramUnit::_propagate_types(), propagate_expr_types(), and simplify().

Type expr_type const OP_TYPE  op,
const Type left_type,
const Type right_type
 

Description: Calculates the type of an expression involving the given operator (op) and two operands.

... NonBinaryExpr operator

... NonBinaryExpr operator

... NonBinaryExpr operator

... NonBinaryExpr operator

... BinaryExpr operator

... NonBinaryExpr operator

... NonBinaryExpr operator

... This is only valid for F77, it is possible in F90.

... Treat these as normal operations

... but ignore OMEGA_OP arguments

Definition at line 1257 of file Expression.cc.

Referenced by _join(), add(), alpha(), and(), compute_intrinsic_type(), concat(), create_nonbinary(), determine_root_expr_type(), div(), eq(), eqv(), eta(), exponent(), expr_type(), gamma(), ge(), gt(), le(), lt(), mu(), mul(), ne(), neqv(), normalize_cfg(), or(), sub(), substring(), and theta().

Type expr_type const OP_TYPE  op,
const List< Expression > &  args
 

Description: Calculates the type of an expression involving the given operator (op) and a list containing any positive number of arguments (it is a run-time error to call this function with an empty 'args' list).

Definition at line 1451 of file Expression.cc.

References Iterator< T >::current(), expr_type(), Expression::type(), and Iterator< T >::valid().

Type string_type const char *  data_string,
Boolean  ignore_errors = False
 

Description: Determines the type of a constant given as a character string.

If 'ignore_errors' is True, then this function will return a make_type(UNDEFINED_TYPE) object rather than aborting through p_abort(). Unless you are willing to check this error condition yourself, leave out the second argument.

Referenced by constant().

List<Expression>* expr_list Expression expr1 = 0,
Expression expr2 = 0,
Expression expr3 = 0,
Expression expr4 = 0,
Expression expr5 = 0,
Expression expr6 = 0,
Expression expr7 = 0,
Expression expr8 = 0,
Expression expr9 = 0,
Expression expr10 = 0
 

Description: Returns a new list of Expressions with the arguments filled in.

This can be especially useful for the non-binary-expression creations functions, such as 'add(List<Expression> *)', etc. Any NULL Expression* arguments are skipped.

Referenced by _sort_expr_list().

Expression* constant const char *  data_string  ) 
 

Description: Returns a pointer to an expression for a Fortran constant specified as a char string.

... Convert to single-quoted character constant

Definition at line 1507 of file Expression.cc.

Referenced by EvolutionGraph::_add_approximations(), _add_control_assigns(), EvolutionGraph::_add_evolutions(), _add_subscript_constraints_to_ranges(), _annotate_expr(), EvolutionGraph::_bellman_ford(), EvolutionGraph::_compute_cyclic_evolutions(), _divide_by_factor1(), _elim_known_facts(), _exit_range(), _extract_a_range(), _factor_out_var_top(), _fold_divisible_in_div(), _forward_diff(), _handle_omega_in_mod(), _invert_expr(), _is_base_case_evenly_divisible(), _is_evenly_divisible_for_var(), EvolutionGraph::_local_range(), _loop_index_last_val(), _make_range(), _min_abs_expr(), _p_r_o_of_abs(), _p_r_o_of_add(), _p_r_o_of_divide(), _p_r_o_of_exp(), _p_r_o_of_mod(), EvolutionGraph::_possible_ranges(), _pull_in_exp_expr(), _pull_ranges_out(), _remove_div(), _s_constant(), _solve_linear_expr(), _subst_ints_in_expr(), TranslateObject::_translate_symbol_refs_expr(), abs_to_max(), DDgraph::add(), add_dummy_eta_assignments_after_loops(), ar_aggregate(), ar_interleave(), ar_subregion(), array_element_count(), at_least_one_iteration(), base_offset(), build_expr(), build_mu(), check_div(), check_parallel_and_instrument(), ProgramUnit::clean(), coalese_loop(), RangeComparator::compare(), compute_abstract_access(), AbstractAccess::compute_new_dimension(), compute_top(), compute_top_range_from_actuals(), convert_arithmetic_if(), AbstractAccess::convert_size(), divides_diff(), do_fold(), do_funny(), do_funny2(), do_funny3(), eg_distance(), eg_distance_1_dim(), enforce_standard_within_bounds(), evolution(), extract_stride(), find_preds(), EvolutionGraph::get_trace_details(), included(), initial_array_ref(), intersect_ARDs(), intersect_ranges(), is_affine(), iteration_count(), last_element_offset(), last_value(), AbstractAccess::lastoffset(), linearize_zero_registered(), main(), make_bytesize_expr(), InlineObject::make_conformable(), merge_unite(), EvolutionGraph::min_distance(), move_saved_vars(), node_value(), normalize_cfg(), normalize_loop(), Expression::operator==(), parse_expr(), parse_real(), peel_loop_first(), peel_loop_last(), EvolutionGraph::perfect_trace_from_mu(), Predicates::Predicates(), preroll_loop(), process(), InlineObject::remap_arg_names(), remap_args_precalc_expr(), remove_assigned_goto_stmts(), reshape_array(), same_gate(), EvolutionGraph::sequence_type(), strip_horiz_loop_pu(), strip_vert_loop_pu(), stripmine_horiz_loop(), stripmine_vert_loop(), Summation::sum_aux(), Summation::sum_exp(), Summation::sum_exp_aux(), Summation::sum_mul(), test_expr_str(), test_monotonicity(), EvolutionGraph::traces_from_mu(), unlinearize_array_ref(), and unroll_loop().

Expression* constant int  value  ) 
 

Description: Returns a pointer to an expression for a Fortran INTEGER_CONST_EXPR.

Definition at line 1501 of file Expression.cc.

Expression* label const char *  data_string  ) 
 

Description: Returns a pointer to an expression for a Fortran label (like that used in an ERR=100).

Referenced by AssignStmt::_setptrs(), push_wide_loop(), FormatExpr::relink_eptrs(), AssignStmt::relink_sptrs(), DoStmt::target_label(), and wide_output().

Expression* array_reference Expression array,
Expression subscripts
 

Description: Returns a pointer to an expression for a Fortran Complex constant.

Expression *complex(Expression * real, Expression * imag);

Description: Returns a pointer to an expression for a Fortran array reference

Definition at line 1567 of file Expression.cc.

References determine_root_expr_type().

Referenced by TranslateObject::_translate_symbol_refs_expr(), make_afi_node(), InlineObject::map_existing_common_block(), parse_array_ref(), and process().

Expression* substring Expression string,
Expression bounds
 

Description: Returns a pointer to an expression for a Fortran substring expression.

Definition at line 1834 of file Expression.cc.

References expr_type(), and SUBSTRING_OP.

Referenced by TranslateObject::_translate_symbol_refs_expr(), String::index(), String::index_case(), and make_afi_node().

Expression* function_call Expression function,
Expression parameters
 

Description: Returns a pointer to an expression for a Fortran function call 'function' may be an id-expression for an external or intrinsic Fortran function symbol.

Definition at line 1805 of file Expression.cc.

References NOT_INTRINSIC.

Referenced by main(), make_afi_node(), parse_function_call(), process(), SSAProgramUnit::SEARCH(), and SEARCH().

Expression* intrinsic_call Expression intrinsic,
Expression parameters
 

Description: Returns a pointer to an expression for a Fortran intrinsic call.

Definition at line 1817 of file Expression.cc.

References determine_root_expr_type(), and IS_INTRINSIC.

Referenced by _loop_index_last_val(), _pull_out_common_min_max1(), TranslateObject::_translate_symbol_refs_expr(), coalese_loop(), AbstractAccess::compute_new_dimension(), eg_distance(), eg_distance_1_dim(), fix_alternate_expr(), iteration_count(), make_afi_node(), make_best(), max_expr(), EvolutionGraph::min_distance(), min_expr(), mod_expr(), parse_intrinsic_call(), peel_loop_first(), peel_loop_last(), preroll_loop(), process(), stripmine_horiz_loop(), and stripmine_vert_loop().

Expression* lambda_call Expression expr,
Expression parameters
 

Description: Returns a pointer to an expression for a lambda call.

Expression* alternate_return Expression arg  ) 
 

Description: Returns a pointer to an expression for an alternate return (e.g.

RETURN 1)

Expression* io_star  ) 
 

Description: Returns a pointer to an expression for the * used in an I/O statement (PRINT *, ...).

Expression* format const char *  data_string  ) 
 

Description: Returns a pointer to an expression for a Fortran format statement.

Expression* new_variable const char *  varname,
const Type t,
ProgramUnit pgm
 

Description: Returns a pointer to an expression for a new Fortran identifier.

Definition at line 1975 of file Expression.cc.

References NOT_FORMAL, NOT_SAVED, and Symbol::type().

Referenced by main(), and process().

Expression* new_function const char *  varname,
const Type t,
ProgramUnit pgm
 

Description: Returns a pointer to an expression for a new Fortran function identifier.

Definition at line 1987 of file Expression.cc.

References IS_EXTERNAL, NOT_FORMAL, NOT_INTRINSIC, and Symbol::type().

Referenced by main(), and process().

Expression* new_subroutine const char *  varname,
ProgramUnit pgm
 

Description: Returns a pointer to an expression for a new Fortran subroutine identifier.

Definition at line 2011 of file Expression.cc.

References IS_EXTERNAL, NOT_FORMAL, NOT_INTRINSIC, and Symbol::type().

Referenced by main().

Expression* new_intrinsic const char *  varname,
const Type t,
ProgramUnit pgm
 

Description: Returns a pointer to an expression for a new Fortran intrinsic function identifier.

Definition at line 1999 of file Expression.cc.

References IS_INTRINSIC, NOT_EXTERNAL, NOT_FORMAL, and Symbol::type().

Referenced by TranslateObject::_translate_symbol_refs_expr(), fix_alternate_expr(), and process().

Expression* new_array_variable const char *  varname,
const Type t,
ProgramUnit pgm,
Expression bounds1,
Expression bounds2 = 0,
Expression bounds3 = 0,
Expression bounds4 = 0,
Expression bounds5 = 0
 

Description: Returns a pointer to an expression for a new Fortran array identifier.

Referenced by main(), and process().

Expression* id const char *  data_string,
const ProgramUnit pgm
 

Description: Returns a pointer to an expression for an existing Fortran identifier.

Definition at line 1960 of file Expression.cc.

Referenced by _embed_symbolic_range(), _icall_id(), _loop_index_last_val(), _norm_func_calls1(), _normalize_func_calls(), TranslateObject::_translate_symbol_refs_expr(), add_dummy_eta_assignments_after_loops(), add_dummy_global_assignments_at_calls(), coalese_loop(), SSAProgramUnit::convert_to_standard(), ProgramUnit::create_program_unit(), dump_switches(), eliminate_loop(), fix_alternate_expr(), gen_alternate_expr(), get_precalc(), incompatible_range(), main(), SSAProgramUnit::make_phi_function(), make_phi_function(), InlineObject::map_existing_common_block(), move_saved_vars(), node_value(), normalize_loop(), parse_expr(), process(), remove_assigned_goto_stmts(), reshape_array(), SSAProgramUnit::SEARCH(), EvolutionGraph::substitute(), Summation::sum_contains(), Summation::Summation(), sym_factors(), translate_and_reshape(), and translate_var().

Expression* id const Symbol symbol  ) 
 

Description: Returns a pointer to an expression for an existing Fortran symbol.

Definition at line 1969 of file Expression.cc.

References symbol(), and Symbol::type().

Expression* unary_plus Expression expr  ) 
 

Description: Returns a pointer to an expression for a unary plus expression.

Definition at line 1907 of file Expression.cc.

References U_PLUS_OP.

Expression* unary_minus Expression expr  ) 
 

Description: Returns a pointer to an expression for a unary minus expression.

Definition at line 1915 of file Expression.cc.

References U_MINUS_OP.

Referenced by _extract_a_range(), _handle_omega_in_mod(), _max_abs_expr(), _min_abs_expr(), _multiply_out_div(), _negate_range(), _p_r_o_of_mod(), _solve_linear_expr(), abs_to_max(), divides_diff(), main(), reverse_loop(), and subsume_relation().

Expression* not Expression expr  ) 
 

Description: Returns a pointer to an expression for a unary .NOT.

expression

Definition at line 1943 of file Expression.cc.

References NOT_OP.

Referenced by _combine_other_logicals(), _logical_complement(), _simplify_using_ranges(), add_dummy_eta_assignments_after_loops(), cdg2cfg(), eg_redundant_gate(), extract_ranges(), get_gates_from_trace(), EvolutionGraph::get_trace_details(), implies(), incompatible_gates(), infer_preds(), main(), PredicateRepository::not_pred(), Predicates::Predicates(), and remove_gotos().

Expression* eq Expression expr1,
Expression expr2
 

Description: Returns a pointer to an expression for a Fortran .EQ.

expression

Definition at line 1671 of file Expression.cc.

References EQ_OP, and expr_type().

Referenced by _make_range(), _recognize(), _simplify_using_ranges(), check_div(), ProgramUnit::clean(), EquivalenceDict::clean(), convert_arithmetic_if(), EquivalenceDict::exchange_convert(), extract_ranges(), TreeInMaking::grab(), main(), move_saved_vars(), and p_getsubopt().

Expression* ne Expression expr1,
Expression expr2
 

Description: Returns a pointer to an expression for a Fortran .NE.

expression

Definition at line 1682 of file Expression.cc.

References expr_type(), and NE_OP.

Referenced by check_div(), convert_arithmetic_if(), divides_diff(), TreeInMaking::grab(), PredicateRepository::transform_not_equal(), and transform_not_equal().

Expression* lt Expression expr1,
Expression expr2
 

Description: Returns a pointer to an expression for a Fortran .LT.

expression

Definition at line 1693 of file Expression.cc.

References expr_type(), and LT_OP.

Referenced by at_least_one_iteration(), AbstractAccess::calc_overlap(), compute_intrinsic_type(), convert_arithmetic_if(), TreeInMaking::grab(), intersect_ARDs(), and transform_not_equal().

Expression* le Expression expr1,
Expression expr2
 

Description: Returns a pointer to an expression for a Fortran .LE.

expression

Definition at line 1704 of file Expression.cc.

References expr_type(), and LE_OP.

Referenced by _get_array_ref_preds(), TranslateObject::_translate_symbol_refs_expr(), _update_do_succs(), apply_limits(), at_least_one_iteration(), convert_arithmetic_if(), enforce_standard_within_bounds(), TreeInMaking::grab(), increase(), Predicates::Predicates(), and PropCtrlRangeWS::PropCtrlRangeWS().

Expression* gt Expression expr1,
Expression expr2
 

Description: Returns a pointer to an expression for a Fortran .GT.

expression

Definition at line 1715 of file Expression.cc.

References expr_type(), and GT_OP.

Referenced by at_least_one_iteration(), AbstractAccess::calc_overlap(), convert_arithmetic_if(), TreeInMaking::grab(), intersect_ARDs(), peel_loop_first(), peel_loop_last(), and transform_not_equal().

Expression* ge Expression expr1,
Expression expr2
 

Description: Returns a pointer to an expression for a Fortran .GE.

expression

Definition at line 1726 of file Expression.cc.

References expr_type(), and GE_OP.

Referenced by _get_array_ref_preds(), _remove_unreachable(), _update_do_succs(), apply_limits(), at_least_one_iteration(), convert_arithmetic_if(), TreeInMaking::grab(), intersect_ARDs(), Predicates::Predicates(), and PropCtrlRangeWS::PropCtrlRangeWS().

Expression* sub Expression expr1,
Expression expr2
 

Description: Returns a pointer to an expression for expr1 - expr2.

Definition at line 1612 of file Expression.cc.

References expr_type(), and SUB_OP.

Referenced by Collection::_check_subscript(), EvolutionGraph::_compute_cyclic_evolutions(), Set< T >::_element(), RefSet< T >::_element(), _fold_divisible_in_div(), _forward_diff(), _invert_expr(), _is_evenly_divisible_for_var(), EvolutionGraph::_local_range(), _loop_index_last_val(), _loop_range(), _max_abs_expr(), _multiply_out_div(), _p_r_o_of_mod(), EvolutionGraph::_possible_ranges(), _remove_truncates1(), Collection::_subscript_error(), TranslateObject::_translate_symbol_refs_expr(), ar_interleave(), ar_subregion(), array_element_count(), BaseList::assign(), base_offset(), coalese_loop(), AbstractAccess::compute_new_dimension(), compute_top(), conformable_test(), contiguous_aggregation(), eg_distance(), eg_distance_1_dim(), extract_stride(), EvolutionGraph::get_trace_details(), TreeInMaking::grab(), included(), intersect_ARDs(), is_affine(), iteration_count(), last_element_offset(), last_value(), linearize_zero_registered(), main(), make_bytesize_expr(), InlineObject::make_conformable(), normalize_loop(), RefList< T >::operator[](), List< T >::operator[](), ExprTable::operator[](), Collection::operator[](), Array< T >::operator[](), p_greater_equal(), p_greater_than(), p_less_equal(), p_less_than(), peel_loop_first(), peel_loop_last(), EvolutionGraph::perfect_trace_from_mu(), preroll_loop(), process(), InlineObject::remap_arg_names(), reshape_array(), same_gate(), stripmine_horiz_loop(), stripmine_vert_loop(), subsume_relation(), subtract_evolution(), Summation::sum_aux(), Summation::sum_exp(), Summation::sum_mul(), and test_monotonicity().

Expression* div Expression expr1,
Expression expr2
 

Description: Returns a pointer to an expression for expr1 / expr2.

Definition at line 1640 of file Expression.cc.

References DIV_OP, and expr_type().

Referenced by _extract_a_range(), _fold_divisible_in_mult(), _fold_divisible_in_plus(), _invert_expr(), _loop_index_last_val(), _loop_range(), _p_r_o_of_divide(), _pull_in_div_expr(), _remove_truncates1(), _solve_linear_expr(), coalese_loop(), AbstractAccess::compute_new_dimension(), divides_diff(), expr_divides(), TreeInMaking::grab(), iteration_count(), main(), stripmine_vert_loop(), Summation::sum_aux(), Summation::sum_exp(), and Summation::sum_exp_aux().

Expression* exponent Expression expr1,
Expression expr2
 

Description: Returns a pointer to an expression for expr1 ** expr2.

Definition at line 1651 of file Expression.cc.

References EXP_OP, and expr_type().

Referenced by _calc_factor(), _fold_divisible_in_div(), _fold_divisible_in_exp(), _multiply_out_divs_for_var1(), _p_r_o_of_exp(), _pull_in_exp_expr(), TreeInMaking::grab(), main(), Summation::sum_exp_aux(), and sym_factors().

Expression* concat Expression expr1,
Expression expr2
 

Description: Returns a pointer to an expression for expr1 // expr2.

Definition at line 1847 of file Expression.cc.

References CONCAT_OP, and expr_type().

Referenced by TreeInMaking::grab(), and main().

Expression* add Expression expr1,
Expression expr2
 

Description: Returns a pointer to an expression for expr1 + expr2.

Definition at line 1595 of file Expression.cc.

Referenced by _combine_int_relations(), _combine_min_max(), _exit_range(), _extract_a_range(), _forward_diff(), _handle_omega_in_mod(), _invert_expr(), _is_evenly_divisible_for_var(), _loop_index_last_val(), _loop_range(), _p_r_o_of_add(), _p_r_o_of_exp(), EvolutionGraph::_relax(), _remove_div(), _solve_linear_expr(), TranslateObject::_translate_symbol_refs_expr(), ar_subregion(), array_element_count(), base_offset(), AbstractAccess::calc_overlap(), check_div(), coalese_loop(), AbstractAccess::compute_new_dimension(), compute_top(), contiguous_aggregation(), do_funny(), do_funny2(), eg_distance(), eg_distance_1_dim(), eliminate_loop(), extract_stride(), EvolutionGraph::get_trace_details(), TreeInMaking::grab(), included(), intersect_ARDs(), is_affine(), iteration_count(), last_element_offset(), last_value(), AbstractAccess::lastoffset(), linearize_zero_registered(), main(), make_bytesize_expr(), InlineObject::make_conformable(), EvolutionGraph::min_distance(), normalize_loop(), Evolution< Value >::operator+=(), peel_loop_first(), peel_loop_last(), EvolutionGraph::perfect_trace_from_mu(), preroll_loop(), process(), program_wide_range(), InlineObject::remap_arg_names(), AbstractAccess::remap_interface_vars(), reshape_array(), stripmine_horiz_loop(), stripmine_vert_loop(), EvolutionGraph::substitute(), Summation::sum_add(), Summation::sum_aux(), Summation::sum_exp(), Summation::sum_exp_aux(), Summation::sum_mul(), test_expr_str(), test_monotonicity(), translate_and_reshape(), AbstractAccess::try_coalescing(), and unroll_loop().

Expression* add List< Expression > *  args  ) 
 

Description: Returns a pointer to an expression for (*args)[0] + (*args)[1] + (*args)[2] + ...

where 'args' may contain any number ( > 0) of Expressions. The 'args' list may be created by hand or by a call to expr_list() (elsewhere in this file). The 'args' list is automatically deleted by this routine, so the user must NOT delete this list after a call to this function.

Definition at line 1606 of file Expression.cc.

References ADD_OP, and create_nonbinary().

Expression* mul Expression expr1,
Expression expr2
 

Description: Returns a pointer to an expression for expr1 * expr2.

Definition at line 1623 of file Expression.cc.

Referenced by EvolutionGraph::_add_evolutions(), _additive_inverse(), EvolutionGraph::_compute_cyclic_evolutions(), _factor_out_var_top(), _fold_divisible_in_plus(), _invert_expr(), _loop_index_last_val(), _make_range(), _multiply_out_divs_for_var1(), _p_mm_o_of_mult(), _range_bound_multiply(), _remove_truncates1(), ar_interleave(), array_element_count(), base_offset(), check_div(), coalese_loop(), AbstractAccess::compute_new_dimension(), compute_top(), AbstractAccess::convert_size(), divides_diff(), eg_distance(), eg_distance_1_dim(), TreeInMaking::grab(), is_affine(), last_element_offset(), last_value(), linearize_zero_registered(), main(), make_bytesize_expr(), normalize_loop(), Evolution< Value >::operator *=(), Expression::operator==(), peel_loop_first(), reshape_array(), same_gate(), stripmine_horiz_loop(), stripmine_vert_loop(), Summation::sum_aux(), Summation::sum_exp(), Summation::sum_exp_aux(), Summation::sum_mul(), and unroll_loop().

Expression* mul List< Expression > *  args  ) 
 

Description: Returns a pointer to an expression for (*args)[0] * (*args)[1] * (*args)[2] * ...

where 'args' may contain any number ( > 0) of Expressions. The 'args' list may be created by hand or by a call to expr_list() (elsewhere in this file). The 'args' list is automatically deleted by this routine, so the user must NOT delete this list after a call to this function.

Definition at line 1634 of file Expression.cc.

References create_nonbinary(), and MULT_OP.

Expression* or Expression expr1,
Expression expr2
 

Description: Returns a pointer to an expression for expr1 .OR.

expr2

Definition at line 1737 of file Expression.cc.

Referenced by at_least_one_iteration(), TreeInMaking::grab(), or_predicate(), simplify_descriptors(), and transform_not_equal().

Expression* or List< Expression > *  args  ) 
 

Description: Returns a pointer to an expression for (*args)[0] .OR.

(*args)[1] .OR. (*args)[2] .OR. ... where 'args' may contain any number ( > 0) of Expressions. The 'args' list may be created by hand or by a call to expr_list() (elsewhere in this file). The 'args' list is automatically deleted by this routine, so the user must NOT delete this list after a call to this function.

Definition at line 1748 of file Expression.cc.

References create_nonbinary(), and OR_OP.

Expression* and Expression expr1,
Expression expr2
 

Description: Returns a pointer to an expression for expr1 .AND.

expr2

Definition at line 1754 of file Expression.cc.

Referenced by and_predicate(), apply_limits(), at_least_one_iteration(), AbstractAccess::calc_overlap(), Predicates::contradicts(), divides_diff(), enforce_standard_within_bounds(), TreeInMaking::grab(), incompatible_gates(), and main().

Expression* and List< Expression > *  args  ) 
 

Description: Returns a pointer to an expression for (*args)[0] .AND.

(*args)[1] .AND. (*args)[2] .AND. ... where 'args' may contain any number ( > 0) of Expressions. The 'args' list may be created by hand or by a call to expr_list() (elsewhere in this file). The 'args' list is automatically deleted by this routine, so the user must NOT delete this list after a call to this function.

Definition at line 1765 of file Expression.cc.

References AND_OP, and create_nonbinary().

Expression* eqv Expression expr1,
Expression expr2
 

Description: Returns a pointer to an expression for expr1 .EQV.

expr2

Definition at line 1771 of file Expression.cc.

Referenced by TreeInMaking::grab().

Expression* eqv List< Expression > *  args  ) 
 

Description: Returns a pointer to an expression for (*args)[0] .EQV.

(*args)[1] .EQV. (*args)[2] .EQV. ... where 'args' may contain any number ( > 0) of Expressions. The 'args' list may be created by hand or by a call to expr_list() (elsewhere in this file). The 'args' list is automatically deleted by this routine, so the user must NOT delete this list after a call to this function.

Definition at line 1782 of file Expression.cc.

References create_nonbinary(), and EQV_OP.

Expression* neqv Expression expr1,
Expression expr2
 

Description: Returns a pointer to an expression for expr1 .NEQV.

expr2

Definition at line 1788 of file Expression.cc.

Referenced by TreeInMaking::grab().

Expression* neqv List< Expression > *  args  ) 
 

Description: Returns a pointer to an expression for (*args)[0] .NEQV.

(*args)[1] .NEQV. (*args)[2] .NEQV. ... where 'args' may contain any number ( > 0) of Expressions. The 'args' list may be created by hand or by a call to expr_list() (elsewhere in this file). The 'args' list is automatically deleted by this routine, so the user must NOT delete this list after a call to this function.

Definition at line 1799 of file Expression.cc.

References create_nonbinary(), and NEQV_OP.

Expression* do_expression Expression expr1,
Expression expr2
 

Description: Returns a pointer to an expression for expr1 * expr2.

Definition at line 1923 of file Expression.cc.

Expression* equal Expression index,
Expression iter_space
 

Description: Returns a pointer to an expression for an EqualExpr (e.g.

I=1,100,3)

Definition at line 1933 of file Expression.cc.

Referenced by Relation::Relation().

Expression* comma  ) 
 

Description: Returns a pointer to an expression for a CommaExpr with no arguments.

Definition at line 1902 of file Expression.cc.

Referenced by _loop_index_last_val(), _pull_out_common_min_max1(), TranslateObject::_translate_symbol_refs_expr(), add_dummy_eta_assignments_after_loops(), add_dummy_global_assignments_at_calls(), build_expr(), build_mu(), check_parallel_and_instrument(), coalese_loop(), AbstractAccess::compute_new_dimension(), ProgramUnit::create_program_unit(), eg_distance(), eg_distance_1_dim(), fix_alternate_expr(), initial_array_ref(), iteration_count(), main(), make_best(), InlineObject::make_conformable(), SSAProgramUnit::make_phi_function(), make_phi_function(), max_expr(), EvolutionGraph::min_distance(), min_expr(), mod_expr(), move_saved_vars(), peel_loop_first(), peel_loop_last(), preroll_loop(), process(), SSAProgramUnit::SEARCH(), SEARCH(), stripmine_horiz_loop(), stripmine_vert_loop(), and unlinearize_array_ref().

Expression* comma Expression expr1  ) 
 

Description: Returns a pointer to an expression for a CommaExpr.

'expr' may not be NULL

Definition at line 1894 of file Expression.cc.

Expression* comma Expression expr1,
Expression expr2,
Expression expr3 = 0,
Expression expr4 = 0,
Expression expr5 = 0
 

Description: Returns a pointer to an expression for a CommaExpr.

Expression* comma List< Expression > *  args  ) 
 

Description: Returns a pointer to an expression for (*args)[0] , (*args)[1] , (*args)[2] , ...

where 'args' may contain any number ( > 0) of Expressions. The 'args' list may be created by hand or by a call to expr_list() (elsewhere in this file). The 'args' list is automatically deleted by this routine, so the user must NOT delete this list after a call to this function.

Definition at line 1877 of file Expression.cc.

Expression* colon Expression expr1,
Expression expr2,
Expression expr3 = 0
 

Description: Returns a pointer to an expression for a ColonExpr ( 1:10 ).

Referenced by main(), and process().

Expression* paren Expression expr  ) 
 

Description: Returns a pointer to a parenthesized expression.

Definition at line 1952 of file Expression.cc.

References PAREN_OP.

Referenced by _remove_local_effects_from_expr1(), _simplify_var_mods(), _subst_unkeepable_vars(), and main().

Expression* omega  ) 
 

Description: Returns a pointer to a null expression.

Definition at line 2080 of file Expression.cc.

Referenced by _create_new_actual_consts(), _filter_out_mod_params(), SSAFullRangeDict::_get_range_ref(), GSAFullRangeDict::_get_range_ref(), _p_r_o_of_mod(), _pull_ranges_out(), _remove_local_effects_from_expr(), _replace_vars_with_omega(), _subst_vars_in_expr1(), _update_old_consts(), AllocateStmt::AllocateStmt(), ArithmeticIfStmt::ArithmeticIfStmt(), AssignedGotoStmt::AssignedGotoStmt(), AssignStmt::AssignStmt(), build_expr(), CallStmt::CallStmt(), ComputedGotoStmt::ComputedGotoStmt(), IPCPProcData::create_jump_function(), DeallocateStmt::DeallocateStmt(), DoStmt::DoStmt(), ElseIfStmt::ElseIfStmt(), EntryStmt::EntryStmt(), IfStmt::IfStmt(), IOStmt::IOStmt(), last_element_offset(), main(), null_to_omega(), NullifyStmt::NullifyStmt(), parse_expr(), PauseStmt::PauseStmt(), pull_ranges_out(), ReturnStmt::ReturnStmt(), RangeAccessor::set_range(), sink_return_points(), StopStmt::StopStmt(), and WhileStmt::WhileStmt().

Expression* null_to_omega Expression expr  ) 
 

Description: Return a pointer to a null expression if the given expression is 0 (NULL).

Otherwise return the given expression.

Definition at line 2086 of file Expression.cc.

References omega().

Referenced by UnaryExpr::_expr(), BinaryExpr::_left(), BinaryExpr::_right(), AllocateStmt::AllocateStmt(), ArithmeticIfStmt::ArithmeticIfStmt(), AssignedGotoStmt::AssignedGotoStmt(), AssignmentStmt::AssignmentStmt(), AssignStmt::AssignStmt(), BinaryExpr::BinaryExpr(), CallStmt::CallStmt(), ComputedGotoStmt::ComputedGotoStmt(), DeallocateStmt::DeallocateStmt(), DoStmt::DoStmt(), ElseIfStmt::ElseIfStmt(), EntryStmt::EntryStmt(), GSAExpr::gate(), IfStmt::IfStmt(), IOStmt::IOStmt(), NullifyStmt::NullifyStmt(), PauseStmt::PauseStmt(), ReturnStmt::ReturnStmt(), StopStmt::StopStmt(), UnaryExpr::UnaryExpr(), and WhileStmt::WhileStmt().

Expression* infinity int  sign = 1  ) 
 

Description: Returns a pointer to an infinity expression with a sign equal to the sign of the given integer.

Referenced by EvolutionGraph::_add_approximations(), EvolutionGraph::_bellman_ford(), EvolutionGraph::_compute_cyclic_evolutions(), _filter_arrays(), EvolutionGraph::_local_range(), _make_range(), _p_r_o_of_add(), _range(), eg_distance(), eg_distance_1_dim(), eg_range(), eg_range_array_1_to_i(), evolution(), get_translated_evolution(), included(), EvolutionGraph::min_distance(), Evolution< Value >::operator *=(), Evolution< Value >::operator+=(), parse_expr(), and EvolutionGraph::perfect_trace_from_mu().

Expression* alpha Expression parameters  ) 
 

Description: Create a alpha GSA function with the given parameters.

Definition at line 2100 of file Expression.cc.

References ALPHA_OP, expr_type(), and parameters().

Referenced by SSAProgramUnit::SEARCH(), and SEARCH().

Expression* gamma Expression gate,
Expression parameters
 

Description: Create a gamma GSA function with the given gate function and parameters.

Definition at line 2110 of file Expression.cc.

References expr_type(), GAMMA_OP, and parameters().

Referenced by build_expr(), make_phi_function(), and parse_phi_expr().

Expression* mu Expression parameters  ) 
 

Description: Create a mu GSA function with the given parameters.

Definition at line 2120 of file Expression.cc.

Referenced by EvolutionGraph::_add_evolutions(), EvolutionGraph::_compute_acyclic_evolutions(), EvolutionGraph::_compute_cyclic_evolutions(), EvolutionGraph::_local_range(), EvolutionGraph::_possible_ranges(), build_mu(), eg_get_ev_summary(), EvolutionGraph::find_unique_mu(), get_imu(), make_phi_function(), EvolutionGraph::min_distance(), parse_phi_expr(), EvolutionGraph::perfect_trace_from_mu(), EvolutionGraph::sequence_type(), and EvolutionGraph::traces_from_mu().

Expression* mu Expression parameters,
Expression gate
 

Definition at line 2150 of file Expression.cc.

References expr_type(), MU_OP, and parameters().

Expression* coerce Expression expr,
EXPR_TYPE  type,
ProgramUnit pgm
 

Description: Returns a new expression which coerces 'expr' into the same type as that of 'type', IF NECESSARY (if 'expr' is already of the same type as 'type', it returns 'expr' unchanged).

... const char *intrin_name = 0;

Definition at line 2220 of file Expression.cc.

References _assert_can_coerce(), _cannot_coerce(), _coerce(), CHARACTER_TYPE, COMPLEX_TYPE, DOUBLE_PRECISION_TYPE, INTEGER_TYPE, REAL_TYPE, and VOID_TYPE.

Referenced by precalc_loop().

Expression * keyword const char *  data_string  ) 
 

Description: Create a keyword node for the keypair function.

Definition at line 1553 of file Expression.cc.

Referenced by s_control_type::s_control_type().

Expression* keypair Expression expr1,
Expression expr2
 

Description: Returns a pointer to an expression for a Fortran MASK=X expression.

Definition at line 1662 of file Expression.cc.

References KEYPAIR_OP, make_type(), and VOID_TYPE.

Expression* sum Expression ex,
Expression id,
const Expression lower,
const Expression upper
 

Description: Returns a the summation of id from lower to upper over the expression ex.

Definition at line 14160 of file Expression.cc.

References Summation::sum().

Referenced by AbstractAccess::calc_overlap(), contiguous_aggregation(), and test_expr_str().

Expression* substitute_var Expression e,
const Symbol var,
const Expression value
 

Description: Substitute all occurences of the given variable in the given expression with the given value, then return the result.

... Check to see if symbol matches (if not, there is nothing to do)

else if ((e->op() == ARRAY_REF_OP) && (value.op() == RANGE_OP) && is_var_in_expr(e->subscript(), var)) { delete e; e = new OmegaExpr(); }

Definition at line 7550 of file Expression.cc.

Referenced by _eg_forward_substitute(), _forward_diff(), _is_base_case_evenly_divisible(), _is_evenly_divisible_for_var(), _subst_mods_with_var(), _subst_var_in_assert(), _subst_var_in_stmt(), _substitute_mono_var(), _substitute_mono_var1(), _translate_range(), apply_limits(), avoid_arrays_substitute_var(), AbstractAccess::compute_new_dimension(), SSAProgramUnit::convert_to_standard(), eg_forward_substitute(), extract_stride(), fix_substituted(), is_affine(), modify_dummy_eta_assignments_after_loops(), optimize_ssa_beta(), optimize_ssa_eta(), optimize_ssa_gamma(), optimize_ssa_mu(), optimize_ssa_zero(), rename_all_occurences(), replace_symbol(), SSAProgramUnit::SEARCH(), substitute_var(), test_expr_str(), test_monotonicity(), and trace_into_called_pgm().

void substitute_var Expression e,
const Symbol var,
const Symbol new_var
 

Description: Substitute (in place) all occurances of the given variable in the given expression with the given new variable.

... Check to see if symbol matches (if not, there is nothing to do)

Definition at line 7580 of file Expression.cc.

References Expression::arg_list(), e, ID_OP, Expression::op(), substitute_var(), DistributeExpr::symbol(), and List< T >::valid().

 © 1995-2005 University of Illinois, Urbana-Champaign. All rights reserved.  Fri Mar 25 23:06:20 2005