PIPS
|
#include "defines-local.h"
#include "prettyprint.h"
#include "access_description.h"
#include "effects-generic.h"
#include "effects-simple.h"
#include "effects-convex.h"
Go to the source code of this file.
Macros | |
#define | REGION_TYPE EFFECT_TYPE |
Align Checker. More... | |
Functions | |
static bool | write_on_entity_p (entity e) |
bool | local_integer_constant_expression (expression e) |
true is the expression is locally constant, that is in the whole loop nest, the reference is not written. More... | |
static bool | shift_expression_of_loop_index_p (expression e, entity *pe, int *pi) |
true if the expression is shift function of a loop nest index. More... | |
static bool | affine_expression_of_loop_index_p (expression e, entity *pe, int *pi1, int *pi2) |
true if the expression is an affine function of a loop nest index. More... | |
bool | align_check (reference r1, reference r2, list *plvect, list *plkind) |
computes the shift vector that links the two references, true if every thing is ok, i.e. More... | |
bool | hpfc_integer_constant_expression_p (expression e, int *pi) |
#define REGION_TYPE EFFECT_TYPE |
Align Checker.
try to decide whether two references are aligned or not. if not, gives back the alignement shift vector of the second reference to the first one.
this should use use-def chains, vectors and so on
Fabien Coelho August 93
Definition at line 47 of file align-checker.c.
|
static |
true if the expression is an affine function of a loop nest index.
just to avoid a gcc warning
Definition at line 130 of file align-checker.c.
References entity_loop_index_p(), expression_normalized, fprintf(), ifdebug, is_normalized_complex, is_normalized_linear, normalized_linear, normalized_tag, normalized_undefined_p, pips_assert, pips_internal_error, print_expression(), TCST, val_of, value_notone_p, VALUE_TO_INT, var_of, vect_coeff(), vect_del_var(), vect_rm(), and vect_size().
Referenced by align_check().
computes the shift vector that links the two references, true if every thing is ok, i.e.
the vector is ok for the distributed dimensions... The vector considered here is just a list of integers. conditions: same template
default value, used in the shift case !
default value, used in the const case !
replication, say it is not aligned
replicated reference...
a(i) -> t(i,1), b(i,j)->t(i,j), should detect do i a(i) = b(i,1) as aligned...
??? this could be managed later in this function...
should be ok, even if a delta is induced, if it stays on the same processor along this dimension. The case should also be managed downward, when playing with local updates. ??? maybe there is also a consequence on the send/receive symetry, in order to put the message where it should be...
it is checked later whether the data are on the same processor or not.
now we have everything to check whether it is aligned... and to compute the shift necessary to the overlap analysis.
something is true!
just check whether aligned or not
even in the constant case ! not aligned
aligned... ??? bug if not 1: later on, because decl shift
4 cases study with bconst and bshift, plus the rates
what should be the relevent information(s) ??? not only d, but shift2 and t2 may be usefull either ??? what about rates!=1 ? decl shift problem added.
say not aligned...
??? decl shift problem may occur here as well
??? I should do something with blcnst2?
well, say not aligned, but one to many or many to one communications may be used...
ith dimension of e2 is not distributed
may be used to generate RSDs
else the local constant should be detected, for onde24...
r1 | 1 |
r2 | 2 |
plvect | lvect |
plkind | lkind |
Definition at line 190 of file align-checker.c.
References affine_expression_of_loop_index_p(), align_template, aligned_constant, aligned_shift, aligned_star, alignment_arraydim, alignment_constant, alignment_rate, alignment_templatedim, alignment_undefined, CAR, conformant_templates_p(), CONS, DELTAV, entity_name, EXPRESSION, expression_normalized, FindArrayDimAlignmentOfArray, FindTemplateDimAlignmentOfArray, fprintf(), gen_length(), gen_nconc(), gen_nth(), hpfc_integer_constant_expression_p(), HpfcExpressionToInt(), ifdebug, INT, int_to_value, ith_dim_distributed_p(), load_hpf_alignment(), local_affine, local_constant, local_form_cst, local_integer_constant_expression(), local_shift, local_star, NIL, normalized_linear, not_aligned, NumberOfDimension(), ok, pips_debug, POP, print_reference(), PVECTOR, reference_indices, reference_variable, shift_expression_of_loop_index_p(), TCST, TEMPLATEV, TSHIFTV, VALUE_ONE, vect_add(), vect_make(), vect_new(), VECTEUR_NUL, and VECTOR.
Referenced by Overlap_Analysis().
bool hpfc_integer_constant_expression_p | ( | expression | e, |
int * | pi | ||
) |
just to avoid a gcc warning
pi | i |
Definition at line 514 of file align-checker.c.
References expression_normalized, is_normalized_complex, is_normalized_linear, NORMALIZE_EXPRESSION, normalized_linear, normalized_tag, normalized_undefined_p, pips_internal_error, TCST, VALUE_TO_INT, vect_coeff(), vect_del_var(), vect_rm(), and vect_size().
Referenced by align_check(), compute_entity_to_declaration_constraints(), empty_range_p(), fprint_range(), lrange_larger_p(), safe_static_domain_bound(), and sprint_range().
bool local_integer_constant_expression | ( | expression | e | ) |
true is the expression is locally constant, that is in the whole loop nest, the reference is not written.
??? not very portable thru pips...
Definition at line 64 of file align-checker.c.
References expression_normalized, expression_syntax, normalized_linear_p, reference_variable, syntax_reference, syntax_reference_p, and write_on_entity_p().
Referenced by align_check(), and simple_indices_p().
|
static |
true if the expression is shift function of a loop nest index.
just to avoid a gcc warning
Definition at line 82 of file align-checker.c.
References entity_loop_index_p(), expression_normalized, is_normalized_complex, is_normalized_linear, normalized_linear, normalized_tag, normalized_undefined_p, pips_assert, pips_internal_error, TCST, val_of, value_one_p, VALUE_TO_INT, var_of, vect_coeff(), vect_del_var(), vect_rm(), and vect_size().
Referenced by align_check().
Definition at line 50 of file align-checker.c.
References get_hpfc_current_statement(), load_statement_local_regions(), MAP, REGION, region_entity, and region_write_p.
Referenced by local_integer_constant_expression().