2 #include "pips_config.h"
30 #include "resources.h"
57 #define FortranImplicitType(x) \
158 nesting_level = (nesting_level == 0)? 1 : ((nesting_level == 1) ? 2 : nesting_level);
168 return nesting_level;
178 int nesting_level_sequence = nesting_level;
182 if(nesting_level != 2){
183 nesting_level_sequence =
gen_mpi(st, nesting_level) ;
204 nesting_level =(nesting_level == 1)? 2:nesting_level;
210 if(nesting_level == 2)
instruction copy_instruction(instruction p)
INSTRUCTION.
call make_call(entity a1, list a2)
basic make_basic_typedef(entity _field_)
storage make_storage_rom(void)
expression copy_expression(expression p)
EXPRESSION.
statement copy_statement(statement p)
STATEMENT.
test make_test(expression a1, statement a2, statement a3)
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_sequence(sequence _field_)
instruction make_instruction(enum instruction_utype tag, void *val)
entity copy_entity(entity p)
ENTITY.
synchronization make_synchronization_none(void)
sequence make_sequence(list a)
void put_new_typedef(const char *)
This function is used by libraries "step"* and "task_parallelization".
struct _newgen_struct_statement_ * statement
static statement com_call(bool neighbor, list args_com, int k)
entity make_constant_entity(string name, tag bt, size_t size)
For historical reason, call the Fortran version.
const char * module_name(const char *s)
Return the module part of an entity name.
int gen_consistent_p(gen_chunk *obj)
GEN_CONSISTENT_P dynamically checks the type correctness of OBJ.
statement make_block_statement(list)
Make a block statement from a list of statement.
void reset_current_module_entity(void)
Reset the current module entity.
void reset_current_module_statement(void)
Reset the current module statement.
statement set_current_module_statement(statement)
Set the current module statement.
entity set_current_module_entity(entity)
static.c
instruction make_continue_instruction()
Creates a CONTINUE instruction, that is the FORTRAN nop, the ";" in C or the "pass" in Python for exa...
bool native_instruction_p(instruction i, string op_name)
Test if an instruction is a native instruction of the language.
list gen_nreverse(list cp)
reverse a list in place
#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)
#define CAR(pcons)
Get the value of the first element of a list.
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
#define CDR(pcons)
Get the list less its first element.
#define MAPL(_map_list_cp, _code, _l)
Apply some code on the addresses of all the elements of a list.
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
#define DB_PUT_MEMORY_RESOURCE(res_name, own_name, res_val)
conform to old interface.
sequence statement_sequence(statement)
Get the sequence of a statement sequence.
loop statement_loop(statement)
Get the loop of a statement.
bool statement_loop_p(statement)
bool statement_sequence_p(statement)
Statement classes induced from instruction type.
statement update_statement_instruction(statement, instruction)
Replace the instruction in statement s by instruction i.
bool return_statement_p(statement)
Test if a statement is a C or Fortran "return".
statement make_call_statement(string, list, entity, string)
This function is limited to intrinsics calls...
bool declaration_statement_p(statement)
Had to be optimized according to Beatrice Creusillet.
#define pips_user_warning
static void gen_if_rank(statement stmt, synchronization sync)
static int gen_mpi(statement stmt, int nesting_level)
nesting_level is used to generate only a flat MPI (nesting_level = 1) hierarchical mpi is not impleme...
#define FortranImplicitType(x)
ImplicitType uses data structures of the Fortran parser.
static void gen_mpi_send_recv(statement stmt)
static statement mpi_initialize(statement stmt, entity module)
Generate int rank0; MPI_Status status0; MPI_Request *request0; ierr = MPI_Init( &argc,...
dg_vertex_label vertex_label
static bool com_statement_p(statement s)
static void mpi_finalize(statement stmt)
static entity mpi_request
static void gen_flat_mpi(statement stmt, int nesting_level)
dg_arc_label arc_label
Instantiation of the dependence graph:
static statement init_stmt
bool mpi_task_generation(char *module_name)
mpi_generation.c
#define TOP_LEVEL_MODULE_NAME
Module containing the global variables in Fortran and C.
#define STATEMENT_ORDERING_UNDEFINED
mapping.h inclusion
hash_table set_ordering_to_statement(statement s)
To be used instead of initialize_ordering_to_statement() to make sure that the hash table ots is in s...
void reset_ordering_to_statement(void)
Reset the mapping from ordering to statement.
void print_statement(statement)
Print a statement on stderr.
bool module_reorder(statement body)
Reorder a module and recompute order to statement if any.
#define RECV_FUNCTION_NAME
#define MPI_STATUS
PI types.
#define EQUAL_OPERATOR_NAME
#define STATEMENT_NUMBER_UNDEFINED
default values
#define is_instruction_block
soft block->sequence transition
#define SEND_FUNCTION_NAME
SPIRE API.
#define instruction_block(i)
#define empty_comments
Empty comments (i.e.
#define MPI_FINALIZE_FUNCTION_NAME
#define make_empty_statement
An alias for make_empty_block_statement.
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...
entity local_name_to_top_level_entity(const char *n)
This function try to find a top-level entity from a local name.
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
entity entity_empty_label(void)
entity entity_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
expression make_entity_expression(entity e, cons *inds)
expression make_address_of_expression(expression e)
generate a newly allocated expression for &(e)
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...
entity expression_to_entity(expression e)
just returns the entity of an expression, or entity_undefined
extensions empty_extensions(void)
extension.c
basic MakeBasic(int)
END_EOLE.
void AddLocalEntityToDeclarations(entity, entity, statement)
Add the variable entity e to the list of variables of the function module.
entity make_new_scalar_variable_with_prefix(const char *, entity, basic)
Create a new scalar variable of type b in the given module.
type MakeTypeVariable(basic, cons *)
BEGIN_EOLE.
@ is_synchronization_barrier
@ is_synchronization_spawn
#define synchronization_spawn(x)
#define synchronization_tag(x)
#define statement_synchronization(x)
#define entity_storage(x)
#define EXPRESSION(x)
EXPRESSION.
#define statement_label(x)
#define type_undefined_p(x)
#define instruction_tag(x)
#define sequence_statements(x)
#define statement_extensions(x)
#define test_condition(x)
#define statement_instruction(x)
#define statement_comments(x)
#define instruction_call(x)
#define call_arguments(x)
#define instruction_test(x)
#define statement_undefined_p(x)
#define storage_undefined_p(x)
#define variable_basic(x)
#define statement_undefined
#define STATEMENT(x)
STATEMENT.
The structure used to build lists in NewGen.
A gen_chunk is used to store every object.