26 #include "pips_config.h"
100 if (v==NULL)
return 0;
128 if (v==NULL)
return "null";
137 return strncmp(op,
AIPO, strlen(
AIPO))==0? op + strlen(
AIPO): op;
142 if (v==NULL)
return "null";
189 fprintf(
out,
"vertex %s is NULL\n", name? name:
"");
231 #define SCL_DEP "arrowhead=empty"
260 const char* vname = NULL;
279 bool some_arcs =
false;
286 sb_cat(sa, show_arcs?
" [label=\"":
"",
287 show_arcs? vname:
"", show_arcs?
"\"]":
"",
";\n");
315 if (vars && show_arcs)
332 if (!filter_nodes || some_image_stuff || (filter_nodes && some_arcs))
362 " \"%s%s\" [shape=circle];\n"
363 " \"%s =\" [shape=circle,label=\"=\",style=\"dashed\"]\n"
364 " \"%s%s\" -> \"%s =\";\n"
365 " \"%s =\" -> \"%s%s\";\n",
414 int niops = 0, ncops = 0, nsops = 0;
426 "#i=%d #o=%d #c=%d #s=%d "
428 "#I=%d #B=%d #A=%d\n",
484 #define DOT_SUFFIX ".dot"
497 fprintf(
out,
"// graph for dag \"%s\" of module \"%s\" in dot format\n",
685 entity first_img = NULL, second_img = NULL;
686 if (nins>=1) first_img =
ENTITY(
CAR(inputs));
688 dagvtx first_v = NULL, second_v = NULL;
703 if (first_v) preds =
CONS(
dagvtx, first_v, preds);
711 while (equal && p1 && p2) {
714 p1 =
CDR(p1), p2 =
CDR(p2);
716 equal &= (!p1 && !p2);
790 unsigned int skip, subs;
951 #define aipo_op_p(a, name) \
952 same_string_p(AIPO name, a->function_name)
1060 if (op<=0)
return false;
1064 pips_assert(
"image is used at least once", noccs>0);
1075 if (noccs==1 && nargs==1)
1078 if (
aipo_op_p(api,
"add_const")) op =
"+";
1079 else if (
aipo_op_p(api,
"sub_const")) op =
"-";
1080 else if (
aipo_op_p(api,
"mul_const")) op =
"*";
1081 else if (
aipo_op_p(api,
"div_const")) op =
"/";
1083 else if (
aipo_op_p(api,
"or_const")) op =
"|";
1103 else if (noccs==1 && nargs==2)
1106 entity other = image_is_first?
1109 if (
aipo_op_p(api,
"add")) op =
"add_const";
1110 else if (
aipo_op_p(api,
"mul")) op =
"mul_const";
1111 else if (
aipo_op_p(api,
"and")) op =
"add_const";
1112 else if (
aipo_op_p(api,
"or")) op =
"or_const";
1113 else if (
aipo_op_p(api,
"xor")) op =
"xor_const";
1114 else if (
aipo_op_p(api,
"inf")) op =
"inf_const";
1115 else if (
aipo_op_p(api,
"sup")) op =
"sup_const";
1116 else if (
aipo_op_p(api,
"addsat")) op =
"addsat_const";
1117 else if (
aipo_op_p(api,
"subsat")) op =
"subsat_const";
1118 else if (
aipo_op_p(api,
"absdiff")) op =
"absdiff_const";
1120 op = image_is_first?
"const_sub":
"sub_const";
1122 op = image_is_first?
"const_div":
"div_const";
1182 _int i00, i10, i20, i01, i11, i21, i02, i12, i22;
1184 &i01, &i11, &i21, &i02, &i12, &i22))
1187 if (i00==0 && i10==0 && i20==0 && i01==0 &&
1188 i21==0 && i02==0 && i12==0 && i22==0)
1194 else if (dilatation)
1206 if ((
aipo_op_p(api,
"mul_const") && val==0) ||
1207 (
aipo_op_p(api,
"and_const") && val==0) ||
1208 (
aipo_op_p(api,
"inf_const") && val==0) ||
1209 (
aipo_op_p(api,
"const_div") && val==0))
1213 if ((
aipo_op_p(api,
"sup_const") && val==maxval) ||
1214 (
aipo_op_p(api,
"or_const") && val==maxval) ||
1215 (
aipo_op_p(api,
"addsat_const") && val==maxval))
1218 if ((
aipo_op_p(api,
"subsat_const") && val==maxval))
1259 _int i00, i10, i20, i01, i11, i21, i02, i12, i22;
1261 &i01, &i11, &i21, &i02, &i12, &i22))
1264 if (i00==0 && i10==0 && i20==0 && i01==0 &&
1265 i21==0 && i02==0 && i12==0 && i22==0)
1277 if ((
aipo_op_p(api,
"mul_const") && val==1) ||
1278 (
aipo_op_p(api,
"div_const") && val==1) ||
1279 (
aipo_op_p(api,
"or_const") && val==0) ||
1280 (
aipo_op_p(api,
"add_const") && val==0) ||
1281 (
aipo_op_p(api,
"sub_const") && val==0) ||
1282 (
aipo_op_p(api,
"sup_const") && val==0))
1286 if ((
aipo_op_p(api,
"inf_const") && val==maxval) ||
1287 (
aipo_op_p(api,
"addsat") && val==maxval))
1304 bool changed =
false;
1353 bool changed =
false;
1433 pips_debug(4,
"after FREIA_NORMALIZE_OPERATIONS:\n");
1445 pips_debug(4,
"after FREIA_SIMPLIFY_OPERATIONS (1):\n");
1446 dag_dump(stderr,
"simplified_1", d);
1458 pips_debug(6,
"removing duplicate operations\n");
1502 if (!preds)
set_union(candidates, candidates, sources);
1505 bool switched =
false;
1541 dagvtx t = p; p = vr; vr = t;
1543 if (exchanges)
hash_put(exchanges, p, vr);
1597 pips_debug(4,
"after FREIA_REMOVE_DUPLICATE_OPERATIONS:\n");
1598 dag_dump(stderr,
"remove duplicate", d);
1612 pips_debug(4,
"after FREIA_SIMPLIFY_OPERATIONS (2):\n");
1613 dag_dump(stderr,
"simplified_2", d);
1648 pips_debug(4,
"after FREIA_REMOVE_DEAD_OPERATIONS:\n");
1649 dag_dump(stderr,
"remove dead", d);
1657 bool changed =
true;
1816 pips_debug(4,
"after FREIA_REMOVE_USELESS_COPIES:\n");
1817 dag_dump(stderr,
"remove useless copies", d);
1897 hash_put(intra_pipe_copies, source, target);
1904 pips_debug(4,
"after FREIA_MOVE_DIRECT_COPIES:\n");
1905 dag_dump(stderr,
"move direct copies", d);
1951 pips_assert(
"right output count after dag optimizations",
1952 dag_output_count==recount);
1959 bool only_mes =
true;
1983 #define starts_with(s1, s2) (strncmp(s1, s2, strlen(s2))==0)
2012 if (!occs)
return true;
2047 bool is_input =
false;
2130 dag_dump(stderr,
"dag_compute_outputs", d);
2245 if (!target)
return dep;
2263 pips_debug(8,
"scalar rw dep on %d for (%s): %s\n",
2307 (
dag d,
const set computed,
const set maybe,
const set currents)
2409 if (++n==nargs)
break;
2589 pips_debug(8,
"look for %s statement for %s\n",
2609 if (var==
image)
return s;
2617 if (var==
image)
return s;
2749 swis_ctx ctx = { old, img, write };
2764 pips_assert(
"some production statement", st!=NULL);
2824 bool (*alone_only)(
const dagvtx),
2827 void (*priority_update)(
const dag),
2828 const set output_images)
2849 list lcurrent =
NIL, computables;
2855 if (priority_update) priority_update(dall);
2858 while ((computables =
2871 choose_vertex(computables, lcurrent?
true:
false):
2879 if (alone_only && alone_only(
choice) && lcurrent)
2887 if (alone_only && alone_only(
choice))
2906 dag_dump(stderr,
"pushed dag", nd);
2956 bool stable =
false;
2978 if (!
set_belong_p(extracted, v) && (!compat || compat(v, extracted, d)))
static hash_table seen
static function to store whether a module has been seen during the recursive generation of the daVinc...
pstatement make_pstatement_empty(void)
dagvtx make_dagvtx(vtxcontent a1, list a2)
dagvtx copy_dagvtx(dagvtx p)
DAGVTX.
vtxcontent make_vtxcontent(intptr_t a1, intptr_t a2, pstatement a3, list a4, entity a5)
dag make_dag(list a1, list a2, list a3)
pstatement make_pstatement_statement(statement _field_)
void free_dagvtx(dagvtx p)
call make_call(entity a1, list a2)
value make_value_expression(expression _field_)
storage make_storage_rom(void)
expression copy_expression(expression p)
EXPRESSION.
void free_expression(expression p)
void free_storage(storage p)
static reference ref
Current stmt (an integer)
#define append(s)
text text_region_no_action(effect reg) input : a region output : a text consisting of several lines o...
void const char const char const int
char * alloc(int size)
ALLOC is an "iron-clad" version of malloc(3).
void dag_cleanup_other_statements(dag d)
remove unneeded statements? you must know they are really un-needed!
void dag_consistency_asserts(dag d)
do some consistency checking...
static bool switch_vertex_to_assign(dagvtx target, dagvtx source)
replace target measure to a copy of source result...
static entity get_upper_model(entity model, const hash_table occs)
static void switch_vertex_to_a_copy(dagvtx target, dagvtx source, list tpreds)
replace target vertex by a copy of source results...
static bool variable_used_as_later_input(entity img, list ld)
hmmm...
list dag_split_connected_components(dag d, set output_images)
build connected components
static void set_aipo_call(dagvtx v, string name, entity img, expression val)
switch vertex statement to an aipo call
static list copy_vertices(list lv)
_int dagvtx_optype(const dagvtx v)
list dag_vertex_preds(const dag d, const dagvtx target)
return target predecessor vertices as a list.
_int dagvtx_number(const dagvtx v)
returns the vertex number, i.e.
static bool any_scalar_dep(dagvtx v, set vs)
returns whether there is a scalar RW dependency from any vs to v
int dag_computation_count(const dag d)
return the number of actual operations in dag d.
bool dagvtx_other_stuff_p(const dagvtx v)
a vertex with a non AIPO or image related statement.
void dagvtx_nb_dump(FILE *out, const string what, const list l)
static dagvtx find_twin_vertex(dag d, dagvtx target)
bool dag_no_image_operation(dag d)
tell whether we have something to do with images ??? hmmm...
static bool list_commuted_p(const list l1, const list l2)
static void check_removed(const dagvtx v, const dagvtx removed)
list dag_split_on_scalars(const dag initial, bool(*alone_only)(const dagvtx), dagvtx(*choose_vertex)(const list, bool), gen_cmp_func_t priority, void(*priority_update)(const dag), const set output_images)
split a dag on scalar dependencies only, with a greedy heuristics.
static bool dag_simplify(dag d)
apply basic algebraic simplification to dag
static bool dag_image_is_an_input(dag d, entity img)
static void switch_image_variable(dagvtx v, entity old, entity img)
switch to new image variable in v & its direct successors
int dagvtx_ordering(const dagvtx *v1, const dagvtx *v2)
static entity new_local_image_variable(entity model, const hash_table occs)
list dag_fix_image_reuse(dag d, hash_table init, const hash_table occs)
fix intermediate image reuse in dag
static void dag_append_freia_call(dag d, statement s)
append statement s to dag d
static bool dagvtx_is_operator_p(const dagvtx v, const string opname)
static bool image_ref_flt(reference r, entity *image)
void dagvtx_dump(FILE *out, const string name, const dagvtx v)
for dag debug.
static bool commutative_operation_p(const dagvtx v1, const dagvtx v2)
static int dagvtx_cmp_entity(const dagvtx *v1, const dagvtx *v2)
static expression compute_constant(string op, expression val1, expression val2)
compute a constant expression for FREIA ??? TODO partial eval if values are constant
void freia_hack_fix_global_ins_outs(dag dfull, dag d)
catch some cases of missing outs between splits...
static string dagvtx_nb(const void *s)
static bool any_use_statement(set stats)
hmmm...
static int compatible_reduction_operation(const dagvtx v1, const dagvtx v2)
bool dagvtx_is_measurement_p(const dagvtx v)
returns whether the vertex is an image measurement operation.
dagvtx copy_dagvtx_norec(dagvtx v)
copy a vertex, but without its successors.
static list fs_expression_list_to_entity_list(list args, int nargs)
convert the first n items in list args to entities.
static void unlink_copy_vertex(dag d, const entity source, dagvtx copy)
"copy" copies "source" image in dag "d".
#define aipo_op_p(a, name)
static const char * entity_dot_name(entity e)
static bool same_operation_p(const dagvtx v1, const dagvtx v2)
list dag_computable_vertices(dag d, const set computed, const set maybe, const set currents)
return the vertices which may be computed from the list of available images, excluding vertices in ex...
static bool propagate_constant_image(dagvtx, entity, expression)
recursively propagate a constant image on a vertex
static bool other_significant_uses(entity e, const hash_table occs, const set stats)
static void set_aipo_copy(dagvtx v, entity e)
switch vertex to a copy of an image
dagvtx dagvtx_get_producer(const dag d, const dagvtx sink, const entity e, _int before_number)
return (last) producer of image e for vertex sink, or NULL if none found.
string dagvtx_number_str(const dagvtx v)
entity dagvtx_image(const dagvtx v)
return the produced image or NULL
static void propagate_constant_image_to_succs(dagvtx v, expression val)
propagate constant image to vertex successors
static bool swis_call_flt(call c, swis_ctx *ctx)
entity clone_variable_with_new_name(entity, const char *, const char *)
This function build and return new variable from a variable a_variable, with name new_name.
static bool dag_normalize(dag d)
normalize, that is use less image operators only transformation is: sub_const(i, v) -> add_const(i,...
string compilation_unit_of_module(const char *)
The output is undefined if the module is referenced but not defined in the workspace,...
static void dagvtx_dot_node(FILE *out, const string prefix, const dagvtx v)
void dag_remove_vertex(dag d, const dagvtx v)
remove vertex v from dag d.
dag freia_build_dag(string module, list ls, int number, const hash_table occurrences, const set output_images, const list ld, bool inloop)
build a full dag from list of statements ls.
static bool all_mesures_p(list lv)
return whether all vertices in list are mesures...
void dag_dump(FILE *out, const string what, const dag d)
for dag debug
statement freia_memory_management_statement(entity image, const hash_table occs, bool alloc)
static void substitute_image_in_statement(dagvtx v, entity source, entity target, bool used)
subtitute produced or used image in the statement of vertex v.
static void vertex_list_sorted_by_entities(list l)
void freia_dag_optimize(dag d, hash_table exchanges, list *lbefore, list *lafter)
remove dead image operations.
static void dagvtx_dot(FILE *out, const dag d, const dagvtx vtx)
static void dagvtx_copy_list_dot(FILE *out, const list ls, const set inputs)
list dag_connected_component(dag d, list *plv, bool(*compat)(const dagvtx, const set, const dag))
extract a sublist of lv which is a connected component.
static void dag_remove_unused_inputs(dag d)
remove unused inputs
static bool dagvtx_is_copy_p(const dagvtx v)
returns whether the vertex is an image copy operation.
static entity extract_fist_item(list *lp)
extract first entity item from list.
void dag_compute_outputs(dag d, const hash_table occs, const set output_images, const list ld, bool inloop)
(re)compute the list of GLOBAL input & output images for this dag ??? BUG the output is rather an app...
static void entity_list_dump(FILE *out, const string what, const list l)
static int number_of_copies(list l)
static void dagvtx_dot_node_sb(string_buffer sb, const string prefix, const dagvtx v)
void dag_dot_dump(const string module, const string name, const dag d, const list lb, const list la)
generate a "dot" format from a dag to a file.
void set_append_vertex_statements(set s, list lv)
static void set_aipo_constant(dagvtx, expression)
set vertex as a constant image and propagate to successors
void freia_switch_image_in_statement(statement s, entity old, entity img, bool write)
switch read or written image in statement if this is an AIPO call, only substitute output or input de...
string dagvtx_function_name(const dagvtx v)
void dag_dot(FILE *out, const string what, const dag d, const list lb, const list la)
output dag in dot format, for debug or show
string dagvtx_operation(const dagvtx v)
string dagvtx_compact_operation(const dagvtx v)
static entity freia_data2d_field(string field)
static expression constant_image_p(dagvtx)
whether vertex generates a constant image
static bool all_previous_stats_with_deps_are_computed(dag d, const set computed, dagvtx v)
check scalar dependency from computed to v.
static set dag_stats(dag d)
static void swis_ref_rwt(reference r, swis_ctx *ctx)
string dagvtx_to_string(const dagvtx v)
dag-utils.c
statement dagvtx_statement(const dagvtx v)
return statement if any, or NULL (for input nodes).
static bool all_vertices_are_copies_or_measures_p(const list lv)
_int dagvtx_opid(const dagvtx v)
void dag_statements(set stats, const dag d)
build the set of actual statements in d
static void dagvtx_list_dot(FILE *out, const string comment, const list l, const set used)
static entity copy_image_p(dagvtx)
tell whether vertex can be assimilated to a copy e.g.
bool single_image_assignement_p(dag d)
??? I'm unsure about what happens to dead code in the pipeline...
void dag_append_vertex(dag d, dagvtx nv)
append new vertex nv to dag d.
static bool gen_list_equals_p(const list l1, const list l2)
void dag_dot_dump_prefix(const string module, const string prefix, int number, const dag d, const list lb, const list la)
static expression do_point_to(entity var, string field_name)
FILE * safe_fopen(const char *filename, const char *what)
int safe_fclose(FILE *stream, const char *filename)
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
bool entity_freia_api_p(const entity f)
returns whether the entity is a freia API (AIPO) function.
const freia_api_t * hwac_freia_api(const char *function)
freia-utils.c
bool is_freia_dealloc(const statement s)
bool is_freia_alloc(const statement s)
void freia_spoc_set_operation(const freia_api_t *api, _int *type, _int *id)
??? beurk: I keep the operation as two ints for code regeneration.
statement freia_copy_image(const entity source, const entity target)
void hwac_kill_statement(statement s)
remove contents of statement s.
bool freia_image_variable_p(const entity var)
rather approximative?
int freia_max_pixel_value(void)
const freia_api_t * get_freia_api(int index)
bool same_constant_parameters(const dagvtx v1, const dagvtx v2)
tell whether v1 and v2 point to statements with the same parameters.
bool freia_extract_kernel_vtx(dagvtx v, bool strict, intptr_t *k00, intptr_t *k10, intptr_t *k20, intptr_t *k01, intptr_t *k11, intptr_t *k21, intptr_t *k02, intptr_t *k12, intptr_t *k22)
vertex-based version
call freia_statement_to_call(const statement s)
return the actual function call from a statement, dealing with assign and returns....
string what_operation(const _int type)
string what_operation_shape(const _int type)
SPoC: set shape depending on hardware component used by vertex.
bool freia_scalar_rw_dep(const statement s, const statement t, list *vars)
int hwac_freia_api_index(const string function)
returns the index of the description of an AIPO function
expression freia_get_nth_scalar_param(const dagvtx v, int n)
#define dagvtx_freia_api(v)
static void comment(string_buffer code, spoc_hardware_type hw, dagvtx v, int stage, int side, bool flip)
#define pstatement_statement_p(x)
#define dagvtx_content(x)
#define vtxcontent_optype(x)
#define vtxcontent_out(x)
#define vtxcontent_opid(x)
#define pstatement_statement(x)
#define dagvtx_domain
newgen_dag_domain_defined
#define vtxcontent_inputs(x)
#define vtxcontent_source(x)
static hash_table erosion
global variable used by the dagvtx_terapix_priority function, because qsort does not allow to pass so...
#define gen_context_recurse(start, ctxt, domain_number, flt, rwt)
entity get_current_module_entity(void)
Get the entity of the current module.
void gen_recurse_stop(void *obj)
Tells the recursion not to go in this object.
void gen_context_multi_recurse(void *o, void *context,...)
Multi-recursion with context function visitor.
void gen_null2(__attribute__((unused)) void *u1, __attribute__((unused)) void *u2)
idem with 2 args, to please overpeaky compiler checks
bool gen_true2(__attribute__((unused)) gen_chunk *u1, __attribute__((unused)) void *u2)
void gen_null(__attribute__((unused)) void *unused)
Ignore the argument.
bool gen_true(__attribute__((unused)) gen_chunk *unused)
Return true and ignore the argument.
list gen_make_list(int domain,...)
void gen_fprint(FILE *out, string name, const list l, gen_string_func_t item_name)
list gen_list_head(list *lp, int n)
list gen_nreverse(list cp)
reverse a list in place
void gen_remove(list *cpp, const void *o)
remove all occurences of item o from list *cpp, which is thus modified.
#define NIL
The empty list (nil in Lisp)
list gen_once(const void *vo, list l)
Prepend an item to a list only if it is not already in the list.
list gen_copy_seq(list l)
Copy a list structure.
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
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.
#define CDR(pcons)
Get the list less its first element.
int gen_occurences(const void *vo, const list l)
count occurences of vo in l
void gen_list_patch(list l, const void *x, const void *y)
Replace all the reference to x in list l by a reference to y:
void gen_sort_list(list l, gen_cmp_func_t compare)
Sorts a list of gen_chunks in place, to avoid allocations...
bool gen_replace_in_list(list l, const void *s, const void *t)
substitute all item s by t in list l
sequence statement_sequence(statement)
Get the sequence of a statement sequence.
call statement_call(statement)
Get the call of a statement.
bool statement_sequence_p(statement)
Statement classes induced from instruction type.
statement make_assign_statement(expression, expression)
void insert_statement(statement, statement, bool)
This is the normal entry point.
hash_table hash_table_make(hash_key_type key_type, size_t size)
void * hash_get(const hash_table htp, const void *key)
this function retrieves in the hash table pointed to by htp the couple whose key is equal to key.
void hash_put(hash_table htp, const void *key, const void *val)
This functions stores a couple (key,val) in the hash table pointed to by htp.
void hash_table_free(hash_table htp)
this function deletes a hash table that is no longer useful.
bool hash_defined_p(const hash_table htp, const void *key)
true if key has e value in htp.
void * hash_del(hash_table htp, const void *key)
this function removes from the hash table pointed to by htp the couple whose key is equal to key.
#define src(name, suf)
HPFC by Fabien Coelho, May 1993 and later...
string db_get_directory_name_for_module(const char *name)
returns the allocated and mkdir'ed directory for module name
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_user_warning
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define pips_internal_error
#define DUMMY_STRUCT_PREFIX
char * i2a(int)
I2A (Integer TO Ascii) yields a string for a given Integer.
string bool_to_string(bool)
#define HASH_MAP(k, v, code, ht)
#define same_string_p(s1, s2)
set set_assign_list(set, const list)
assigns a list contents to a set all duplicated elements are lost
set set_del_element(set, const set, const void *)
set set_intersection(set, const set, const set)
bool list_in_set_p(const list, const set)
list set_to_sorted_list(const set, gen_cmp_func_t)
set set_assign(set, const set)
Assign a set with the content of another set.
int set_size(const set)
returns the number of items in s.
set set_difference(set, const set, const set)
#define SET_FOREACH(type_name, the_item, the_set)
enumerate set elements in their internal order.
set set_clear(set)
Assign the empty set to s s := {}.
string set_to_string(string, const set, gen_string_func_t)
return allocated string for set s
bool set_belong_p(const set, const void *)
set set_union(set, const set, const set)
void set_fprint(FILE *, string, const set, gen_string_func_t)
print set s to file stream out.
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_to_file(const string_buffer, FILE *)
put string buffer into file.
void string_buffer_free(string_buffer *)
free string buffer structure, also free string contents according to the dup field
string_buffer string_buffer_make(bool dup)
allocate a new string buffer
string(* gen_string_func_t)(const void *)
int(* gen_cmp_func_t)(const void *, const void *)
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
static const char * prefix
static const char * opname(const char *s)
#define BITWISE_XOR_OPERATOR_NAME
#define ENTITY_ASSIGN_P(e)
#define POINT_TO_OPERATOR_NAME
#define UNARY_MINUS_OPERATOR_NAME
#define BITWISE_AND_OPERATOR_NAME
const char * entity_user_name(entity e)
Since entity_local_name may contain PIPS special characters such as prefixes (label,...
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...
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...
int compare_entities(const entity *pe1, const entity *pe2)
Comparison function for qsort.
entity local_name_to_top_level_entity(const char *n)
This function try to find a top-level entity from a local name.
static int init
Maximal value set for Fortran 77.
const char * module_local_name(entity e)
Returns the module local user name.
string safe_entity_name(entity e)
predicates and functions for entities
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.
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
expression MakeUnaryCall(entity f, expression a)
Creates a call expression to a function with one argument.
bool expression_reference_p(expression e)
Test if an expression is a reference.
reference expression_reference(expression e)
Short cut, meaningful only if expression_reference_p(e) holds.
entity expression_to_entity(expression e)
just returns the entity of an expression, or entity_undefined
expression dereference_expression(expression e)
generate a newly allocated expression for *(e)
expression call_to_expression(call c)
Build an expression that call a function or procedure.
bool formal_parameter_p(entity)
#define syntax_reference_p(x)
#define expression_domain
newgen_execution_domain_defined
#define syntax_reference(x)
#define reference_variable(x)
#define statement_ordering(x)
#define entity_storage(x)
#define call_domain
newgen_callees_domain_defined
#define EXPRESSION(x)
EXPRESSION.
#define reference_domain
newgen_range_domain_defined
#define expression_undefined
#define sequence_statements(x)
#define reference_indices(x)
#define call_arguments(x)
#define statement_number(x)
#define expression_syntax(x)
#define variable_basic(x)
#define STATEMENT(x)
STATEMENT.
#define entity_initial(x)
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
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.
FREIA API function name -> SPoC hardware description (and others?)
unsigned int arg_misc_out
code taken from http://fast-edge.googlecode.com and adapted to c99