PIPS
|
#include "local-header.h"
#include "text.h"
#include "text-util.h"
#include "semantics.h"
#include "prettyprint.h"
Go to the source code of this file.
Macros | |
#define | PROP_SUFFIX ".proper_reductions" |
#define | CUMU_SUFFIX ".cumulated_reductions" |
#define | PROP_DECO "proper reductions" |
#define | CUMU_DECO "cumulated reductions" |
Functions | |
string | note_for_statement (statement s) |
generates a short note to tell about the type of the statement being decorated. More... | |
string | reduction_operator_tag_name (tag t) |
returns a (static) string describing the tag t reduction More... | |
string | reduction_operator_name (reduction_operator o) |
allocates and returns the name of the operator More... | |
string | reduction_name (reduction r) |
returns the name of the reduction (!!! not allocated) More... | |
static list | words_reduction (reduction r) |
allocates and returns a list of strings for reduction r More... | |
static list | words_reductions (string note, reductions rs) |
allocates and returns a list of string with note ahead if not empty. More... | |
void | print_reduction (reduction r) |
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: More... | |
static text | text_code_reductions (statement s) |
returns a reduction-decorated text for statement s More... | |
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 regions. More... | |
bool | print_code_proper_reductions (const char *module_name) |
Handlers for PIPSMAKE. More... | |
bool | print_code_cumulated_reductions (const char *module_name) |
Variables | |
static string | reduction_decoration = NULL |
#define CUMU_DECO "cumulated reductions" |
Definition at line 43 of file prettyprint.c.
#define CUMU_SUFFIX ".cumulated_reductions" |
Definition at line 40 of file prettyprint.c.
#define PROP_DECO "proper reductions" |
Definition at line 42 of file prettyprint.c.
#define PROP_SUFFIX ".proper_reductions" |
Definition at line 39 of file prettyprint.c.
generates a short note to tell about the type of the statement being decorated.
Definition at line 55 of file prettyprint.c.
References instruction_tag, is_instruction_call, is_instruction_expression, is_instruction_forloop, is_instruction_goto, is_instruction_loop, is_instruction_sequence, is_instruction_test, is_instruction_unstructured, is_instruction_whileloop, pips_internal_error, and statement_instruction.
Referenced by build_creductions_of_statement(), build_reduction_of_variable(), compute_cumulated_reductions(), list_of_reduced_variables(), and text_reductions().
|
static |
handles the required prettyprint ??? what about summary reductions? should be pprinted with cumulated regions.
@ return true if succeed
module_name | the module name to process |
resource_name | the resource to use |
decoration_name | |
summary_name | |
file_suffix |
Definition at line 203 of file prettyprint.c.
References db_get_memory_resource(), debug_off, debug_on, get_comment_sentinel(), get_current_module_statement(), local_name_to_top_level_entity(), make_text_resource_and_free(), MERGE_TEXTS, module_name(), pips_debug, reduction_decoration, reset_current_module_entity(), reset_current_module_statement(), reset_printed_reductions(), resource_name, set_current_module_entity(), set_current_module_statement(), set_printed_reductions(), text_code_reductions(), words_predicate_to_commentary(), and words_reductions().
Referenced by print_code_cumulated_reductions(), and print_code_proper_reductions().
bool print_code_cumulated_reductions | ( | const char * | module_name | ) |
module_name | odule_name |
Definition at line 258 of file prettyprint.c.
References CUMU_DECO, CUMU_SUFFIX, module_name(), and print_any_reductions().
bool print_code_proper_reductions | ( | const char * | module_name | ) |
Handlers for PIPSMAKE.
module_name | odule_name |
Definition at line 249 of file prettyprint.c.
References module_name(), print_any_reductions(), PROP_DECO, and PROP_SUFFIX.
void print_reduction | ( | reduction | r | ) |
Definition at line 137 of file prettyprint.c.
References fprintf(), print_reference(), reduction_op, reduction_operator_tag, reduction_operator_tag_name(), reduction_reference, ref, and reference_undefined_p.
Referenced by replace_reductions_in_statement().
returns the name of the reduction (!!! not allocated)
Definition at line 110 of file prettyprint.c.
References reduction_operator_tag_name(), and reduction_tag.
string reduction_operator_name | ( | reduction_operator | o | ) |
allocates and returns the name of the operator
Definition at line 103 of file prettyprint.c.
References reduction_operator_tag, reduction_operator_tag_name(), and strdup().
Referenced by words_reduction().
returns a (static) string describing the tag t reduction
Definition at line 78 of file prettyprint.c.
References is_reduction_operator_and, is_reduction_operator_bitwise_and, is_reduction_operator_bitwise_or, is_reduction_operator_bitwise_xor, is_reduction_operator_csum, is_reduction_operator_eqv, is_reduction_operator_max, is_reduction_operator_min, is_reduction_operator_neqv, is_reduction_operator_none, is_reduction_operator_or, is_reduction_operator_prod, is_reduction_operator_sum, and pips_internal_error.
Referenced by call_proper_reduction_p(), print_reduction(), reduction_name(), reduction_operator_name(), remove_variable_from_reduction(), and update_reduction_under_effect().
returns a reduction-decorated text for statement s
Definition at line 181 of file prettyprint.c.
References close_prettyprint(), debug_off, debug_on, get_current_module_entity(), init_prettyprint(), text_module(), and text_reductions().
Referenced by print_any_reductions().
|
static |
function to allocate and returns a text, passed to the prettyprinter uses some static variables:
unreachable statements?
Definition at line 161 of file prettyprint.c.
References bound_printed_reductions_p(), debug_off, debug_on, get_comment_sentinel(), load_printed_reductions(), make_text(), NIL, note_for_statement(), pips_debug, words_predicate_to_commentary(), and words_reductions().
Referenced by text_code_reductions().
allocates and returns a list of strings for reduction r
of string
Definition at line 117 of file prettyprint.c.
References CONS, gen_nconc(), NIL, reduction_op, reduction_operator_name(), reduction_reference, strdup(), STRING, and Words_Reference().
Referenced by words_reductions().
|
static |
allocates and returns a list of string with note ahead if not empty.
it describes the reductions in rs. of string
of string
Definition at line 128 of file prettyprint.c.
References CONS, FOREACH, gen_nconc(), NIL, REDUCTION, reductions_list, strdup(), STRING, and words_reduction().
Referenced by print_any_reductions(), and text_reductions().
|
static |
Definition at line 48 of file prettyprint.c.
Referenced by print_any_reductions().