25 #include "pips_config.h"
92 error_reset_current_statement_stack();
93 error_reset_current_control_stack();
104 control cc = current_control_empty_p() ?
142 current_statement_replace(s);
194 bool skip_this_expression =
false;
207 if(!skip_this_expression) {
380 current_control_rewrite,
382 current_statement_rewrite,
403 "Statement at entry:\n");
407 make_current_statement_stack();
408 make_current_control_stack();
424 free_current_statement_stack();
425 free_current_control_stack();
430 "Statement at exit:\n");
static hash_table seen
static function to store whether a module has been seen during the recursive generation of the daVinc...
expression make_expression(syntax a1, normalized a2)
basic copy_basic(basic p)
BASIC.
reference make_reference(entity a1, list a2)
statement make_statement(entity a1, intptr_t a2, intptr_t a3, string a4, instruction a5, list a6, string a7, extensions a8, synchronization a9)
void free_subscript(subscript p)
syntax copy_syntax(syntax p)
SYNTAX.
synchronization make_synchronization_none(void)
control make_control(statement a1, list a2, list a3)
syntax make_syntax_reference(reference _field_)
struct _newgen_struct_entity_ * entity
static reference ref
Current stmt (an integer)
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
#define gen_recurse(start, domain_number, flt, rwt)
entity get_current_module_entity(void)
Get the entity of the current module.
void gen_recurse_stop(void *obj)
Tells the recursion not to go in this object.
void gen_multi_recurse(void *o,...)
Multi recursion visitor function.
bool gen_true(__attribute__((unused)) gen_chunk *unused)
Return true and ignore the argument.
instruction make_instruction_block(list statements)
Build an instruction block from a list of statements.
#define REFCAR(pc)
Get the adress of the first element of a list.
#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 CAR(pcons)
Get the value of the first element of a list.
list gen_last(list l)
Return the last element of a list.
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
#define MAPL(_map_list_cp, _code, _l)
Apply some code on the addresses of all the elements of a list.
list gen_insert_before(const void *no, const void *o, list l)
statement make_assign_statement(expression, expression)
bool expression_constant_p(expression)
HPFC module by Fabien COELHO.
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
void reset_hooks_unregister(reset_func_t)
remove registered cleanup hook.
void reset_hooks_register(reset_func_t)
reset_hooks.c
#define STATEMENT_ORDERING_UNDEFINED
mapping.h inclusion
#define DEFINE_LOCAL_STACK(name, type)
#define same_string_p(s1, s2)
int bool
we cannot use an enum or stdbool because we need to be compatible with newgen, thus boolean need to h...
void normalize_all_expressions_of(void *obj)
void print_expression(expression e)
no file descriptor is passed to make is easier to use in a debugging stage.
void print_statement(statement)
Print a statement on stderr.
void create(char *workspace_name, char **filenames)
create a new workspace...
#define ENTITY_PLUS_UPDATE_P(e)
#define instruction_block_p(i)
#define ENTITY_DEREFERENCING_P(e)
#define STATEMENT_NUMBER_UNDEFINED
default values
#define ENTITY_PLUS_C_P(e)
#define binary_call_lhs(c)
#define instruction_block(i)
#define ENTITY_ADDRESS_OF_P(e)
#define empty_comments
Empty comments (i.e.
const char * entity_local_name(entity e)
entity_local_name modified so that it does not core when used in vect_fprint, since someone thought t...
entity entity_empty_label(void)
bool expression_call_p(expression e)
call expression_call(expression e)
void update_expression_syntax(expression e, syntax s)
frees expression syntax of e and replace it by the new syntax s
bool expression_reference_p(expression e)
Test if an expression is a reference.
extensions empty_extensions(void)
extension.c
basic basic_of_expression(expression)
basic basic_of_expression(expression exp): Makes a basic of the same basic as the expression "exp".
void AddEntityToCurrentModule(entity)
Add a variable entity to the current module declarations.
#define test_domain
newgen_entity_domain_defined
#define normalized_undefined
#define expression_domain
newgen_execution_domain_defined
#define control_undefined
#define syntax_reference(x)
#define control_predecessors(x)
#define statement_ordering(x)
#define statement_domain
newgen_sizeofexpression_domain_defined
#define control_domain
newgen_controlmap_domain_defined
#define CONTROL(x)
CONTROL.
#define range_increment(x)
#define call_domain
newgen_callees_domain_defined
#define basic_overloaded_p(x)
#define basic_undefined_p(x)
#define EXPRESSION(x)
EXPRESSION.
#define subscript_indices(x)
#define statement_label(x)
#define reference_domain
newgen_range_domain_defined
#define reference_indices(x)
#define statement_extensions(x)
#define control_successors(x)
#define control_undefined_p(x)
#define test_condition(x)
#define subscript_array(x)
#define whileloop_domain
newgen_variable_domain_defined
#define statement_instruction(x)
#define statement_comments(x)
#define syntax_subscript(x)
#define call_arguments(x)
#define control_statement(x)
#define whileloop_condition(x)
#define syntax_range_p(x)
#define statement_number(x)
#define expression_syntax(x)
#define range_domain
newgen_ram_domain_defined
#define STATEMENT(x)
STATEMENT.
#define syntax_subscript_p(x)
static statement current_statement
static void compute_before_current_statement(expression *pe)
static void ref_rwt(reference r)
static void atomize_object(gen_chunk *)
void atomize_as_required(stat, ref_decide, call_decide, test_decide, range_decide,...
static void cleanup_subscript_pre(expression exp)
static bool(* range_atomize_decision)()
static bool(* ref_atomize_decision)()
static functions used
static void cleanup_subscript(expression e)
static entity(* create_new_variable)()
void atomize_as_required(statement stat, bool(*ref_decide)(reference, expression), bool(*call_decide)(call, expression), bool(*test_decide)(test, expression), bool(*range_decide)(range, expression), bool(*while_decide)(whileloop, expression), entity(*new)(entity, basic))
static void whileloop_rwt(whileloop w)
static bool(* call_atomize_decision)()
void cleanup_subscripts(void *obj)
static void test_rwt(test t)
static void insert_before_current_statement(statement s)
s is inserted before the current statement.
static bool(* test_atomize_decision)()
static bool(* while_atomize_decision)()
static void simple_atomize_error_handler()
the stack of the encoutered statements is maintained to be able to insert the needed computations jus...
statement atomize_this_expression(entity(*create)(entity, basic), expression e)
returns the assignment statement is moved, or NULL if not.
static void call_rwt(call c)
static void range_rwt(range r)
static void exp_range_rwt(range r, expression *pe)
The structure used to build lists in NewGen.
A gen_chunk is used to store every object.
#define exp
Avoid some warnings from "gcc -Wshadow".