PIPS
|
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include "linear.h"
#include "genC.h"
#include "ri.h"
#include "misc.h"
#include "ri-util.h"
#include "properties.h"
#include "operator.h"
Go to the source code of this file.
|
static |
this function shouldn't be called.
Use macro NORMALIZE_EXPRESSION(e) instead.
Definition at line 76 of file normalize.c.
References expression_syntax, and NormalizeSyntax().
Referenced by binary_to_normalized(), expression_to_affine(), NormalizeExpression(), and NormalizeIntrinsic().
normalized binary_to_normalized | ( | list | la, |
int | op | ||
) |
initialized to please gcc
FI: the C operator is different from the Fortran operator for non-positive arguments.
FI: the C operator is different from the Fortran operator for non-positive arguments.
la | a |
op | p |
Definition at line 320 of file normalize.c.
References _NormalizeExpression(), CAR, CDR, EvalNormalized(), EXPRESSION, FreeNormalized(), gen_length(), ipow(), is_normalized_complex, is_normalized_linear, make_normalized(), MAX, MAXIMUM, MIN, MINIMUM, MOD, normalized_complex_p, pips_assert, pips_internal_error, POWER, SLASH, TCST, user_error, UU, and vect_new().
Referenced by NormalizeIntrinsic().
bool EvalNormalized | ( | normalized | n, |
int * | pv | ||
) |
pv | v |
Definition at line 404 of file normalize.c.
References normalized_linear, normalized_linear_p, TCST, val_of, VALUE_TO_INT, var_of, and vect_size().
Referenced by binary_to_normalized(), loop_increment_value(), NormalizeIntrinsic(), and words_numerical_dimension().
Pvecteur expression_to_affine | ( | expression | e | ) |
As long as VECTEUR_UNDEFINED is not different from VECTEUR_NUL this routine cannot be used safely; either 0 will be considered not linear or every non linear expression will be equal to 0
should it also perform the conversion from variable entities to new value entities?
Definition at line 461 of file normalize.c.
References _NormalizeExpression(), expression_normalized, normalized_linear, normalized_linear_p, normalized_undefined, vect_dup(), and VECTEUR_UNDEFINED.
Referenced by transformer_add_loop_index_incrementation().
void free_expression_normalized | ( | expression | e | ) |
Definition at line 432 of file normalize.c.
References expression_normalized, FreeNormalized(), and normalized_undefined.
Referenced by unnormalize_expression().
void FreeNormalized | ( | normalized | n | ) |
FI: theoretically, free_normalized() performs the next three lines...
gen_free(n);
Definition at line 419 of file normalize.c.
References free_normalized(), normalized_linear, normalized_linear_, normalized_linear_p, and vect_rm().
Referenced by binary_to_normalized(), free_expression_normalized(), and NormalizeIntrinsic().
|
static |
Look for affine expressions and encode them as vectors when possible.
Definition at line 635 of file normalize.c.
References expression_normalized, expression_syntax, is_normalized_complex, is_syntax_application, is_syntax_call, is_syntax_cast, is_syntax_range, is_syntax_reference, is_syntax_sizeofexpression, is_syntax_subscript, is_syntax_va_arg, make_normalized(), normalize_call(), normalize_reference(), normalized_undefined, normalized_undefined_p, pips_internal_error, syntax_call, syntax_reference, syntax_tag, and UU.
Referenced by normalize_all_expressions_of().
void normalize_all_expressions_of | ( | void * | obj | ) |
obj | bj |
Definition at line 668 of file normalize.c.
References expression_domain, gen_multi_recurse(), gen_true(), and norm_all_rewrite().
Referenced by array_overflow(), atom_cse_expression(), atomize_this_expression(), call_rwt(), free_guards(), handle_align_and_realign_directive(), handle_distribute_and_redistribute_directive(), loop_flt(), normalize_wp65_code(), NormalizeCodeForHpfc(), and simd_atomize_this_expression().
|
static |
Definition at line 604 of file normalize.c.
References call_arguments, call_function, entity_initial, f(), is_normalized_complex, is_value_code, is_value_constant, is_value_intrinsic, is_value_symbolic, is_value_unknown, make_normalized(), normalize_constant(), normalize_intrinsic(), normalized_undefined, pips_internal_error, symbolic_constant, UU, value_constant, value_symbolic, and value_tag.
Referenced by norm_all_rewrite().
|
static |
Definition at line 583 of file normalize.c.
References constant_int, constant_int_p, is_normalized_complex, is_normalized_linear, make_normalized(), TCST, UU, and vect_new().
Referenced by normalize_call().
|
static |
the first expressions encountered are normalized
normalized
fprintf(stderr, "[NormExpr] result (%p)\n", n),
print_expression(e);
Definition at line 679 of file normalize.c.
References expression_normalized, and normalized_undefined_p.
Referenced by normalize_first_expressions_of().
void normalize_first_expressions_of | ( | void * | obj | ) |
obj | bj |
Definition at line 694 of file normalize.c.
References expression_domain, gen_multi_recurse(), gen_null(), and normalize_first_expressions_filter().
Referenced by normalize_align(), normalize_distribute(), and normalize_hpf_object().
|
static |
else
else
else
else
else multiply (caution: vect_multiply does not allocate...)
else
Definition at line 517 of file normalize.c.
References assert, b1, b2, CAR, CDR, ENTITY_MINUS_P, ENTITY_MULTIPLY_P, ENTITY_PLUS_P, ENTITY_UNARY_MINUS_P, EXPRESSION, expression_normalized, f(), is_normalized_complex, is_normalized_linear, make_normalized(), normalized_complex_p, normalized_constant_p(), normalized_linear, normalized_undefined_p, top_level_entity_p(), UU, vect_add(), vect_chg_sgn(), vect_dup(), vect_multiply(), vect_substract(), and VECTEUR_NUL.
Referenced by normalize_call().
normalized normalize_reference | ( | reference | r | ) |
Definition at line 592 of file normalize.c.
References entity_integer_scalar_p(), entity_variable_p, is_normalized_complex, is_normalized_linear, make_normalized(), pips_assert, reference_variable, UU, and vect_new().
Referenced by norm_all_rewrite(), and reference_to_expression().
normalized NormalizeCall | ( | call | c | ) |
Definition at line 145 of file normalize.c.
References call_arguments, call_function, entity_initial, f(), get_bool_property(), is_normalized_complex, is_value_code, is_value_constant, is_value_intrinsic, is_value_symbolic, is_value_unknown, make_normalized(), make_normalized_linear(), NormalizeConstant(), normalized_undefined, NormalizeIntrinsic(), pips_internal_error, symbolic_constant, UU, value_constant, VALUE_ONE, value_symbolic, value_tag, and vect_new().
Referenced by NormalizeSyntax().
normalized NormalizeCast | ( | cast | c | ) |
Definition at line 130 of file normalize.c.
References cast_expression, cast_type, expression_to_type(), free_type(), make_normalized_complex(), normalized_undefined, NormalizeExpression(), and type_equal_p().
Referenced by NormalizeSyntax().
normalized NormalizeConstant | ( | constant | c | ) |
Definition at line 175 of file normalize.c.
References constant_int, constant_int_p, make_normalized_complex(), make_normalized_linear(), TCST, and vect_new().
Referenced by NormalizeCall().
|
static |
New Stuff to normalize all expressions - bottom-up
FC 09/06/94
Definition at line 494 of file normalize.c.
References normalized_linear, normalized_linear_p, TCST, val_of, VALUE_TO_INT, var_of, and vect_size().
Referenced by normalize_intrinsic().
normalized NormalizeExpression | ( | expression | e | ) |
normalize.c
Definition at line 81 of file normalize.c.
References _NormalizeExpression(), expression_normalized, normalized_undefined, and user_warning.
Referenced by force_renormalize(), NormalizeCast(), xml_Connection(), and xml_ConstOffset().
normalized NormalizeIntrinsic | ( | entity | e, |
list | la | ||
) |
There is no point in normalizing ng since this cannot be expressed by a normalized expression
la | a |
Definition at line 221 of file normalize.c.
References _NormalizeExpression(), binary_to_normalized(), CAR, CDR, ENTITY_DIVIDE_P, ENTITY_MAX0_P, ENTITY_MAX_P, ENTITY_MIN0_P, ENTITY_MIN_P, ENTITY_MINUS_C_P, ENTITY_MINUS_P, ENTITY_MINUS_UPDATE_P, ENTITY_MODULO_P, ENTITY_MULTIPLY_P, ENTITY_PLUS_C_P, ENTITY_PLUS_P, ENTITY_PLUS_UPDATE_P, ENTITY_POWER_P, ENTITY_UNARY_MINUS_P, EvalNormalized(), EXPRESSION, FreeNormalized(), gen_length(), is_normalized_complex, is_normalized_linear, make_normalized(), make_normalized_complex(), MAXIMUM, MINIMUM, MOD, normalized_complex_p, normalized_linear, POWER, SLASH, top_level_entity_p(), UU, vect_add(), vect_chg_sgn(), vect_multiply(), and vect_substract().
Referenced by NormalizeCall().
normalized NormalizeReference | ( | reference | r | ) |
SG is there any good reason to exclude pointer arithmetic ?
Definition at line 182 of file normalize.c.
References ENDP, entity_domain, entity_domain_number, entity_enum_variable_p(), entity_integer_scalar_p(), entity_name, entity_pointer_p(), entity_type, entity_user_name(), is_normalized_complex, is_normalized_linear, make_normalized(), normalized_undefined, pips_assert, pips_user_error, pips_user_warning, reference_indices, reference_variable, type_functional_p, type_tag, type_variable_p, UU, VALUE_ONE, and vect_new().
Referenced by NormalizeSyntax().
normalized NormalizeSyntax | ( | syntax | s | ) |
Definition at line 94 of file normalize.c.
References is_syntax_application, is_syntax_call, is_syntax_cast, is_syntax_range, is_syntax_reference, is_syntax_sizeofexpression, is_syntax_subscript, is_syntax_va_arg, make_normalized_complex(), NormalizeCall(), NormalizeCast(), normalized_undefined, NormalizeReference(), pips_internal_error, syntax_call, syntax_cast, syntax_reference, and syntax_tag.
Referenced by _NormalizeExpression(), and array_indices_communication().
void unnormalize_expression | ( | void * | st | ) |
void unnormalize_expression(expression exp): puts all the normalized field of expressions in "st" to undefined and does the unnormalization recursively
This is very useful when you combine expressions. It prohibits unnormalized expressions with normalized sub-expressions.
FI: any chunk* can be passed; this function could be applied to an expression
st | t |
Definition at line 452 of file normalize.c.
References expression_domain, free_expression_normalized(), gen_multi_recurse(), and gen_true().
Referenced by analyze_expression(), do_gather_all_expressions_perms(), do_outliner_smart_replacment(), do_scalar_renaming(), get_exp_schedule(), get_m_coef(), inline_expression_call(), my_adg_expressions_to_predicate(), nlc_linear_expression_p(), optimize_expressions(), partial_eval_expression(), perform_substitution(), rational_op_exp(), redundant_load_store_elimination(), rename_reference(), replace_entities_expression_walker(), sp_linear_expression_p(), splc_linear_expression_p(), try_reorder_expression_call(), and update_expression_syntax().