25 #include "pips_config.h"
78 for(l=leffects_to_dist_arrays; !
ENDP(l);
POP(l))
113 for(i=1; i<=ntdim; i++,
POP(ld))
343 update(new_common, common);
410 for (i=1; i<dim; i++)
425 int i = 1, procdim = 0;
494 int tdim, tcell, *pprocdim;
501 int n, tmin, pmin, psiz;
517 return ((tcell-tmin)/n)+pmin;
520 return (((tcell-tmin)/n)%psiz)+pmin;
543 return (
tc-tmin)%n+1;
585 if ((s==1) && (val!=0))
return val;
608 int dim, *ptdim, *pa, *pb;
640 int dim, *ppdim, *pn;
653 int dim, *plow, *pup;
681 int tdim1, rate1, shift1, tdim2, rate2, shift2;
686 if (tdim1!=tdim2)
return false;
687 if (!tdim1 && !tdim2)
return true;
689 return rate1==rate2 && shift1==shift2;
722 #define XDEBUG(msg) \
723 pips_debug(6, "%s and %s: " msg "\n", entity_name(e1), entity_name(e2))
738 XDEBUG(
"not distributed");
return false;
749 XDEBUG(
"template is different");
return false;
754 XDEBUG(
"arities are different");
return false;
767 XDEBUG(
"alignments are incompatible");
return false;
774 XDEBUG(
"aligned!");
return true;
787 error_reset_current_stmt_stack();
849 make_current_stmt_stack();
857 free_current_stmt_stack();
expression copy_expression(expression p)
EXPRESSION.
statement make_statement(entity a1, intptr_t a2, intptr_t a3, string a4, instruction a5, list a6, string a7, extensions a8, synchronization a9)
instruction make_instruction(enum instruction_utype tag, void *val)
synchronization make_synchronization_none(void)
sequence make_sequence(list a)
extensions copy_extensions(extensions p)
EXTENSIONS.
#define VALUE_TO_INT(val)
entity host_module
HPFC - Fabien Coelho, May 1993 and later...
static statement current_stmt
list proper_effects_of_expression(expression)
#define effect_any_reference(e)
FI: cannot be used as a left hand side.
#define effect_variable(e)
For COMPATIBILITY purpose only - DO NOT USE anymore.
bool store_effect_p(effect)
#define action_write_p(x)
#define gen_recurse(start, domain_number, flt, rwt)
void gen_multi_recurse(void *o,...)
Multi recursion visitor function.
bool gen_true(__attribute__((unused)) gen_chunk *unused)
Return true and ignore the argument.
instruction make_instruction_block(list statements)
Build an instruction block from a list of statements.
#define ENDP(l)
Test if a list is empty.
list gen_nreverse(list cp)
reverse a list in place
#define POP(l)
Modify a list pointer to point on the next element of the list.
#define NIL
The empty list (nil in Lisp)
size_t gen_length(const list l)
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
list gen_nconc(list cp1, list cp2)
physically concatenates CP1 and CP2 but do not duplicates the elements
#define CAR(pcons)
Get the value of the first element of a list.
void gen_free_list(list l)
free the spine of the list
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
void * gen_find_eq(const void *item, const list seq)
#define MAP(_map_CASTER, _map_item, _map_code, _map_list)
Apply/map an instruction block on all the elements of a list (old fashioned)
statement make_assign_statement(expression, expression)
void fix_statement_attributes_if_sequence(statement)
Apply fix_sequence_statement_attributes() on the statement only if it really a sequence.
void fix_sequence_statement_attributes(statement)
Since blocks are not represented in Fortran, they cannot carry a label.
void store_new_node_variable(entity new, entity old)
void store_new_host_variable(entity new, entity old)
#define alignment_templatedim(x)
#define alignment_undefined
#define DISTRIBUTION(x)
DISTRIBUTION.
#define distribution_style(x)
#define alignment_constant(x)
#define align_template(x)
#define align_alignment(x)
#define distribute_distribution(x)
#define ALIGNMENT(x)
ALIGNMENT.
#define alignment_rate(x)
#define alignment_undefined_p(x)
#define alignment_arraydim(x)
#define distribute_processors(x)
#define distribution_parameter(x)
#define style_cyclic_p(x)
#define distribution_undefined_p(x)
#define distribution_undefined
#define HPFC_PACKAGE
local definitions
void kill_statement_number_and_ordering(statement s)
void AddCommonToModule(entity common, entity module, void(*update)(), string suffix)
The common name is changed to distinguish the current, host and node instances of the common.
static list found_syntaxes
void AddEntityToHostAndNodeModules(entity e)
AddEntityToHostAndNodeModules.
int template_cell_local_mapping(entity array, int dim, int tc)
int template_cell_local_mapping(array, dim, tc)
int DistributionParameterOfArrayDim(entity array, int dim, int *pprocdim)
int processor_dimension_of_template_dimension(entity template, int dim)
void get_entity_dimensions(entity e, int dim, int *plow, int *pup)
void get_alignment(entity array, int dim, int *ptdim, int *pa, int *pb)
static void loop_rewrite(loop l)
void hpfc_util_error_handler()
removes IF (.TRUE.) THEN and DO X=n, n
void AddCommonToHostAndNodeModules(entity common)
list FindRefToDistArrayFromList(list lexpr)
FindRefToDistArrayFromList.
int HpfcExpressionToInt(expression e)
HpfcExpressionToInt(e)
bool ith_dim_replicated_p(_UNUSED_ entity template, int i, list la, distribution dist)
bool ith_dim_replicated_p(template, i, la, dist)
bool written_effects_to_dist_arrays_p(expression expr)
statement MakeStatementLike(statement stat, int the_tag)
creates a new statement for the given module that looks like the stat one, i.e.
distribution FindDistributionOfProcessorDim(list ldi, int dim, int *tdim)
bool ith_dim_distributed_p(entity array, int i, int *pprocdim)
whether a dimension is distributed or not.
bool alignments_compatible_p(entity e1, int dim1, entity e2, int dim2)
bool alignments_compatible_p(entity e1, int dim1, entity e2, int dim2)
static int expression_number_for_index(entity index, list le)
bool references_aligned_p(reference r1, reference r2)
void get_distribution(entity template, int dim, int *ppdim, int *pn)
bool replicated_p(entity e)
replicated_p
static void FindRefToDistArray_syntax_rewrite(syntax s)
static void stmt_rwt(statement s)
alignment FindAlignmentOfTemplateDim(list lal, int dim)
void statement_structural_cleaning(statement s)
list FindRefToDistArray(void *obj)
int processor_number(entity template, int tdim, int tcell, int *pprocdim)
int processor_number(template, tdim, tcell, pprocdim)
alignment FindAlignmentOfDim(list lal, int dim)
bool ref_to_dist_array_p(void *obj)
this file describe a few functions usefull to the compiler to manage the hpfc data structures.
bool references_aligned_p(reference r1, reference r2)
distribution FindDistributionOfDim(list ldi, int dim, int *pdim)
int global_array_cell_to_local_array_cell(entity array, int dim, int acell)
int global_array_cell_to_local_array_cell(array, dim, acell)
list DistArraysEffects(expression expr)
effects' action in an expression are here supposed to be read one's but that may not be correct?
static void test_rewrite(test t)
bool ith_dim_overlapable_p(entity array, int i)
bool processors_dim_replicated_p(_UNUSED_ entity p, entity a, int i)
true if array a is replicated on processors p i-th dimension.
bool written_effect_p(entity var, list le)
written_effects_to_dist_arrays_p
int template_dimension_of_array_dimension(entity array, int dim)
#define FindArrayDimAlignmentOfArray(array, dim)
#define array_to_template(array)
#define HOST_NAME
Constants.
bool bound_new_host_p(entity)
entity load_new_node(entity)
distribute load_hpf_distribution(entity)
void store_new_node(entity, entity)
bool bound_new_node_p(entity)
align load_hpf_alignment(entity)
entity load_new_host(entity)
void store_new_host(entity, entity)
bool array_distributed_p(entity)
#define current_stmt_head()
We want to keep track of the current statement inside the recurse.
int vect_size(Pvecteur v)
package vecteur - reductions
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define pips_internal_error
#define STATEMENT_ORDERING_UNDEFINED
mapping.h inclusion
string concatenate(const char *,...)
Return the concatenation of the given strings.
#define DEFINE_LOCAL_STACK(name, type)
#define string_undefined_p(s)
struct _newgen_struct_constant_ * constant
void print_expression(expression e)
no file descriptor is passed to make is easier to use in a debugging stage.
static int tc
Internal variables
#define STATEMENT_NUMBER_UNDEFINED
default values
#define entity_variable_p(e)
An entity_variable_p(e) may hide a typedef and hence a functional type.
#define ENTITY_FALSE_P(e)
const char * entity_local_name(entity e)
entity_local_name modified so that it does not core when used in vect_fprint, since someone thought t...
bool local_entity_of_module_p(entity e, entity module)
This test shows that "e" has been declared in "module".
entity AddEntityToModule(entity e, entity module)
!!! caution, it may not be a module, but a common...
entity FindOrCreateEntityLikeModel(const char *package, const char *name, entity model)
hmmm...
bool expression_integer_value(expression e, intptr_t *pval)
expression entity_to_expression(entity e)
if v is a constant, returns a constant call.
bool expression_equal_p(expression e1, expression e2)
Syntactic equality e1==e2.
bool expression_reference_p(expression e)
Test if an expression is a reference.
entity expression_to_entity(expression e)
just returns the entity of an expression, or entity_undefined
dimension entity_ith_dimension(entity, int)
Another semantics would be: is this reference r to e a kill for e? In general, this cannot be answere...
dimension FindIthDimension(entity, int)
int ExpressionToInt(expression)
this function computes the value of an integer constant expression and returns it to the calling func...
void AddEntityToDeclarations(entity, entity)
END_EOLE.
int SizeOfIthDimension(entity, int)
this function returns the size of the ith dimension of a variable e.
int NumberOfDimension(entity)
#define test_domain
newgen_entity_domain_defined
#define normalized_undefined
#define syntax_reference_p(x)
#define syntax_reference(x)
#define normalized_linear_p(x)
#define reference_variable(x)
#define loop_domain
newgen_language_domain_defined
#define statement_ordering(x)
#define dimension_lower(x)
#define statement_domain
newgen_sizeofexpression_domain_defined
#define EXPRESSION(x)
EXPRESSION.
#define instruction_undefined
#define statement_label(x)
@ is_instruction_sequence
#define expression_normalized(x)
#define dimension_upper(x)
#define reference_indices(x)
#define statement_extensions(x)
#define dimension_undefined
#define test_condition(x)
#define statement_instruction(x)
#define statement_comments(x)
#define statement_number(x)
#define normalized_linear(x)
#define expression_syntax(x)
#define statement_undefined
#define STATEMENT(x)
STATEMENT.
#define syntax_domain
newgen_synchronization_domain_defined
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
The structure used to build lists in NewGen.
#define TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
Value vect_coeff(Variable var, Pvecteur vect)
Variable vect_coeff(Variable var, Pvecteur vect): coefficient de coordonnee var du vecteur vect —> So...