27 #ifdef BUILDER_SUPPRESS_TRIVIAL_TEST
30 #include "pips_config.h"
50 static int trivial_test_removed;
51 static int trivial_test_unstructured_removed;
58 display_trivial_test_statistics()
60 int elimination_count = trivial_test_removed + trivial_test_unstructured_removed ;
61 if (elimination_count > 0) {
62 user_log(
"* %d trivial test part%s %s been discarded. *\n",
64 elimination_count > 1 ?
"s" :
"",
65 elimination_count > 1 ?
"have" :
"has");
66 user_log(
"Structured trivial tests: %d\n" ,
67 trivial_test_removed);
69 user_log(
"Unstructured trivial tests: %d\n" ,
70 trivial_test_unstructured_removed);
76 pips_debug(8,
"There is not any trivial test in this program !\n");
104 pips_debug(8,
"The expression %s is a relational expression\n",
130 pips_debug(8,
"The expression %s is a logical expression\n",
182 expression ncond = MakeInvertExpression(cond);
190 trivial_test_removed++;
206 expression ncond = MakeInvertExpression(cond);
241 trivial_test_unstructured_removed++;
258 debug(2,
"trivial_test_statement_rewrite",
"is_instruction_test\n",
"\n");
266 pips_debug(8,
"The branch true of this test instruction is empty!\n");
268 pips_debug(8,
"This instruction is unstructured instruction\n");
269 trivial_test_deal_with_unstructured(m, s);
272 pips_debug(8,
"This instruction is structured instruction\n");
273 trivial_test_deal_with_test(s);
301 suppress_trivial_test_statement(
statement mod_stmt)
329 debug_on(
"TRIVIAL_TEST_DEBUG_LEVEL");
332 debug(1,
"trivial_test_elimination",
"Begin for %s\n", mod_name);
336 trivial_test_removed = 0 ;
337 trivial_test_unstructured_removed = 0;
339 suppress_trivial_test_statement(mod_stmt);
340 display_trivial_test_statistics();
352 debug(1,
"trivial_test_elimination",
"End for %s\n", mod_name);
void user_log(const char *format,...)
persistant_statement_to_control make_persistant_statement_to_control(void)
expression copy_expression(expression p)
EXPRESSION.
statement copy_statement(statement p)
STATEMENT.
bool statement_consistent_p(statement p)
test make_test(expression a1, statement a2, statement a3)
control apply_persistant_statement_to_control(persistant_statement_to_control f, statement k)
void free_instruction(instruction p)
instruction make_instruction(enum instruction_utype tag, void *val)
bool bound_persistant_statement_to_control_p(persistant_statement_to_control f, statement k)
void extend_persistant_statement_to_control(persistant_statement_to_control f, statement k, control v)
void free_persistant_statement_to_control(persistant_statement_to_control p)
static bool store_mapping(control c, bottom_up_abc_context_p context)
void display_clean_up_sequences_statistics(void)
struct _newgen_struct_statement_ * statement
statement make_block_statement(list)
Make a block statement from a list of statement.
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.
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 ENDP(l)
Test if a list is empty.
void gen_remove(list *cpp, const void *o)
remove all occurences of item o from list *cpp, which is thus modified.
#define NIL
The empty list (nil in Lisp)
#define CAR(pcons)
Get the value of the first element of a list.
#define CDR(pcons)
Get the list less its first element.
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.
bool empty_statement_or_continue_p(statement)
Return true if the statement is an empty instruction block or a continue or a recursive combination o...
#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
#define pips_internal_error
void debug(const int the_expected_debug_level, const char *calling_function_name, const char *a_message_format,...)
ARARGS0.
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.
string expression_to_string(expression e)
void print_statement(statement)
Print a statement on stderr.
bool module_reorder(statement body)
Reorder a module and recompute order to statement if any.
#define ENTITY_NON_EQUAL_P(e)
#define ENTITY_EQUAL_P(e)
#define EQUIV_OPERATOR_NAME
#define ENTITY_LESS_THAN_P(e)
#define NORMALIZE_EXPRESSION(e)
#define gt_expression(e1, e2)
#define NON_EQUIV_OPERATOR_NAME
#define and_expression(e1, e2)
#define binary_intrinsic_expression(name, e1, e2)
#define ne_expression(e1, e2)
#define ENTITY_GREATER_THAN_P(e)
#define ge_expression(e1, e2)
#define le_expression(e1, e2)
#define eq_expression(e1, e2)
#define ENTITY_NON_EQUIV_P(e)
#define ENTITY_LESS_OR_EQUAL_P(e)
#define ENTITY_GREATER_OR_EQUAL_P(e)
#define lt_expression(e1, e2)
#define or_expression(e1, e2)
#define ENTITY_EQUIV_P(e)
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
bool false_expression_p(expression e)
bool logical_operator_expression_p(expression e)
C xor is missing.
bool true_expression_p(expression e)
bool logical_expression_p(expression e)
expression make_false_expression()
bool relational_expression_p(expression e)
expression make_true_expression()
#define normalized_linear_p(x)
#define control_predecessors(x)
#define statement_domain
newgen_sizeofexpression_domain_defined
#define control_domain
newgen_controlmap_domain_defined
#define CONTROL(x)
CONTROL.
#define EXPRESSION(x)
EXPRESSION.
#define expression_undefined
@ is_instruction_unstructured
@ is_instruction_whileloop
@ is_instruction_sequence
#define instruction_tag(x)
#define control_successors(x)
#define test_condition(x)
#define statement_instruction(x)
#define call_arguments(x)
#define control_statement(x)
#define instruction_test(x)
#define expression_syntax(x)
The structure used to build lists in NewGen.