25 #include "pips_config.h"
39 #define PROP_SUFFIX ".proper_reductions"
40 #define CUMU_SUFFIX ".cumulated_reductions"
42 #define PROP_DECO "proper reductions"
43 #define CUMU_DECO "cumulated reductions"
140 fprintf(stderr,
"reduction is %s[",
166 pips_debug(1,
"considering statement %p\n", s);
184 debug_on(
"PRETTYPRINT_DEBUG_LEVEL");
206 string decoration_name,
213 pips_debug(1,
"considering module %s for %s\n",
252 DBR_PROPER_REDUCTIONS,
261 DBR_CUMULATED_REDUCTIONS,
263 DBR_SUMMARY_REDUCTIONS,
static reference ref
Current stmt (an integer)
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.
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)
list gen_nconc(list cp1, list cp2)
physically concatenates CP1 and CP2 but do not duplicates the elements
#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 pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_internal_error
#define GENERIC_GLOBAL_FUNCTION(name, type)
void print_reference(reference r)
string get_comment_sentinel()
Start a single line comment.
void close_prettyprint()
because some prettyprint functions may be used for debug, so the last hook set by somebody may have s...
void init_prettyprint(text(*hook)(entity, int, statement))
checks that the prettyprint hook was actually reset...
list Words_Reference(reference obj)
text text_module(entity, statement)
bool make_text_resource_and_free(const char *, const char *, const char *, text)
bool print_code_proper_reductions(const char *module_name)
Handlers for PIPSMAKE.
static list words_reductions(string note, reductions rs)
allocates and returns a list of string with note ahead if not empty.
string note_for_statement(statement s)
generates a short note to tell about the type of the statement being decorated.
static bool print_any_reductions(const char *module_name, string resource_name, string decoration_name, string summary_name, string file_suffix)
handles the required prettyprint ??? what about summary reductions? should be pprinted with cumulated...
string reduction_name(reduction r)
returns the name of the reduction (!!! not allocated)
static text text_reductions(__attribute__((unused)) entity module, __attribute__((unused)) int margin, statement s)
function to allocate and returns a text, passed to the prettyprinter uses some static variables:
void print_reduction(reduction r)
bool print_code_cumulated_reductions(const char *module_name)
string reduction_operator_name(reduction_operator o)
allocates and returns the name of the operator
static string reduction_decoration
string reduction_operator_tag_name(tag t)
returns a (static) string describing the tag t reduction
static list words_reduction(reduction r)
allocates and returns a list of strings for reduction r
static text text_code_reductions(statement s)
returns a reduction-decorated text for statement s
void set_printed_reductions(pstatement_reductions)
reductions load_printed_reductions(statement)
void reset_printed_reductions(void)
bool bound_printed_reductions_p(statement)
struct _newgen_struct_reductions_ * reductions
@ is_reduction_operator_bitwise_xor
@ is_reduction_operator_none
@ is_reduction_operator_min
@ is_reduction_operator_bitwise_and
@ is_reduction_operator_neqv
@ is_reduction_operator_max
@ is_reduction_operator_bitwise_or
@ is_reduction_operator_csum
@ is_reduction_operator_eqv
@ is_reduction_operator_prod
@ is_reduction_operator_or
@ is_reduction_operator_and
@ is_reduction_operator_sum
#define REDUCTION(x)
REDUCTION.
#define reduction_operator_tag(x)
#define reduction_reference(x)
#define reductions_list(x)
entity local_name_to_top_level_entity(const char *n)
This function try to find a top-level entity from a local name.
#define reference_undefined_p(x)
@ is_instruction_unstructured
@ is_instruction_whileloop
@ is_instruction_expression
@ is_instruction_sequence
#define instruction_tag(x)
#define statement_instruction(x)
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
text words_predicate_to_commentary(list w_pred, string comment_prefix)
text words_predicate_to_commentary(list w_pred, string comment_prefix) input : a list of strings,...
static bool __attribute__((unused))
The structure used to build lists in NewGen.
#define MERGE_TEXTS(r, t)