25 #include "pips_config.h"
32 #include "resources.h"
51 stack statement_stack;
184 (
void *) contenu_loop);
188 switch ( contenu_loop ){
430 "perfectly nested loops: %d\n"
431 "non perfectly nested loops: %d\n"
432 "non perfectly nested loops which we can treat : %d\n",
439 fprintf(file,
"perfectly nested loops of depth %d: %d \n", i,
443 fprintf(file,
"non perfectly nested loops of depth %d: %d \n", i,
453 string filename, localfilename;
457 pips_debug(1,
"considering module %s\n", name);
489 name,
".loop_stats");
492 "/", localfilename, NULL));
struct _newgen_struct_statement_ * statement
static list blocks
lisp of loops
FILE * safe_fopen(const char *filename, const char *what)
int safe_fclose(FILE *stream, const char *filename)
#define CONTROL_MAP(ctl, code, c, list)
Macro to walk through all the controls reachable from a given control node of an unstructured.
void reset_current_module_entity(void)
Reset the current module entity.
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_false(__attribute__((unused)) gen_chunk *unused)
Return false and ignore the argument.
void gen_null(__attribute__((unused)) void *unused)
Ignore the argument.
bool gen_true(__attribute__((unused)) gen_chunk *unused)
Return true and ignore the argument.
#define NIL
The empty list (nil in Lisp)
void gen_free_list(list l)
free the spine of the list
#define MAP(_map_CASTER, _map_item, _map_code, _map_list)
Apply/map an instruction block on all the elements of a list (old fashioned)
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_FILE_RESOURCE
Put a file resource into the current workspace database.
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.
string db_build_file_resource_name(const char *rname, const char *oname, const char *suffix)
returns an allocated file name for a file resource.
#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
string concatenate(const char *,...)
Return the concatenation of the given strings.
void * stack_head(const stack)
returns the item on top of stack s
void stack_push(void *, stack)
stack use
void stack_free(stack *)
type, bucket_size, policy
stack stack_make(int, int, int)
allocation
void * stack_pop(stack)
POPs one item from stack s.
string db_get_current_workspace_directory(void)
#define unstructured_control
After the modification in Newgen: unstructured = entry:control x exit:control we have create a macro ...
entity local_name_to_top_level_entity(const char *n)
This function try to find a top-level entity from a local name.
#define test_domain
newgen_entity_domain_defined
#define expression_domain
newgen_execution_domain_defined
#define unstructured_domain
newgen_type_domain_defined
#define loop_domain
newgen_language_domain_defined
#define statement_domain
newgen_sizeofexpression_domain_defined
#define call_domain
newgen_callees_domain_defined
#define sequence_statements(x)
#define whileloop_domain
newgen_variable_domain_defined
#define control_statement(x)
#define sequence_domain
newgen_reference_domain_defined
#define STATEMENT(x)
STATEMENT.
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
static bool stmt_flt(statement s, context_p context)
static int * nbr_perf_nest_loop_of_depth
struct context_p context_t
static void uns_rwt(unstructured u, context_p context)
static int nbr_no_perfectly_nested_loop
static int max_depth_perfect
static int nbr_nested_loop
@ is_a_no_perf_nes_loop_t
static int * nbr_no_perf_nest_loop_of_depth
include "statistics.h"
static bool uns_flt(unstructured u, context_p context)
static void stmt_rwt(statement s, context_p context)
static void call_rwt(call ca, context_p context)
static int max_depth_no_perfect
static bool test_flt(test t, context_p context)
bool loop_statistics(const string name)
cproto-generated files
static void loop_rwt(loop l, context_p context)
static void put_result(string filename)
static void seq_rwt(sequence sq, context_p context)
static bool loop_flt(loop l, context_p context)
static bool call_flt(call ca, context_p context)
static void wl_rwt(whileloop w, context_p context)
static bool seq_flt(sequence sq, context_p context)
static int nbr_perfectly_nested_loop
static void test_rwt(test t, context_p context)
static int nbr_interested_loop
The structure used to build lists in NewGen.
cette structure contient une pile.
static int depth
la sequence de nids