PIPS
declarations.c File Reference
#include "defines-local.h"
#include "effects-generic.h"
#include "effects-simple.h"
#include "effects-convex.h"
+ Include dependency graph for declarations.c:

Go to the source code of this file.

Macros

#define STATIC_LIST_OF_HPF_OBJECTS(name, set_name, pred_name)
 in static_controlize More...
 
#define normalized_dimension_p(dim)    (HpfcExpressionToInt(dimension_lower(dim))==1)
 local macros... More...
 

Functions

bool expression_constant_p (expression)
 HPFC module by Fabien COELHO. More...
 
 STATIC_LIST_OF_HPF_OBJECTS (distributed_arrays, set_array_as_distributed, array_distributed_p)
 
list list_of_distributed_arrays_for_module (entity module)
 returns the list of entities that are 'local' to module More...
 
void reset_hpf_object_lists ()
 
void free_hpf_object_lists ()
 
static void init_currents ()
 
void init_hpf_number_status ()
 STANDARS STATIC MANAGEMENT. More...
 
numbers_status get_hpf_number_status ()
 
void reset_hpf_number_status ()
 
void set_hpf_number_status (numbers_status s)
 
void close_hpf_number_status ()
 
void GiveToHpfObjectsTheirNumber ()
 give to hpf objects listed in distributedarrays, templates and processors their number for the code generation... More...
 
expression entity_hpf_number (entity e)
 returns the hpf_number parameter as a string not really needed ??? ??? never called More...
 
tag new_declaration_tag (entity array, int dim)
 
static void create_new_declaration (entity e)
 
static void store_a_new_declaration (entity array, int dim, tag what)
 
void get_ith_dim_new_declaration (entity array, int i, int *pmin, int *pmax)
 
void init_data_status ()
 
data_status get_data_status ()
 
void reset_data_status ()
 
void set_data_status (data_status s)
 
void close_data_status ()
 
static void NormalizeOneTemplateDistribution (distribution d, entity templ, int *templdimp, entity procs, int *procsdimp)
 NormalizeOneTemplateDistribution. More...
 
void normalize_distribute (entity t, distribute d)
 
void normalize_align (_UNUSED_ entity e, align a)
 
void normalize_hpf_object (entity v)
 
void NormalizeHpfDeclarations ()
 
static int ComputeNewSizeOfIthDimension (dimension dim, int i, entity array, tag *newdeclp)
 here the new size of the ith dimension of the given array is computed. More...
 
static void NewDeclarationOfDistributedArray (entity array)
 for node this are reformated, and for host these variables are deleted. More...
 
void NewDeclarationsOfDistributedArrays ()
 this procedure generate the new declarations of every distributed arrays of the program, in order to minimize the amount of memory used. More...
 
static void create_overlaps (entity e)
 
void set_overlap (entity ent, int dim, int side, int width)
 set the overlap value for entity ent, on dimension dim, dans side side to width, which must be a positive integer. More...
 
int get_overlap (entity ent, int dim, int side)
 returns the overlap for a given entity, dimension and side, to be used in the declaration modifications More...
 
static void overlap_redefine_expression (expression *pexpr, int ov)
 redefines the bound given the overlap which is to be included More...
 
static void declaration_with_overlaps (list l)
 
void declaration_with_overlaps_for_module (entity module)
 
static void update_overlaps_of (entity u, entity v)
 
void update_overlaps_in_caller (entity fun, list le)
 the overlaps of the actual parameters are updated according to the formal requirements. More...
 

Variables

static int current_array_index = 1
 
static int current_template_index = 1
 
static int current_processors_index = 1
 

Macro Definition Documentation

◆ normalized_dimension_p

#define normalized_dimension_p (   dim)     (HpfcExpressionToInt(dimension_lower(dim))==1)

local macros...

Definition at line 447 of file declarations.c.

◆ STATIC_LIST_OF_HPF_OBJECTS

#define STATIC_LIST_OF_HPF_OBJECTS (   name,
  set_name,
  pred_name 
)
Value:
static list name = NIL;\
int number_of_##name(){return(gen_length(name));}\
list list_of_##name(){return(name);}\
bool pred_name(entity e){return(gen_in_list_p(e, name));}\
void set_name(entity e){ if (!gen_in_list_p(e, name)){\
name = CONS(ENTITY, e, name); normalize_hpf_object(e);}}
#define NIL
The empty list (nil in Lisp)
Definition: newgen_list.h:47
size_t gen_length(const list l)
Definition: list.c:150
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
Definition: newgen_list.h:150
bool gen_in_list_p(const void *vo, const list lx)
tell whether vo belongs to lx
Definition: list.c:734
void normalize_hpf_object(entity v)
Definition: declarations.c:431
#define ENTITY(x)
ENTITY.
Definition: ri.h:2755
The structure used to build lists in NewGen.
Definition: newgen_list.h:41

in static_controlize

DISTRIBUTED ARRAYS

Definition at line 46 of file declarations.c.

Function Documentation

◆ close_data_status()

void close_data_status ( void  )

Definition at line 339 of file declarations.c.

340 {
341  close_new_declaration();
345 }
void free_hpf_object_lists()
Definition: declarations.c:98
void close_hpf_distribution(void)
void close_hpf_alignment(void)

References close_hpf_alignment(), close_hpf_distribution(), and free_hpf_object_lists().

+ Here is the call graph for this function:

◆ close_hpf_number_status()

void close_hpf_number_status ( void  )

Definition at line 157 of file declarations.c.

158 {
160  init_currents();
161 }
static void init_currents()
Definition: declarations.c:116
void close_hpf_number(void)

References close_hpf_number(), and init_currents().

+ Here is the call graph for this function:

◆ ComputeNewSizeOfIthDimension()

static int ComputeNewSizeOfIthDimension ( dimension  dim,
int  i,
entity  array,
tag newdeclp 
)
static

here the new size of the ith dimension of the given array is computed.

because the declarations are static, there is a majoration of the space required on each processors to held his part of the distributed array.

default: the new declaration is the same as the old one.

looking for the matching alignment...

no alignment => scratching of the dimension...

there is an alignment, but the rate is zero, so the whole dimension has to be declared on every processors, despite the fact that the dimension is mapped on only one element.

looking for the matching distribution... pdim is the corresponding dimension of processors p

no style => scratching of the dimension...

??? should delete the alignment which is not usefull...

alpha case

and now, let's look at the different cases.

beta case

gamma case

??? what about rate==-1 ?

delta case

alpha case, if nothing matches, what shouldn't be the case :

Definition at line 455 of file declarations.c.

460 {
462  entity t = align_template(a);
466  int rate, param, pdim = 1, asize = 0;
467  style st;
468 
469  asize=dimension_size(dim);
470 
471  pips_debug(9, "dimension %d of array %s\n", i, entity_name(array));
472  ifdebug(9)
473  {
474  print_align(a);
475  print_distribute(d);
476  }
477 
478  /* default: the new declaration is the same as the old one.
479  */
480  (*newdeclp) = is_hpf_newdecl_none;
481 
482  /* looking for the matching alignment...
483  */
485 
486  /* no alignment => scratching of the dimension...
487  */
488  if (al==alignment_undefined)
489  {
490  if (!normalized_dimension_p(dim))
491  (*newdeclp) = is_hpf_newdecl_alpha;
492  return(asize);
493  }
494 
495  /* there is an alignment, but the rate is zero, so the whole
496  * dimension has to be declared on every processors, despite the
497  * fact that the dimension is mapped on only one element.
498  */
500  if (rate==0)
501  {
502  if (!normalized_dimension_p(dim))
503  (*newdeclp) = is_hpf_newdecl_alpha;
504  return asize;
505  }
506 
507  /* looking for the matching distribution...
508  * pdim is the corresponding dimension of processors p
509  */
512  &pdim);
513 
514  st=distribution_style(di);
515 
516  /* no style => scratching of the dimension...
517  */
518  if (style_none_p(st))
519  {
520  /* ???
521  * should delete the alignment which is not usefull...
522  */
523  /* alpha case
524  */
525  if (!normalized_dimension_p(dim))
526  (*newdeclp) = is_hpf_newdecl_alpha;
527  return asize;
528  }
529 
530  /* and now, let's look at the different cases.
531  *
532  * beta case
533  */
535 
536  if (style_block_p(st))
537  {
538  int
539  major = iceil(param, abs(rate)),
540  choice = min(asize, major);
541 
542  if (choice==asize)
543  {
544  if (normalized_dimension_p(dim))
545  (*newdeclp) = is_hpf_newdecl_none;
546  else
547  (*newdeclp) = is_hpf_newdecl_alpha;
548  }
549  else
550  (*newdeclp) = is_hpf_newdecl_beta;
551 
552  return choice;
553  }
554 
555  /* gamma case
556  *
557  * ??? what about rate==-1 ?
558  */
559  if (style_cyclic_p(st) && (rate==1))
560  {
561  int
562  psize = SizeOfIthDimension(distribute_processors(d), pdim),
563  major = param * iceil(asize+param-1, param*psize),
564  choice = min(asize, major);
565 
566  if (choice==asize)
567  {
568  if (normalized_dimension_p(dim))
569  (*newdeclp) = is_hpf_newdecl_none;
570  else
571  (*newdeclp) = is_hpf_newdecl_alpha;
572  }
573  else
574  (*newdeclp) = is_hpf_newdecl_gamma;
575 
576  return choice;
577  }
578 
579  /* delta case
580  */
581  if (style_cyclic_p(st))
582  {
583  int
584  absrate = abs(rate),
585  psize = SizeOfIthDimension(distribute_processors(d),pdim),
586  major = (iceil(param, absrate)*
587  iceil(absrate*(asize-1)+param, param*psize)),
588  choice = min(asize, major);
589 
590  if (choice==asize)
591  {
592  if (normalized_dimension_p(dim))
593  (*newdeclp) = is_hpf_newdecl_none;
594  else
595  (*newdeclp) = is_hpf_newdecl_alpha;
596  }
597  else
598  (*newdeclp) = is_hpf_newdecl_delta;
599 
600  return choice;
601  }
602 
603  /* alpha case, if nothing matches, what shouldn't be the case :
604  */
605  if (!normalized_dimension_p(dim))
606  (*newdeclp) = is_hpf_newdecl_alpha;
607  return asize;
608 }
void print_align(align a)
this is a set of functions to help hpfc debugging
Definition: debug-util.c:38
void print_distribute(distribute d)
Definition: debug-util.c:87
#define min(a, b)
#define style_none_p(x)
Definition: hpf.h:259
#define alignment_templatedim(x)
Definition: hpf.h:136
#define alignment_undefined
Definition: hpf.h:108
#define distribution_style(x)
Definition: hpf.h:210
#define align_template(x)
Definition: hpf.h:98
#define align_alignment(x)
Definition: hpf.h:96
#define distribute_distribution(x)
Definition: hpf.h:174
#define alignment_rate(x)
Definition: hpf.h:138
#define distribute_processors(x)
Definition: hpf.h:176
#define distribution_parameter(x)
Definition: hpf.h:212
#define style_block_p(x)
Definition: hpf.h:262
#define style_cyclic_p(x)
Definition: hpf.h:265
#define distribution_undefined
Definition: hpf.h:186
@ is_hpf_newdecl_none
Definition: hpf_private.h:665
@ is_hpf_newdecl_delta
Definition: hpf_private.h:669
@ is_hpf_newdecl_alpha
Definition: hpf_private.h:666
@ is_hpf_newdecl_beta
Definition: hpf_private.h:667
@ is_hpf_newdecl_gamma
Definition: hpf_private.h:668
int HpfcExpressionToInt(expression e)
HpfcExpressionToInt(e)
Definition: hpfc-util.c:569
alignment FindAlignmentOfDim(list lal, int dim)
Definition: hpfc-util.c:377
distribution FindDistributionOfDim(list ldi, int dim, int *pdim)
Definition: hpfc-util.c:401
#define normalized_dimension_p(dim)
local macros...
Definition: declarations.c:447
#define iceil(a, b)
integer ceiling function
distribute load_hpf_distribution(entity)
align load_hpf_alignment(entity)
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
Definition: misc-local.h:145
int dimension_size(dimension)
this function computes the size of a dimension.
Definition: size.c:491
int SizeOfIthDimension(entity, int)
this function returns the size of the ith dimension of a variable e.
Definition: size.c:453
#define entity_name(x)
Definition: ri.h:2790
#define ifdebug(n)
Definition: sg.c:47
static entity array
Definition: replace.c:135
#define abs(v)
Definition: syntax-local.h:48
static Panel_item choice
Definition: xv_schoose2.c:54

References abs, align_alignment, align_template, alignment_rate, alignment_templatedim, alignment_undefined, array, choice, dimension_size(), distribute_distribution, distribute_processors, distribution_parameter, distribution_style, distribution_undefined, entity_name, FindAlignmentOfDim(), FindDistributionOfDim(), HpfcExpressionToInt(), iceil, ifdebug, is_hpf_newdecl_alpha, is_hpf_newdecl_beta, is_hpf_newdecl_delta, is_hpf_newdecl_gamma, is_hpf_newdecl_none, load_hpf_alignment(), load_hpf_distribution(), min, normalized_dimension_p, pips_debug, print_align(), print_distribute(), SizeOfIthDimension(), style_block_p, style_cyclic_p, and style_none_p.

Referenced by NewDeclarationOfDistributedArray().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create_new_declaration()

static void create_new_declaration ( entity  e)
static

Definition at line 248 of file declarations.c.

250 {
251  type t = entity_type(e);
252  list l = NIL;
253  int ndim;
254 
255  pips_assert("variable", type_variable_p(t));
256 
258 
259  for(; ndim>0; ndim--)
261 
262  store_new_declaration(e, make_hpf_newdecls(l));
263 }
hpf_newdecl make_hpf_newdecl(enum hpf_newdecl_utype tag, void *val)
Definition: hpf_private.c:542
hpf_newdecls make_hpf_newdecls(list a)
Definition: hpf_private.c:599
#define HPF_NEWDECL(x)
HPF_NEWDECL.
Definition: hpf_private.h:644
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
Definition: misc-local.h:172
#define UU
Definition: newgen_types.h:98
#define type_variable(x)
Definition: ri.h:2949
#define variable_dimensions(x)
Definition: ri.h:3122
#define entity_type(x)
Definition: ri.h:2792
#define type_variable_p(x)
Definition: ri.h:2947

References CONS, entity_type, gen_length(), HPF_NEWDECL, is_hpf_newdecl_none, make_hpf_newdecl(), make_hpf_newdecls(), NIL, pips_assert, type_variable, type_variable_p, UU, and variable_dimensions.

Referenced by store_a_new_declaration().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create_overlaps()

static void create_overlaps ( entity  e)
static

Definition at line 693 of file declarations.c.

694 {
695  type t = entity_type(e);
696  list o=NIL;
697  int n;
698 
699  pips_assert("variable", type_variable_p(t));
700 
702  for(; n>=1; n--) o = CONS(OVERLAP, make_overlap(0, 0), o);
703 
704  store_overlap_status(e, o);
705 
706  pips_assert("overlap stored", bound_overlap_status_p(e));
707 }
overlap make_overlap(intptr_t a1, intptr_t a2)
Definition: hpf_private.c:740
#define OVERLAP(x)
OVERLAP.
Definition: hpf_private.h:826
void store_overlap_status(entity, list)
bool bound_overlap_status_p(entity)

References bound_overlap_status_p(), CONS, entity_type, gen_length(), make_overlap(), NIL, OVERLAP, pips_assert, store_overlap_status(), type_variable, type_variable_p, and variable_dimensions.

Referenced by get_overlap(), and set_overlap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ declaration_with_overlaps()

static void declaration_with_overlaps ( list  l)
static

arguments are passed the declarations from outside

??? memory leak

Definition at line 780 of file declarations.c.

782 {
783  entity ent;
784  int ndim, i, lower_overlap, upper_overlap;
785  dimension the_dim;
786 
787  MAP(ENTITY, oldent,
788  {
789  ent = load_new_node(oldent);
790  ndim = variable_entity_dimension(ent);
791 
792  pips_assert("variable", type_variable_p(entity_type(ent)));
793 
795  {
796  /* arguments are passed the declarations from outside
797  */
798  for (i=1 ; i<=ndim ; i++)
799  {
800  if (ith_dim_overlapable_p(oldent, i))
801  {
802  the_dim = entity_ith_dimension(ent, i);
803  dimension_lower(the_dim) = /* ??? memory leak */
804  hpfc_array_bound(ent, false, i);
805  dimension_upper(the_dim) =
806  hpfc_array_bound(ent, true, i);
807  }
808  }
809  }
810  else
811  {
812  for (i=1 ; i<=ndim ; i++)
813  {
814  the_dim = entity_ith_dimension(ent, i);
815  lower_overlap = get_overlap(oldent, i, 0);
816  upper_overlap = get_overlap(oldent, i, 1);
817 
818  pips_debug(8, "%s(DIM=%d): -%d, +%d\n",
819  entity_name(ent), i, lower_overlap, upper_overlap);
820 
821  if (lower_overlap!=0)
823  -lower_overlap);
824 
825  if (upper_overlap!=0)
827  upper_overlap);
828  }
829  }
830  },
831  l);
832 }
#define MAP(_map_CASTER, _map_item, _map_code, _map_list)
Apply/map an instruction block on all the elements of a list (old fashioned)
Definition: newgen_list.h:226
bool ith_dim_overlapable_p(entity array, int i)
Definition: hpfc-util.c:178
int get_overlap(entity ent, int dim, int side)
returns the overlap for a given entity, dimension and side, to be used in the declaration modificatio...
Definition: declarations.c:743
static void overlap_redefine_expression(expression *pexpr, int ov)
redefines the bound given the overlap which is to be included
Definition: declarations.c:761
entity load_new_node(entity)
expression hpfc_array_bound(entity, bool, int)
Definition: run-time.c:516
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...
Definition: variable.c:1228
int variable_entity_dimension(entity)
variable_entity_dimension(entity v): returns the dimension of variable v; scalar have dimension 0.
Definition: variable.c:1293
#define storage_formal_p(x)
Definition: ri.h:2522
#define dimension_lower(x)
Definition: ri.h:980
#define entity_storage(x)
Definition: ri.h:2794
#define dimension_upper(x)
Definition: ri.h:982

References dimension_lower, dimension_upper, ENTITY, entity_ith_dimension(), entity_name, entity_storage, entity_type, get_overlap(), hpfc_array_bound(), ith_dim_overlapable_p(), load_new_node(), MAP, overlap_redefine_expression(), pips_assert, pips_debug, storage_formal_p, type_variable_p, and variable_entity_dimension().

Referenced by declaration_with_overlaps_for_module().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ declaration_with_overlaps_for_module()

void declaration_with_overlaps_for_module ( entity  module)
Parameters
moduleodule

Definition at line 835 of file declarations.c.

836 {
839  gen_free_list(l);
840 }
void gen_free_list(list l)
free the spine of the list
Definition: list.c:327
static void declaration_with_overlaps(list l)
Definition: declarations.c:780
list list_of_distributed_arrays_for_module(entity module)
returns the list of entities that are 'local' to module
Definition: declarations.c:72
static char * module
Definition: pips.c:74

References declaration_with_overlaps(), gen_free_list(), list_of_distributed_arrays_for_module(), and module.

Referenced by compile_common(), and compile_module().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_hpf_number()

expression entity_hpf_number ( entity  e)

returns the hpf_number parameter as a string not really needed ??? ??? never called

Definition at line 196 of file declarations.c.

198 {
199  storage
200  s = entity_storage(e);
201  bool
202  in_common = entity_in_common_p(e),
203  in_ram = storage_ram_p(s);
204  ram
205  r = (in_ram ? storage_ram(s) : ram_undefined);
206  const char* suffix = entity_local_name(e),
207  *prefix =
208  (in_ram ?
209  entity_local_name(in_common ? ram_section(r) : ram_function(r)) :
210  "DEFAULT");
211 
212  pips_assert("ram variable", entity_variable_p(e) && in_ram);
213 
215  (strdup(concatenate("n_", prefix, "_", suffix, NULL))));
216 
217 }
expression MakeCharacterConstantExpression(string s)
END_EOLE.
Definition: constant.c:573
string concatenate(const char *,...)
Return the concatenation of the given strings.
Definition: string.c:183
static const char * prefix
#define entity_variable_p(e)
An entity_variable_p(e) may hide a typedef and hence a functional type.
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...
Definition: entity.c:453
bool entity_in_common_p(entity e)
Definition: entity.c:1082
#define ram_undefined
Definition: ri.h:2221
#define storage_ram_p(x)
Definition: ri.h:2519
#define ram_section(x)
Definition: ri.h:2249
#define storage_ram(x)
Definition: ri.h:2521
#define ram_function(x)
Definition: ri.h:2247
char * strdup()

References concatenate(), entity_in_common_p(), entity_local_name(), entity_storage, entity_variable_p, MakeCharacterConstantExpression(), pips_assert, prefix, ram_function, ram_section, ram_undefined, storage_ram, storage_ram_p, and strdup().

+ Here is the call graph for this function:

◆ expression_constant_p()

bool expression_constant_p ( expression  exp)

HPFC module by Fabien COELHO.

new declarations compilation. normalization of HPF declarations.

HPFC module by Fabien COELHO.

bool expression_constant_p(expression exp) Returns true if "exp" is an (integer) constant value.

Note : A negativePositive constant can be represented with a call to the unary minus/plus intrinsic function upon a positive value.

See below extended_expression_constant_p() for a more general function.

Definition at line 2453 of file expression.c.

2454 {
2456 }
constant expression_constant(expression exp)
This function returns a "constant" object if the expression is a constant such as 10,...
Definition: expression.c:2347
#define constant_undefined_p(x)
Definition: ri.h:803
#define exp
Avoid some warnings from "gcc -Wshadow".
Definition: vasnprintf.c:207

References constant_undefined_p, exp, and expression_constant().

Referenced by add_const_expr_p(), analyze_expression(), array_indices_check(), array_size_stride(), atom_cse_expression(), atomize_this_expression(), compute_final_index_value(), constant_step_loop_p(), constraints_to_loop_bound(), do_loop_expansion(), do_loop_expansion_init(), do_solve_hardware_constraints_on_volume(), effect_field_dimension_entity(), equal_must_vreference(), expression_plusplus(), expression_try_find_size(), formal_variable_add_aliases(), freia_insert_added_stats(), incrementation_expression_to_increment(), inline_expression_call(), loop_annotate(), loop_normalize_of_loop(), make_loadsave_statement(), make_max_exp(), make_send_receive_conversion(), MakeCaseStatement(), MakeEquivAtom(), malloc_arg_to_type(), normalizable_loop_p(), opkill_may_vreference(), opkill_must_vreference(), overlap_redefine_expression(), plc_make_dim(), points_to_compare_cell(), points_to_compare_cells(), points_to_compare_location(), points_to_compare_ptr_cell(), process_true_call_stat(), rational_op_exp(), replace_subscript(), size_of_dummy_array(), sp_feautrier_expression_p(), splc_feautrier_expression_p(), stmt_bdt_directions(), subscript_value(), terapixify_loops(), valuer(), and words_dimension().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ free_hpf_object_lists()

void free_hpf_object_lists ( void  )

Definition at line 98 of file declarations.c.

99 {
100  gen_free_list(distributed_arrays),
101  gen_free_list(templates),
102  gen_free_list(processors);
103 
105 }
void reset_hpf_object_lists()
Definition: declarations.c:91

References gen_free_list(), and reset_hpf_object_lists().

Referenced by close_data_status().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_data_status()

data_status get_data_status ( void  )

??? previsous data_status lost: memory leak

Definition at line 308 of file declarations.c.

309 {
310  /* ??? previsous data_status lost: memory leak
311  */
312  return(make_data_status(get_new_declaration(),
317  list_of_processors()));
318 }
data_status make_data_status(newdeclmap a1, alignmap a2, distributemap a3, list a4, list a5, list a6)
Definition: hpf_private.c:109
list list_of_processors(void)
list list_of_templates(void)
alignmap get_hpf_alignment(void)
distributemap get_hpf_distribution(void)
list list_of_distributed_arrays(void)

References get_hpf_alignment(), get_hpf_distribution(), list_of_distributed_arrays(), list_of_processors(), list_of_templates(), and make_data_status().

Referenced by init_hpfc_status(), and save_hpfc_status().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_hpf_number_status()

numbers_status get_hpf_number_status ( void  )

Definition at line 134 of file declarations.c.

135 {
140 }
numbers_status make_numbers_status(entity_int a1, intptr_t a2, intptr_t a3, intptr_t a4)
Definition: hpf_private.c:698
static int current_template_index
Definition: declarations.c:113
static int current_array_index
Definition: declarations.c:112
static int current_processors_index
Definition: declarations.c:114
entity_int get_hpf_number(void)

References current_array_index, current_processors_index, current_template_index, get_hpf_number(), and make_numbers_status().

Referenced by init_hpfc_status(), and save_hpfc_status().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_ith_dim_new_declaration()

void get_ith_dim_new_declaration ( entity  array,
int  i,
int pmin,
int pmax 
)
Parameters
arrayrray
pminmin
pmaxmax

Definition at line 285 of file declarations.c.

288 {
290 
291  pips_assert("distributed array",
293 
296 }
bool array_distributed_p(entity)

References array, array_distributed_p(), dimension_lower, dimension_upper, entity_ith_dimension(), entity_variable_p, HpfcExpressionToInt(), load_new_node(), and pips_assert.

Referenced by hpfc_compute_entity_to_new_declaration().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_overlap()

int get_overlap ( entity  ent,
int  dim,
int  side 
)

returns the overlap for a given entity, dimension and side, to be used in the declaration modifications

Parameters
entnt
dimim
sideide

Definition at line 743 of file declarations.c.

746 {
747  overlap o;
748 
749  pips_assert("valid dimension", dim>0);
750  pips_debug(10, "%s (DIM=%d) %s\n", entity_name(ent), dim, side?"+":"-");
751 
752  if (!bound_overlap_status_p(ent)) create_overlaps(ent);
753  pips_assert("overlap ok", bound_overlap_status_p(ent));
754 
755  o = OVERLAP(gen_nth(dim-1, load_overlap_status(ent)));
756  return(side ? overlap_upper(o) : overlap_lower(o));
757 }
gen_chunk gen_nth(int n, const list l)
to be used as ENTITY(gen_nth(3, l))...
Definition: list.c:710
#define overlap_lower(x)
Definition: hpf_private.h:856
#define overlap_upper(x)
Definition: hpf_private.h:858
static void create_overlaps(entity e)
Definition: declarations.c:693
list load_overlap_status(entity)

References bound_overlap_status_p(), create_overlaps(), entity_name, gen_nth(), load_overlap_status(), OVERLAP, overlap_lower, overlap_upper, pips_assert, and pips_debug.

Referenced by declaration_with_overlaps(), and update_overlaps_of().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GiveToHpfObjectsTheirNumber()

void GiveToHpfObjectsTheirNumber ( void  )

give to hpf objects listed in distributedarrays, templates and processors their number for the code generation...

Definition at line 166 of file declarations.c.

167 {
168  pips_debug(7, "Here I am!\n");
169 
170  MAP(ENTITY, e,
171  {
172  if (!bound_hpf_number_p(e))
174  },
175  distributed_arrays);
176 
177  MAP(ENTITY, e,
178  {
179  if (!bound_hpf_number_p(e))
181  },
182  templates);
183 
184  MAP(ENTITY, e,
185  {
186  if (!bound_hpf_number_p(e))
188  },
189  processors);
190 }
bool bound_hpf_number_p(entity)
void store_hpf_number(entity, intptr_t)

References bound_hpf_number_p(), current_array_index, current_processors_index, current_template_index, ENTITY, MAP, pips_debug, and store_hpf_number().

Referenced by NormalizeHpfDeclarations().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init_currents()

static void init_currents ( )
static

Definition at line 116 of file declarations.c.

117 {
121 }

References current_array_index, current_processors_index, and current_template_index.

Referenced by close_hpf_number_status(), init_hpf_number_status(), and reset_hpf_number_status().

+ Here is the caller graph for this function:

◆ init_data_status()

void init_data_status ( void  )

Definition at line 300 of file declarations.c.

301 {
302  init_new_declaration();
306 }
void init_hpf_alignment(void)
void init_hpf_distribution(void)

References init_hpf_alignment(), init_hpf_distribution(), and reset_hpf_object_lists().

Referenced by init_hpfc_status().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init_hpf_number_status()

void init_hpf_number_status ( void  )

STANDARS STATIC MANAGEMENT.

functions: {init,get,set,reset,close}_hpf_number_status

Definition at line 128 of file declarations.c.

129 {
130  init_hpf_number();
131  init_currents();
132 }
void init_hpf_number(void)

References init_currents(), and init_hpf_number().

Referenced by init_hpfc_status().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ list_of_distributed_arrays_for_module()

list list_of_distributed_arrays_for_module ( entity  module)

returns the list of entities that are 'local' to module

Parameters
moduleodule

Definition at line 72 of file declarations.c.

74 {
75  list l = NIL;
76 
77  MAP(ENTITY, e,
78  {
79  if (hpfc_main_entity(e)==module) l = CONS(ENTITY, e, l);
80  },
82 
83  return(l);
84 }
entity hpfc_main_entity(entity)
returns the entity to which e is attached, that is first a common, then a function....
Definition: run-time.c:462

References CONS, ENTITY, hpfc_main_entity(), list_of_distributed_arrays(), MAP, module, and NIL.

Referenced by create_init_common_param_for_arrays(), create_parameters_h(), declaration_with_overlaps_for_module(), and root_statement_remapping_inits().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ new_declaration_tag()

tag new_declaration_tag ( entity  array,
int  dim 
)
Parameters
arrayrray
dimim

Definition at line 229 of file declarations.c.

232 {
233  tag t;
234 
235  pips_assert("valid dimension and distributed array",
236  dim>0 && dim<=7 && array_distributed_p(array));
237 
238  t = hpf_newdecl_tag
239  (HPF_NEWDECL(gen_nth(dim-1,
240  hpf_newdecls_dimensions(load_new_declaration(array)))));
241 
242  pips_debug(1, "%s[%d]: %d\n", entity_name(array), dim, t);
243 
244  return(t);
245 }
#define hpf_newdecls_dimensions(x)
Definition: hpf_private.h:739
#define hpf_newdecl_tag(x)
Definition: hpf_private.h:692
int tag
TAG.
Definition: newgen_types.h:92

References array, array_distributed_p(), entity_name, gen_nth(), HPF_NEWDECL, hpf_newdecl_tag, hpf_newdecls_dimensions, pips_assert, and pips_debug.

Referenced by block_distributed_p(), create_init_common_param_for_arrays(), expr_compute_local_index(), and hpfc_compute_entity_to_new_declaration().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NewDeclarationOfDistributedArray()

static void NewDeclarationOfDistributedArray ( entity  array)
static

for node this are reformated, and for host these variables are deleted.

it may happen that no newarray is available, when a module with no distributed variables is considered...

compute the new size for every dimension on the array, then update the dimensions of the newarray. remember that the dimensions are shared between the old and new arrays.

Definition at line 615 of file declarations.c.

617 {
618  entity newarray;
619  int ithdim = 1, newsz, p;
620  tag newdecl;
621  list ld = NIL;
622 
623  /* it may happen that no newarray is available,
624  * when a module with no distributed variables is considered...
625  */
626  if (!bound_new_node_p(array)) return;
627  newarray = load_new_node(array);
628  pips_assert("distributed array",
630 
631  pips_debug(6, "considering array %s, new %s\n",
632  entity_name(array), entity_name(newarray));
633 
634  /* compute the new size for every dimension on the array,
635  * then update the dimensions of the newarray. remember
636  * that the dimensions are shared between the old and new arrays.
637  */
638  MAP(DIMENSION, dim,
639  {
640  if (ith_dim_distributed_p(array, ithdim, &p))
641  {
642  newsz = ComputeNewSizeOfIthDimension(dim, ithdim, array, &newdecl);
643 
644  pips_debug(8, "dimension %d new size: %d\n", ithdim, newsz);
645 
646  ld = gen_nconc(ld,
647  CONS(DIMENSION,
649  int_to_expression(newsz),
650  NIL),
651  NIL));
652 
653  }
654  else
655  {
656  pips_debug(8, "dimension %d isn't touched\n", ithdim);
657 
658  newdecl = is_hpf_newdecl_none;
659  ld = gen_nconc(ld, CONS(DIMENSION, copy_dimension(dim), NIL));
660  }
661 
662  store_a_new_declaration(array, ithdim, newdecl);
663 
664  ithdim++;
665  },
667 
669 }
dimension make_dimension(expression a1, expression a2, list a3)
Definition: ri.c:565
dimension copy_dimension(dimension p)
DIMENSION.
Definition: ri.c:529
list gen_nconc(list cp1, list cp2)
physically concatenates CP1 and CP2 but do not duplicates the elements
Definition: list.c:344
bool ith_dim_distributed_p(entity array, int i, int *pprocdim)
whether a dimension is distributed or not.
Definition: hpfc-util.c:160
static int ComputeNewSizeOfIthDimension(dimension dim, int i, entity array, tag *newdeclp)
here the new size of the ith dimension of the given array is computed.
Definition: declarations.c:455
static void store_a_new_declaration(entity array, int dim, tag what)
Definition: declarations.c:266
bool bound_new_node_p(entity)
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
Definition: expression.c:1188

References array, array_distributed_p(), bound_new_node_p(), ComputeNewSizeOfIthDimension(), CONS, copy_dimension(), DIMENSION, entity_name, entity_type, entity_variable_p, gen_nconc(), int_to_expression(), is_hpf_newdecl_none, ith_dim_distributed_p(), load_new_node(), make_dimension(), MAP, NIL, pips_assert, pips_debug, store_a_new_declaration(), type_variable, and variable_dimensions.

Referenced by NewDeclarationsOfDistributedArrays().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NewDeclarationsOfDistributedArrays()

void NewDeclarationsOfDistributedArrays ( void  )

this procedure generate the new declarations of every distributed arrays of the program, in order to minimize the amount of memory used.

The new declarations have to be suitable for the new index computation which is to be done dynamically...

Definition at line 676 of file declarations.c.

677 {
678  MAP(ENTITY, array,
679  {
680  if (!bound_new_declaration_p(array))
682  else
683  pips_debug(3, "skipping array %s\n", entity_name(array));
684  },
686 }
static void NewDeclarationOfDistributedArray(entity array)
for node this are reformated, and for host these variables are deleted.
Definition: declarations.c:615

References array, ENTITY, entity_name, list_of_distributed_arrays(), MAP, NewDeclarationOfDistributedArray(), and pips_debug.

Referenced by init_host_and_node_entities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ normalize_align()

void normalize_align ( _UNUSED_ entity  e,
align  a 
)

Definition at line 426 of file declarations.c.

427 {
429 }
void normalize_first_expressions_of(void *obj)
Definition: normalize.c:694

References normalize_first_expressions_of().

Referenced by one_align_directive().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ normalize_distribute()

void normalize_distribute ( entity  t,
distribute  d 
)

of distribution

Definition at line 408 of file declarations.c.

411 {
413  list /* of distribution */ ld = distribute_distribution(d);
414  int tdim = 1, pdim = 1;
415 
417 
418  MAP(DISTRIBUTION, di,
419  NormalizeOneTemplateDistribution(di, t, &tdim, p, &pdim), ld);
420 
421  if ((pdim-1)!=NumberOfDimension(p))
422  pips_user_error("%s not enough distributions\n", entity_name(t));
423 
424 }
#define DISTRIBUTION(x)
DISTRIBUTION.
Definition: hpf.h:180
static void NormalizeOneTemplateDistribution(distribution d, entity templ, int *templdimp, entity procs, int *procsdimp)
NormalizeOneTemplateDistribution.
Definition: declarations.c:352
#define pips_user_error
Definition: misc-local.h:147
int NumberOfDimension(entity)
Definition: size.c:588

References distribute_distribution, distribute_processors, DISTRIBUTION, entity_name, MAP, normalize_first_expressions_of(), NormalizeOneTemplateDistribution(), NumberOfDimension(), and pips_user_error.

Referenced by one_distribute_directive().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ normalize_hpf_object()

void normalize_hpf_object ( entity  v)

Definition at line 431 of file declarations.c.

433 {
435 }

References entity_type, and normalize_first_expressions_of().

+ Here is the call graph for this function:

◆ NormalizeHpfDeclarations()

void NormalizeHpfDeclarations ( void  )

Definition at line 437 of file declarations.c.

438 {
440  ifdebug(8){print_hpf_dir();}
441 }
void print_hpf_dir(void)
Definition: debug-util.c:121
void GiveToHpfObjectsTheirNumber()
give to hpf objects listed in distributedarrays, templates and processors their number for the code g...
Definition: declarations.c:166

References GiveToHpfObjectsTheirNumber(), ifdebug, and print_hpf_dir().

Referenced by compile_module().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NormalizeOneTemplateDistribution()

static void NormalizeOneTemplateDistribution ( distribution  d,
entity  templ,
int templdimp,
entity  procs,
int procsdimp 
)
static

NormalizeOneTemplateDistribution.

compute the missing value, in case of BLOCK distribution

check the given value

Definition at line 352 of file declarations.c.

356 {
358  (*templdimp)++;
359  else
360  {
361  int szoftempldim = SizeOfIthDimension(templ,(*templdimp)),
362  szofprocsdim = SizeOfIthDimension(procs,(*procsdimp));
363 
365  {
366  /* compute the missing value, in case of BLOCK distribution
367  */
368 
369  switch(style_tag(distribution_style(d)))
370  {
371  case is_style_block:
373  int_to_expression(iceil(szoftempldim, szofprocsdim));
374  break;
375  default:
376  pips_internal_error("undefined style tag");
377  break;
378  }
379  }
380  else
381  {
382  /* check the given value
383  */
384 
385  int paramvalue = HpfcExpressionToInt(distribution_parameter(d));
386 
387  switch(style_tag(distribution_style(d)))
388  {
389  case is_style_block:
390  {
391  int minvalue = iceil(szoftempldim, szofprocsdim);
392 
393  if (paramvalue<minvalue)
394  pips_user_error("block too small in %s distribution\n",
395  entity_name(templ));
396  break;
397  }
398  default:
399  break;
400  }
401  }
402 
403  (*templdimp)++;
404  (*procsdimp)++;
405  }
406 }
#define style_tag(x)
Definition: hpf.h:258
@ is_style_block
Definition: hpf.h:238
#define pips_internal_error
Definition: misc-local.h:149
#define expression_undefined
Definition: ri.h:1223

References distribution_parameter, distribution_style, entity_name, expression_undefined, HpfcExpressionToInt(), iceil, int_to_expression(), is_style_block, pips_internal_error, pips_user_error, SizeOfIthDimension(), style_none_p, and style_tag.

Referenced by normalize_distribute().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ overlap_redefine_expression()

static void overlap_redefine_expression ( expression pexpr,
int  ov 
)
static

redefines the bound given the overlap which is to be included

this avoid a memory leak

Definition at line 761 of file declarations.c.

764 {
765  expression
766  copy = *pexpr;
767 
768  if (expression_constant_p(*pexpr))
769  {
770  *pexpr = int_to_expression(HpfcExpressionToInt(*pexpr)+ov);
771  free_expression(copy); /* this avoid a memory leak */
772  }
773  else
776  *pexpr,
777  int_to_expression(ov));
778 }
void free_expression(expression p)
Definition: ri.c:853
bool expression_constant_p(expression)
HPFC module by Fabien COELHO.
Definition: expression.c:2453
#define TOP_LEVEL_MODULE_NAME
Module containing the global variables in Fortran and C.
Definition: naming-local.h:101
#define PLUS_OPERATOR_NAME
entity FindOrCreateEntity(const char *package, const char *local_name)
Problem: A functional global entity may be referenced without parenthesis or CALL keyword in a functi...
Definition: entity.c:1586
expression MakeBinaryCall(entity f, expression eg, expression ed)
Creates a call expression to a function with 2 arguments.
Definition: expression.c:354

References expression_constant_p(), FindOrCreateEntity(), free_expression(), HpfcExpressionToInt(), int_to_expression(), MakeBinaryCall(), PLUS_OPERATOR_NAME, and TOP_LEVEL_MODULE_NAME.

Referenced by declaration_with_overlaps().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reset_data_status()

void reset_data_status ( void  )

Definition at line 320 of file declarations.c.

321 {
322  reset_new_declaration();
326 }
void reset_hpf_alignment(void)
void reset_hpf_distribution(void)

References reset_hpf_alignment(), reset_hpf_distribution(), and reset_hpf_object_lists().

Referenced by reset_hpfc_status().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reset_hpf_number_status()

void reset_hpf_number_status ( void  )

Definition at line 142 of file declarations.c.

143 {
145  init_currents();
146 }
void reset_hpf_number(void)

References init_currents(), and reset_hpf_number().

Referenced by reset_hpfc_status().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reset_hpf_object_lists()

void reset_hpf_object_lists ( void  )

Definition at line 91 of file declarations.c.

92 {
93  distributed_arrays = NIL,
94  templates = NIL,
95  processors = NIL;
96 }

References NIL.

Referenced by free_hpf_object_lists(), init_data_status(), and reset_data_status().

+ Here is the caller graph for this function:

◆ set_data_status()

void set_data_status ( data_status  s)

Definition at line 328 of file declarations.c.

330 {
331  set_new_declaration(data_status_newdeclmap(s));
334  distributed_arrays = data_status_arrays(s);
335  templates = data_status_templates(s);
336  processors = data_status_processors(s);
337 }
#define data_status_templates(x)
Definition: hpf_private.h:297
#define data_status_alignmap(x)
Definition: hpf_private.h:291
#define data_status_processors(x)
Definition: hpf_private.h:299
#define data_status_distributemap(x)
Definition: hpf_private.h:293
#define data_status_newdeclmap(x)
Definition: hpf_private.h:289
#define data_status_arrays(x)
Definition: hpf_private.h:295
void set_hpf_distribution(distributemap)
void set_hpf_alignment(alignmap)

References data_status_alignmap, data_status_arrays, data_status_distributemap, data_status_newdeclmap, data_status_processors, data_status_templates, set_hpf_alignment(), and set_hpf_distribution().

Referenced by load_hpfc_status().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_hpf_number_status()

void set_hpf_number_status ( numbers_status  s)

Definition at line 148 of file declarations.c.

150 {
155 }
#define numbers_status_arrays(x)
Definition: hpf_private.h:818
#define numbers_status_processors(x)
Definition: hpf_private.h:822
#define numbers_status_templates(x)
Definition: hpf_private.h:820
#define numbers_status_numbermap(x)
Definition: hpf_private.h:816
void set_hpf_number(entity_int)

References current_array_index, current_processors_index, current_template_index, numbers_status_arrays, numbers_status_numbermap, numbers_status_processors, numbers_status_templates, and set_hpf_number().

Referenced by load_hpfc_status().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_overlap()

void set_overlap ( entity  ent,
int  dim,
int  side,
int  width 
)

set the overlap value for entity ent, on dimension dim, dans side side to width, which must be a positive integer.

if necessary, the overlap is updates with the value width.

upper

lower

Parameters
entnt
dimim
sideide
widthidth

Definition at line 713 of file declarations.c.

716 {
717  overlap o;
718  int current;
719 
720  pips_assert("valid dimension", dim>0);
721 
722  pips_debug(10, "%s:(DIM=%d) %s%d\n",
723  entity_name(ent), dim, side?"+":"-", width);
724 
725  if (!bound_overlap_status_p(ent)) create_overlaps(ent);
726  o = OVERLAP(gen_nth(dim-1, load_overlap_status(ent)));
727 
728  if (side) /* upper */
729  {
730  current = overlap_upper(o);
731  if (current<width) overlap_upper(o)=width;
732  }
733  else /* lower */
734  {
735  current = overlap_lower(o);
736  if (current<width) overlap_lower(o)=width;
737  }
738 }
static size_t current
Definition: string.c:115

References bound_overlap_status_p(), create_overlaps(), current, entity_name, gen_nth(), load_overlap_status(), OVERLAP, overlap_lower, overlap_upper, pips_assert, and pips_debug.

Referenced by message_manageable_p(), and update_overlaps_of().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ STATIC_LIST_OF_HPF_OBJECTS()

STATIC_LIST_OF_HPF_OBJECTS ( distributed_arrays  ,
set_array_as_distributed  ,
array_distributed_p   
)

Definition at line 54 of file declarations.c.

59 {
60  bool
61  distributed =
62  (array_distributed_p(e) ||
65  in_common = entity_in_common_p(e);
66 
67  return(distributed && in_common);
68 }
entity load_old_node(entity)
entity load_old_host(entity)

References array_distributed_p(), entity_in_common_p(), load_old_host(), and load_old_node().

+ Here is the call graph for this function:

◆ store_a_new_declaration()

static void store_a_new_declaration ( entity  array,
int  dim,
tag  what 
)
static

Definition at line 266 of file declarations.c.

270 {
271  hpf_newdecl n;
272 
273  pips_assert("valid dimension and distributed array",
274  dim>0 && dim<=7 && array_distributed_p(array));
275 
276  if (!bound_new_declaration_p(array))
278 
279  n = HPF_NEWDECL(gen_nth(dim-1,
280  hpf_newdecls_dimensions(load_new_declaration(array))));
281 
282  hpf_newdecl_tag(n) = what;
283 }
static void create_new_declaration(entity e)
Definition: declarations.c:248

References array, array_distributed_p(), create_new_declaration(), gen_nth(), HPF_NEWDECL, hpf_newdecl_tag, hpf_newdecls_dimensions, and pips_assert.

Referenced by NewDeclarationOfDistributedArray().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update_overlaps_in_caller()

void update_overlaps_in_caller ( entity  fun,
list  le 
)

the overlaps of the actual parameters are updated according to the formal requirements.

Parameters
funun
lethe function of expression call arguments in the initial code

Definition at line 864 of file declarations.c.

867 {
868  int len = gen_length(le), i;
869  for (i=1; i<=len; i++, POP(le))
870  {
871  entity v = find_ith_parameter(fun, i);
872  if (array_distributed_p(v))
873  {
874  expression e = EXPRESSION(CAR(le));
875  entity u = expression_to_entity(e), nu;
876  pips_assert("bounded to a new var", bound_new_node_p(u));
877  nu = load_new_node(u);
878  pips_debug(5, "call to %s, %s (%s) -> %s\n",
879  entity_name(fun), entity_name(u),
880  entity_name(nu), entity_name(v));
881  update_overlaps_of(u, v);
882  }
883 
884  }
885 }
#define POP(l)
Modify a list pointer to point on the next element of the list.
Definition: newgen_list.h:59
#define CAR(pcons)
Get the value of the first element of a list.
Definition: newgen_list.h:92
static void update_overlaps_of(entity u, entity v)
Definition: declarations.c:843
entity expression_to_entity(expression e)
just returns the entity of an expression, or entity_undefined
Definition: expression.c:3140
entity find_ith_parameter(entity, int)
Definition: util.c:93
#define EXPRESSION(x)
EXPRESSION.
Definition: ri.h:1217

References array_distributed_p(), bound_new_node_p(), CAR, entity_name, EXPRESSION, expression_to_entity(), find_ith_parameter(), gen_length(), load_new_node(), pips_assert, pips_debug, POP, and update_overlaps_of().

Referenced by hpf_compile_call().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update_overlaps_of()

static void update_overlaps_of ( entity  u,
entity  v 
)
static
Parameters
udistributed variable in the caller
vformal parameter in the callee

Definition at line 843 of file declarations.c.

846 {
847  int ndim = NumberOfDimension(v);
848 
849  pips_assert("conformance", ndim==NumberOfDimension(u));
850 
851  pips_debug(7, "%s from %s\n", entity_name(u), entity_name(v));
852 
853  for(; ndim>0; ndim--)
854  {
855  set_overlap(u, ndim, 0, get_overlap(v, ndim, 0));
856  set_overlap(u, ndim, 1, get_overlap(v, ndim, 1));
857  }
858 }
void set_overlap(entity ent, int dim, int side, int width)
set the overlap value for entity ent, on dimension dim, dans side side to width, which must be a posi...
Definition: declarations.c:713

References entity_name, get_overlap(), NumberOfDimension(), pips_assert, pips_debug, and set_overlap().

Referenced by update_overlaps_in_caller().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ current_array_index

int current_array_index = 1
static

◆ current_processors_index

int current_processors_index = 1
static

◆ current_template_index

int current_template_index = 1
static