25 #include "pips_config.h"
value make_value_expression(expression _field_)
basic make_basic_int(intptr_t _field_)
struct _newgen_struct_statement_ * statement
static void forloop_rwt(forloop f, acc_ctx *c)
add a counter to the loop body
static void test_rwt(test t, acc_ctx *c)
add a counter to each branch of the test
static void whileloop_rwt(whileloop w, acc_ctx *c)
add a counter to the loop body
bool add_control_counters(const string module_name)
instrument a module with control structure counters for test & loops
static entity create_counter(entity module, const string name)
create a new integer local variable in module using name as a prefix
static void loop_rwt(loop l, acc_ctx *c)
add a counter to the loop body
static void add_counter(acc_ctx *c, string name, statement s)
add a new counter at entry of statement s
static void add_counters(entity module, statement root)
add control counter instrumentation assumes current module entity & statement are okay.
static statement make_increment_statement(entity module, entity var)
generate: var = var + 1 (Fortran) or var++ (C)
const char * module_name(const char *s)
Return the module part of an entity name.
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
void gen_context_multi_recurse(void *o, void *context,...)
Multi-recursion with context function visitor.
bool gen_true(__attribute__((unused)) gen_chunk *unused)
Return true and ignore the argument.
#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)
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_assign_statement(expression, expression)
statement make_call_statement(string, list, entity, string)
This function is limited to intrinsics calls...
void insert_statement(statement, statement, bool)
This is the normal entry point.
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])
bool module_reorder(statement body)
Reorder a module and recompute order to statement if any.
#define PLUS_OPERATOR_NAME
#define POST_INCREMENT_OPERATOR_NAME
#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.
bool fortran_module_p(entity m)
Test if a module is in Fortran.
entity entity_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
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...
void AddEntityToCurrentModule(entity)
Add a variable entity to the current module declarations.
entity make_new_scalar_variable_with_prefix(const char *, entity, basic)
Create a new scalar variable of type b in the given module.
#define forloop_domain
newgen_extensions_domain_defined
#define test_domain
newgen_entity_domain_defined
#define loop_domain
newgen_language_domain_defined
#define whileloop_body(x)
#define whileloop_domain
newgen_variable_domain_defined
#define entity_initial(x)
Add Control Counter recursion context.