25 #include "pips_config.h"
401 list new_declarations_initialization =
NIL;
412 new_declarations_initialization=
CONS(
STATEMENT,ns,new_declarations_initialization);
416 instruction new_instruction_with_decl =
ENDP(new_declarations_initialization)?
430 new_instruction_with_decl,
instruction make_instruction_loop(loop _field_)
syntax make_syntax_application(application _field_)
cast make_cast(type a1, expression a2)
call make_call(entity a1, list a2)
instruction make_instruction_forloop(forloop _field_)
sizeofexpression make_sizeofexpression_expression(expression _field_)
syntax make_syntax_call(call _field_)
expression make_expression(syntax a1, normalized a2)
reference check_reference(reference p)
whileloop make_whileloop(expression a1, statement a2, entity a3, evaluation a4)
application make_application(expression a1, list a2)
loop make_loop(entity a1, range a2, statement a3, entity a4, execution a5, list a6)
subscript make_subscript(expression a1, list a2)
storage make_storage_rom(void)
syntax make_syntax_sizeofexpression(sizeofexpression _field_)
type copy_type(type p)
TYPE.
basic copy_basic(basic p)
BASIC.
instruction make_instruction_expression(expression _field_)
reference make_reference(entity a1, list a2)
sizeofexpression copy_sizeofexpression(sizeofexpression p)
SIZEOFEXPRESSION.
test make_test(expression a1, statement a2, statement a3)
execution make_execution_sequential(void)
statement make_statement(entity a1, intptr_t a2, intptr_t a3, string a4, instruction a5, list a6, string a7, extensions a8, synchronization a9)
instruction make_instruction_sequence(sequence _field_)
evaluation copy_evaluation(evaluation p)
EVALUATION.
instruction make_instruction_test(test _field_)
instruction make_instruction_call(call _field_)
syntax make_syntax_va_arg(list _field_)
void free_storage(storage p)
syntax make_syntax_cast(cast _field_)
synchronization make_synchronization_none(void)
instruction make_instruction_multitest(multitest _field_)
sequence make_sequence(list a)
instruction make_instruction_whileloop(whileloop _field_)
multitest make_multitest(expression a1, statement a2)
forloop make_forloop(expression a1, expression a2, expression a3, statement a4)
syntax make_syntax_range(range _field_)
bool entity_consistent_p(entity p)
syntax make_syntax_subscript(subscript _field_)
range make_range(expression a1, expression a2, expression a3)
syntax make_syntax_reference(reference _field_)
static application do_clone_application(application a, clone_context cc, hash_table ht)
static call do_clone_call(call c, clone_context cc, hash_table ht)
static loop do_clone_loop(loop l, clone_context cc, hash_table ht)
static cast do_clone_cast(cast c, clone_context cc, hash_table ht)
static test do_clone_test(test t, clone_context cc, hash_table ht)
static entity do_clone_entity(entity e, clone_context cc, hash_table ht)
static subscript do_clone_subscript(subscript s, clone_context cc, hash_table ht)
static sizeofexpression do_clone_sizeofexpression(sizeofexpression s, clone_context cc, hash_table ht)
statement clone_statement(statement s, clone_context cc)
clone_statement.c
static entity do_clone_label(entity l, clone_context cc)
static range do_clone_range(range r, clone_context cc, hash_table ht)
static forloop do_clone_forloop(forloop f, clone_context cc, hash_table ht)
static multitest do_clone_multitest(multitest m, clone_context cc, hash_table ht)
static instruction do_clone_instruction(instruction i, clone_context cc, hash_table ht)
static gen_chunk * do_clone_reference(reference r, clone_context cc, hash_table ht)
nd formard declarations
static statement do_clone_statement(statement s, clone_context cc, hash_table ht)
static syntax do_clone_syntax(syntax s, clone_context cc, hash_table ht)
static sequence do_clone_sequence(sequence s, clone_context cc, hash_table ht)
static whileloop do_clone_whileloop(whileloop w, clone_context cc, hash_table ht)
static expression do_clone_expression(expression e, clone_context cc, hash_table ht)
forward declarations
#define clone_context_new_module_statement(x)
#define clone_context_labels(x)
#define clone_context_new_module(x)
#define gen_chunk_undefined_p(c)
statement instruction_to_statement(instruction)
Build a statement from a give instruction.
#define ENDP(l)
Test if a list is empty.
list gen_nreverse(list cp)
reverse a list in place
#define POP(l)
Modify a list pointer to point on the next element of the 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.
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
void * gen_find_eq(const void *item, const list seq)
list gen_full_copy_list(list l)
Copy a list structure with element copy.
statement make_assign_statement(expression, expression)
hash_table hash_table_make(hash_key_type key_type, size_t size)
void * hash_get(const hash_table htp, const void *key)
this function retrieves in the hash table pointed to by htp the couple whose key is equal to key.
void hash_put(hash_table htp, const void *key, const void *val)
This functions stores a couple (key,val) in the hash table pointed to by htp.
void hash_table_free(hash_table htp)
this function deletes a hash table that is no longer useful.
#define new_statements(p)
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define pips_internal_error
#define MODULE_SEP
special characters to build entity names of various kinds
#define STATEMENT_ORDERING_UNDEFINED
mapping.h inclusion
#define HASH_UNDEFINED_VALUE
value returned by hash_get() when the key is not found; could also be called HASH_KEY_NOT_FOUND,...
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
#define INSTANCE_OF(type, value)
polymorhism thanks to newgen !
#define STATEMENT_NUMBER_UNDEFINED
default values
#define empty_comments
Empty comments (i.e.
#define entity_constant_p(e)
bool entity_struct_p(entity e)
Is entity e the entity corresponding to a struct declaration?
bool entity_array_p(entity e)
Is e a variable with an array type?
bool same_entity_p(entity e1, entity e2)
predicates on entities
bool entity_enum_p(entity e)
bool typedef_entity_p(entity e)
entity entity_empty_label(void)
basic entity_basic(entity e)
return the basic associated to entity e if it's a function/variable/constant basic_undefined otherwis...
bool entity_empty_label_p(entity e)
entity make_new_label(entity module)
This function returns a new label.
bool entity_union_p(entity e)
Is entity e an entity representing the union declaration?
expression entity_to_expression(entity e)
if v is a constant, returns a constant call.
extensions empty_extensions(void)
extension.c
void AddLocalEntityToDeclarations(entity, entity, statement)
Add the variable entity e to the list of variables of the function module.
bool entity_scalar_p(entity)
The concrete type of e is a scalar type.
entity make_new_array_variable_with_prefix(const char *, entity, basic, list)
J'ai ameliore la fonction make_new_scalar_variable_with_prefix
entity make_new_derived_entity_with_prefix(const char *, entity, type)
derived from make_new_scalar_variable_with_prefix
entity make_new_scalar_variable_with_prefix(const char *, entity, basic)
Create a new scalar variable of type b in the given module.
@ is_sizeofexpression_expression
@ is_sizeofexpression_type
#define sizeofexpression_tag(x)
#define normalized_undefined
#define syntax_reference(x)
#define forloop_initialization(x)
#define reference_variable(x)
#define basic_typedef_p(x)
#define SIZEOFEXPRESSION(x)
SIZEOFEXPRESSION.
#define forloop_increment(x)
#define instruction_loop(x)
#define sizeofexpression_expression(x)
#define multitest_controller(x)
#define instruction_multitest(x)
#define value_unknown_p(x)
#define syntax_application(x)
#define whileloop_evaluation(x)
#define basic_derived_p(x)
#define entity_storage(x)
#define instruction_undefined_p(x)
@ is_syntax_sizeofexpression
#define range_increment(x)
#define EXPRESSION(x)
EXPRESSION.
#define cast_expression(x)
#define application_arguments(x)
#define subscript_indices(x)
#define instruction_undefined
#define statement_label(x)
#define entity_undefined_p(x)
@ is_instruction_unstructured
@ is_instruction_whileloop
@ is_instruction_expression
@ is_instruction_multitest
@ is_instruction_sequence
#define instruction_tag(x)
#define whileloop_label(x)
#define sequence_statements(x)
#define reference_indices(x)
#define syntax_sizeofexpression(x)
#define instruction_sequence(x)
#define instruction_forloop(x)
#define instruction_expression(x)
#define expression_undefined_p(x)
#define test_condition(x)
#define subscript_array(x)
#define instruction_whileloop(x)
#define application_function(x)
#define variable_dimensions(x)
#define whileloop_body(x)
#define statement_declarations(x)
#define statement_instruction(x)
#define instruction_call(x)
#define syntax_subscript(x)
#define forloop_condition(x)
#define multitest_body(x)
#define sizeofexpression_undefined
#define call_arguments(x)
#define instruction_test(x)
#define statement_undefined_p(x)
#define whileloop_condition(x)
#define value_expression_p(x)
#define expression_syntax(x)
#define type_variable_p(x)
#define value_expression(x)
#define test_undefined_p(x)
#define variable_basic(x)
#define STATEMENT(x)
STATEMENT.
#define entity_initial(x)
The structure used to build lists in NewGen.
A gen_chunk is used to store every object.