10 #include "pips_config.h"
56 pips_debug(1,
"step_directive_type = STEP_PARALLEL\n");
59 pips_debug(1,
"step_directive_type = STEP_PARALLEL_DO\n");
62 pips_debug(1,
"step_directive_type = STEP_DO\n");
65 pips_debug(1,
"step_directive_type = STEP_MASTER\n");
68 pips_debug(1,
"step_directive_type = STEP_BARRIER\n");
71 pips_debug(1,
"step_directive_type = STEP_THREADPRIVATE\n");
74 pips_debug(1,
"step_directive_type = UNKNOWN\n");
90 pips_debug(4,
"begin first_p = %d\n", first_p);
118 return load_directives(
stmt);
123 return bound_directives_p(
stmt);
129 store_directives(
stmt, d);
132 #define SB_LIST_VARIABLE(sb, list_var, txt_begin) \
133 if(!set_empty_p(list_var)) \
135 string s = string_undefined; \
136 FOREACH(ENTITY, variable, set_to_sorted_list(list_var, (gen_cmp_func_t)compare_entities)) \
138 if(s == string_undefined) \
139 s=strdup(concatenate(txt_begin, entity_user_name(variable), NULL)); \
141 s=strdup(concatenate(", ", entity_user_name(variable), NULL)); \
142 string_buffer_append(sb, s); \
144 string_buffer_append(sb, strdup(")")); \
149 bool block_directive =
true;
160 block_directive = is_fortran;
164 block_directive = is_fortran;
174 block_directive =
false;
179 block_directive =
false;
266 string op_txt[
STEP_UNDEF_REDUCE]={
" reduction(*: ",
" reduction(max: ",
" reduction(min: ",
" reduction(+: "};
278 printf(
"ÞÞÞÞÞÞÞÞÞ directive begin : %s\n", *begin_txt);
282 return block_directive;
366 string begin_txt, end_txt;
370 pips_debug(1,
"begin ====> TYPE %d : \nNB clauses : %d\n\tdirective begin : %s\n",
#define STEP_PARALLEL_DO_NAME
#define STEP_PARALLEL_NAME
const char * module_name(const char *s)
Return the module part of an entity name.
entity get_current_module_entity(void)
Get the entity of the current module.
#define list_undefined_p(c)
Return if a list is undefined.
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.
bool gen_in_list_p(const void *vo, const list lx)
tell whether vo belongs to lx
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
list gen_append(list l1, const list l2)
#define list_undefined
Undefined list definition :-)
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.
list statement_block(statement)
Get the list of block statements of a statement sequence.
loop statement_loop(statement)
Get the loop of a statement.
forloop statement_forloop(statement)
Get the forloop of a statement.
bool statement_forloop_p(statement)
bool statement_loop_p(statement)
bool empty_comments_p(const char *)
#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.
set set_append_list(set, const list)
add list l items to set s, which is returned.
set set_make(set_type)
Create an empty set of any type but hash_private.
set set_add_element(set, const set, const void *)
void string_buffer_free_all(string_buffer *)
free string buffer structure and force string freeing
void string_buffer_append(string_buffer, const string)
append string s (if non empty) to string buffer sb, the duplication is done if needed according to th...
string string_buffer_to_string(const string_buffer)
return malloc'ed string from string buffer sb
string_buffer string_buffer_make(bool dup)
allocate a new string buffer
void string_buffer_cat(string_buffer, const string,...)
append a NULL terminated list of string to sb.
void print_statement(statement)
Print a statement on stderr.
#define statement_block_p(stat)
const char * entity_user_name(entity e)
Since entity_local_name may contain PIPS special characters such as prefixes (label,...
static int init
Maximal value set for Fortran 77.
bool fortran_module_p(entity m)
Test if a module is in Fortran.
bool assignment_expression_p(expression e)
Test if an expression is an assignment operation.
entity expression_to_entity(expression e)
just returns the entity of an expression, or entity_undefined
#define forloop_initialization(x)
#define EXPRESSION(x)
EXPRESSION.
#define entity_undefined_p(x)
#define call_arguments(x)
#define statement_undefined_p(x)
#define expression_syntax(x)
#define STATEMENT(x)
STATEMENT.
void step_directives_save()
bool step_directives_bound_p(statement stmt)
GENERIC_LOCAL_FUNCTION(directives, step_directives)
Copyright 2007, 2008, 2009 Alain Muller, Frederique Silber-Chaussumier.
void get_step_directive_name(step_directive drt, string *directive_txt)
Warning! Do not modify this file that is automatically generated!
void step_directives_store(statement stmt, step_directive d)
void step_directives_print()
bool step_private_p(statement stmt, entity e)
bool step_directive_to_strings(step_directive d, bool is_fortran, string *begin_txt, string *end_txt)
void step_directive_type_print(step_directive drt)
void step_directives_reset()
void step_directive_print(step_directive d)
#define SB_LIST_VARIABLE(sb, list_var, txt_begin)
static list step_directive_omp_get_private_entities(step_directive directive)
step_directive step_directives_load(statement stmt)
void step_directives_init(bool first_p)
list step_directive_basic_workchunk_index(step_directive d)
statement step_directive_basic_workchunk(step_directive d)
#define STEP_THREADPRIVATE
#define STEP_UNDEF_REDUCE
#define STEP_PARALLEL
Handled construction.
#define step_clause_copyin(x)
#define step_directive_type(x)
@ is_step_clause_reduction
@ is_step_clause_transformation
@ is_step_clause_threadprivate
@ is_step_clause_schedule
@ is_step_clause_firstprivate
#define step_clause_private(x)
#define step_directive_block(x)
#define step_clause_firstprivate(x)
#define step_directive_clauses(x)
#define STEP_DIRECTIVES_MAP(k, v, c, f)
#define step_clause_tag(x)
#define step_clause_schedule(x)
#define step_clause_shared(x)
#define step_clause_threadprivate(x)
#define STEP_CLAUSE(x)
STEP_CLAUSE.
#define step_clause_reduction(x)
#define MAP_ENTITY_INT_MAP(k, v, c, f)
internally defined structure.
FI: I do not understand why the type is duplicated at the set level.
The structure used to build lists in NewGen.