PIPS
|
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "effects.h"
#include "dg.h"
#include "graph.h"
#include "ri-util.h"
#include "effects-util.h"
#include "text-util.h"
#include "database.h"
#include "misc.h"
#include "pipsdbm.h"
#include "resources.h"
#include "control.h"
#include "arithmetique.h"
#include "effects-generic.h"
#include "effects-simple.h"
#include "atomizer.h"
Go to the source code of this file.
Data Structures | |
struct | atomizer_param |
Typedefs | |
typedef dg_arc_label | arc_label |
An atomizer that uses the one made by Fabien Coelho for HPFC, and is in fact just a hacked version of the one made by Ronan Keryell... More... | |
typedef dg_vertex_label | vertex_label |
Functions | |
static void | atomize_call (expression, atomizer_param *) |
static void | do_atomize_call (expression parent, atomizer_param *p, list expressions) |
static bool | atomize_call_filter (expression parent, atomizer_param *p) |
static void | atomize_all (void *v, atomizer_param *p) |
static void | atomize_statement (statement stat) |
This function is called for all statements in the code. More... | |
bool | new_atomizer (char *mod_name) |
Mappings for the cumulated effects of statements. More... | |
typedef dg_arc_label arc_label |
An atomizer that uses the one made by Fabien Coelho for HPFC, and is in fact just a hacked version of the one made by Ronan Keryell...
Definition at line 44 of file new_atomizer.c.
typedef dg_vertex_label vertex_label |
Definition at line 45 of file new_atomizer.c.
|
static |
Definition at line 137 of file new_atomizer.c.
References atomize_call(), atomize_call_filter(), expression_domain, and gen_context_multi_recurse().
Referenced by atomize_statement().
|
static |
Definition at line 107 of file new_atomizer.c.
References call_arguments, do_atomize_call(), ENDP, expression_call(), expression_call_p(), expression_reference(), expression_reference_p(), ref, and reference_indices.
Referenced by atomize_all().
|
static |
do not visit rhs of . and ->
Definition at line 123 of file new_atomizer.c.
References binary_call_rhs, call_constant_p, call_function, ENTITY_FIELD_P, ENTITY_POINT_TO_P, expression_call(), expression_call_p(), gen_recurse_stop(), and pips_assert.
Referenced by atomize_all().
|
static |
This function is called for all statements in the code.
SG: we could atomize condition in test, loops etc too
this may cause a useless atomization if i is an expression
Definition at line 146 of file new_atomizer.c.
References atomize_all(), CONS, EFFECT, effect_any_reference, effects_write_effects(), ENDP, FOREACH, gen_nreverse(), insert_statement(), atomizer_param::inserted_statements, instruction_call_p, instruction_expression_p, load_cumulated_rw_effects_list(), make_block_statement(), NIL, REFERENCE, statement_instruction, and atomizer_param::written_references.
Referenced by new_atomizer().
|
static |
stop if call directly involves a written reference
go on and atomize, that is
Definition at line 69 of file new_atomizer.c.
References AddEntityToCurrentModule(), basic_of_expression(), CONS, EFFECT, effect_any_reference, entity_field_p(), entity_to_expression(), EXPRESSION, expression_reference(), expression_reference_p(), expression_syntax, FOREACH, gen_full_free_list(), get_current_module_entity(), atomizer_param::inserted_statements, make_assign_statement(), make_expression(), make_new_scalar_variable(), make_reference(), make_syntax_reference(), NIL, normalized_undefined, proper_effects_of_expression(), REFERENCE, reference_variable, references_may_conflict_p(), STATEMENT, syntax_undefined, update_expression_syntax(), and atomizer_param::written_references.
Referenced by atomize_call().
bool new_atomizer | ( | char * | mod_name | ) |
Mappings for the cumulated effects of statements.
extern statement_mapping cumulated_effects_map; cproto-generated files new_atomizer.c
get the resources
Now do the job
Reorder the module, because new statements have been added
update/release resources
mod_name | od_name |
Definition at line 164 of file new_atomizer.c.
References atomize_statement(), clean_up_sequences(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, gen_recurse, gen_true(), get_current_module_statement(), module_name_to_entity(), module_reorder(), reset_cumulated_rw_effects(), reset_current_module_entity(), reset_current_module_statement(), set_cumulated_rw_effects(), set_current_module_entity(), set_current_module_statement(), and statement_domain.