25 #include "pips_config.h"
235 prod, t1, the_mod, t2;
282 expr1, expr2, expr));
291 expr1, expr2, expr));
305 expr1, expr2, expr));
410 sprintf(
buf,
"%s %s %d",
495 side,
int2a(dim), NULL));
532 for (i=ndim ; i>=1 ; i--)
549 for(lnb=
CDR(lb), lnu=
CDR(lu); lb;
551 lb=lnb, lnb=lnb?
CDR(lnb):
NIL, lu=lnu, lnu=lnu?
CDR(lnu):
NIL);
578 #define no_basic is_basic_overloaded
579 #define no_entity entity_undefined
746 {
"", 0,
is_end, -1, NULL },
791 for(i=1; i<=
current->arity; i++)
811 if (!strcmp(
current->name, name))
821 if (entry)
return entry->
object;
call make_call(entity a1, list a2)
language make_language_fortran(void)
statement copy_statement(statement p)
STATEMENT.
dimension make_dimension(expression a1, expression a2, list a3)
instruction make_instruction(enum instruction_utype tag, void *val)
static reference ref
Current stmt (an integer)
bdt base
Current expression.
expression MakeCharacterConstantExpression(string s)
END_EOLE.
#define ret(why, what)
true if not a remapping for old.
const char * local_name(const char *s)
Does not take care of block scopes and returns a pointer.
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
statement make_block_statement(list)
Make a block statement from a list of statement.
statement instruction_to_statement(instruction)
Build a statement from a give instruction.
void gen_multi_recurse(void *o,...)
Multi recursion visitor function.
bool gen_false(__attribute__((unused)) gen_chunk *unused)
Return false and ignore the argument.
void gen_null(__attribute__((unused)) void *unused)
Ignore the argument.
bool gen_true(__attribute__((unused)) gen_chunk *unused)
Return true and ignore the argument.
#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 CDR(pcons)
Get the list less its first element.
#define MAP(_map_CASTER, _map_item, _map_code, _map_list)
Apply/map an instruction block on all the elements of a list (old fashioned)
list lUpdateExpr(entity module, list l)
#define alignment_templatedim(x)
#define alignment_constant(x)
#define align_template(x)
#define align_alignment(x)
#define distribute_distribution(x)
#define alignment_rate(x)
#define distribution_parameter(x)
#define HPFC_PACKAGE
local definitions
int HpfcExpressionToInt(expression e)
HpfcExpressionToInt(e)
alignment FindAlignmentOfDim(list lal, int dim)
distribution FindDistributionOfDim(list ldi, int dim, int *pdim)
tag new_declaration_tag(entity array, int dim)
#define HOST_TIMEON
special FCD calls.
#define BUFFER
common /hpfc_buffers/
#define PVM_INITSEND
PVM functions that may be called by the generated code.
#define SND_TO_C
Run-time support functions and subroutine names.
#define PVM_BYTE1
PVM types encoding for packing and unpacking.
#define BUFPCK
hpfc packing and unpacking
#define HPFC_HCAST
host/node communications
#define SND_TO_HA
define SND_TO_HA "HPFC SNDTO HA"
#define RCV_FR_mCS
define RCV_FR_mCS "HPFC RCVFR mCS"
distribute load_hpf_distribution(entity)
align load_hpf_alignment(entity)
intptr_t load_hpf_number(entity)
#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
string concatenate(const char *,...)
Return the concatenation of the given strings.
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
#define HPF_PREFIX
moved here because needed by syntax:-(
#define MINUS_OPERATOR_NAME
#define PLUS_OPERATOR_NAME
#define MOD_INTRINSIC_NAME
#define HOSTSECTION_SUFFIX
#define entity_variable_p(e)
An entity_variable_p(e) may hide a typedef and hence a functional type.
#define TELL_SUFFIX
suffixes for my own (FCD:-) directives.
#define DIVIDE_OPERATOR_NAME
#define UNARY_MINUS_OPERATOR_NAME
#define MULTIPLY_OPERATOR_NAME
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 entity_return_label_p(entity e)
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
entity make_empty_subroutine(const char *name, language l)
entity entity_empty_label(void)
basic entity_basic(entity e)
return the basic associated to entity e if it's a function/variable/constant basic_undefined otherwis...
const char * module_local_name(entity e)
Returns the module local user name.
entity entity_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
entity make_empty_function(const char *name, type r, language l)
bool entity_in_common_p(entity e)
expression reference_to_expression(reference r)
expression entity_to_expression(entity e)
if v is a constant, returns a constant call.
expression MakeBinaryCall(entity f, expression eg, expression ed)
Creates a call expression to a function with 2 arguments.
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
list make_list_of_constant(int val, int number)
of expression
expression MakeUnaryCall(entity f, expression a)
Creates a call expression to a function with one argument.
expression MakeTernaryCall(entity f, expression e1, expression e2, expression e3)
Creates a call expression to a function with 3 arguments.
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)
type MakeIntegerResult(void)
entity find_or_create_typed_entity(string, const char *, tag)
Looks for an entity of the specified basic.
int NumberOfDimension(entity)
type MakeOverloadedResult(void)
this function creates a default fortran operator result, i.e.
#define expression_domain
newgen_execution_domain_defined
#define storage_formal_p(x)
#define reference_variable(x)
#define dimension_lower(x)
#define entity_storage(x)
#define statement_domain
newgen_sizeofexpression_domain_defined
#define range_increment(x)
#define call_domain
newgen_callees_domain_defined
#define storage_formal(x)
#define EXPRESSION(x)
EXPRESSION.
#define statement_label(x)
#define entity_undefined_p(x)
#define expression_undefined
#define formal_function(x)
#define reference_indices(x)
#define variable_dimensions(x)
#define storage_return_p(x)
#define storage_return(x)
#define STATEMENT(x)
STATEMENT.
void hpfc_init_run_time_entities()
to be seen from outside of this file
static RunTimeSupportDescriptor RTSTable[]
statement st_call_send_or_receive(entity f, reference r)
Sends.
expression pvm_what_option_expression(entity v)
void add_pvm_init_and_end(statement *phs, statement *pns)
this is for the main.
list array_lower_upper_bounds_list(entity array)
of expressions
statement st_compute_current_owners(reference ref)
string bound_parameter_name(entity array, string side, int dim)
returns a name for the bound of the declaration of array array, side side and dimension dim.
string pvm_what_options(basic b)
string pvm_what_options(b)
static bool RTSTable_initialized_p
bool hpfc_intrinsic_like_function(entity e)
static entity sub_ret_label
statement st_compute_neighbour(int d)
call to the runtime support function HPFC_CMPNEIGHBOUR(d)
static void substitute_return(entity o, entity n, statement s)
const char * hpfc_main_entity_name(entity e)
returns the name of the entity e belongs too (common, function...)
static entity make_packing_function(int ndim, bool kind, basic base, int nargs)
find or create an entity for the packing function...
static list array_bounds_list(entity array, bool upper)
of expressions
expression expr_compute_local_index(entity array, int dim, expression expr)
new index computation formula, derived from the new declarations made for the given dimension.
statement st_compute_current_computer(reference ref)
Computes.
static void srwt(statement s)
entity MakeRunTimeSupportFunction(string local_name, _UNUSED_ int number_of_arguments, tag return_type)
entity MakeRunTimeSupportFunction (local_name, number_of_arguments, return_type)
entity hpfc_name_to_entity(const char *name)
entity argument_bound_entity(entity module, entity array, bool upper, int dim)
statement hpfc_make_call_statement(entity e, list l)
statement hpfc_make_call_statement(e, l) generate a call statement to function e, with expression lis...
#define is_end
this file stores the table that describes run time functions and variables that may be called or refe...
expression hpfc_array_bound(entity array, bool upper, int dim)
entity MakeRunTimeSupportSubroutine(string local_name, _UNUSED_ int number_of_arguments)
Runtime Support Functions Management.
static RunTimeSupportDescriptor * find_entry_by_name(const char *name)
bool hpfc_io_like_function(entity e)
statement st_generate_packing(entity array, list content, bool bsend)
statement st_generate_packing_and_passing(array, content, bsend)
entity hpfc_main_entity(entity e)
returns the entity to which e is attached, that is first a common, then a function....
entity object
basic tag if necessary
tag basic
function or subroutine or variable or ...
The structure used to build lists in NewGen.