24 #include "resources.h"
55 string mode =
"\"w\"";
56 string new_name =
strdup(
concatenate(
"FILE *finstrumented;\n ", dir,
"\n finstrumented = fopen(file_name,",
mode,
");\n", NULL)) ;
68 r =
strdup(
"Undefined value");
69 string new_name3 =
"finstrumented";
114 string new_name3 =
"finstrumented";
graph kdg
Global variables.
cast make_cast(type a1, expression a2)
expression make_expression(syntax a1, normalized a2)
basic make_basic(enum basic_utype tag, void *val)
type copy_type(type p)
TYPE.
statement copy_statement(statement p)
STATEMENT.
void free_extensions(extensions p)
instruction make_instruction_sequence(sequence _field_)
syntax make_syntax_cast(cast _field_)
sequence make_sequence(list a)
struct _newgen_struct_statement_ * statement
bool complexity_zero_p(complexity comp)
zero complexity check.
char * complexity_sprint(complexity comp, bool print_stats_p, bool print_local_names_p)
complexity load_statement_complexity(statement)
void reset_complexity_map(void)
void set_complexity_map(statement_mapping)
entity make_constant_entity(string name, tag bt, size_t size)
For historical reason, call the Fortran version.
#define region_entity(reg)
list RegionsIntersection(list l1, list l2, bool(*intersection_combinable_p)(effect, effect))
list RegionsIntersection(list l1,l2, bool (*intersection_combinable_p)(effect, effect)) input : outpu...
list regions_write_regions(list)
list regions_read_regions(list)
void set_methods_for_convex_effects(void)
methods.c
void init_convex_rw_prettyprint(const char *)
Ppolynome region_enumerate(effect)
void set_rw_effects(statement_effects)
bool w_r_combinable_p(effect, effect)
void reset_proper_rw_effects(void)
void set_proper_rw_effects(statement_effects)
void set_cumulated_rw_effects(statement_effects)
void reset_cumulated_rw_effects(void)
list load_statement_local_regions(statement)
void reset_rw_effects(void)
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.
#define successor_vertex(x)
struct _newgen_struct_graph_ * graph
#define vertex_successors(x)
#define SUCCESSOR(x)
SUCCESSOR.
#define graph_vertices(x)
void reset_current_module_entity(void)
Reset the current module entity.
void reset_current_module_statement(void)
Reset the current module statement.
const char * get_current_module_name(void)
Get the name of the current module.
statement set_current_module_statement(statement)
Set the current module statement.
statement get_current_module_statement(void)
Get the current module statement.
entity set_current_module_entity(entity)
static.c
entity get_current_module_entity(void)
Get the entity of the current module.
#define NIL
The empty list (nil in Lisp)
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on 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.
statement make_expression_statement(expression)
Build a statement from a given expression.
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.
statement vertex_to_statement(vertex v)
Vertex_to_statement looks for the statement that is pointed to by vertex v.
static vertex statement_to_vertex(statement s, graph g)
static void task_time_polynome(statement s)
dg_vertex_label vertex_label
dg_arc_label arc_label
Instantiation of the dependence graph:
bool bdsc_code_instrumentation(char *module_name)
instrumentation.c
static void edge_cost_polynome(statement s1, statement s2)
char * i2a(int)
I2A (Integer TO Ascii) yields a string for a given Integer.
string concatenate(const char *,...)
Return the concatenation of the given strings.
#define HASH_UNDEFINED_VALUE
value returned by hash_get() when the key is not found; could also be called HASH_KEY_NOT_FOUND,...
#define string_undefined_p(s)
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.
Ppolynome polynome_mult(Ppolynome pp1, Ppolynome pp2)
Ppolynome polynome_mult(Ppolynome pp1, Ppolynome pp2) returns pp1 * pp2.
void polynome_add(Ppolynome *ppp, Ppolynome pp2)
void polynome_add(Ppolynome* ppp, Ppolynome pp2) (*ppp) = (*ppp) + pp2.
static bool statement_equal_p(statement s1, statement s2)
#define POLYNOME_UNDEFINED_P(pp)
string expression_to_string(expression e)
bool module_reorder(statement body)
Reorder a module and recompute order to statement if any.
#define FPRINTF_FUNCTION_NAME
#define make_statement_list(stats...)
easy list constructor
#define empty_comments
Empty comments (i.e.
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
expression make_entity_expression(entity e, cons *inds)
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
Ppolynome expression_to_polynome(expression exp)
===========================================================================
expression polynome_to_expression(Ppolynome pp)
converts a polynomial to expression
extensions empty_extensions(void)
extension.c
_int SizeOfElements(basic)
This function returns the length in bytes of the Fortran or C type represented by a basic,...
type MakeTypeVariable(basic, cons *)
BEGIN_EOLE.
#define normalized_undefined
#define statement_ordering(x)
#define EXPRESSION(x)
EXPRESSION.
#define statement_extensions(x)
#define statement_instruction(x)
#define statement_comments(x)
#define variable_basic(x)
void module_to_value_mappings(entity m)
void module_to_value_mappings(entity m): build hash tables between variables and values (old,...
void set_transformer_map(statement_mapping)
void reset_precondition_map(void)
void set_precondition_map(statement_mapping)
void reset_transformer_map(void)
The structure used to build lists in NewGen.
#define CHAIN_SWORD(l, s)
string words_to_string(cons *lw)
A gen_chunk is used to store every object.
#define exp
Avoid some warnings from "gcc -Wshadow".