26 #ifdef BUILDER_FORCE_REGISTER_DECLARATIONS
29 #include "pips_config.h"
78 static bool drv_call_flt(
const call c, drv_context * ctx)
98 static bool drv_reference_flt(
const reference r, drv_context * ctx)
113 static void drv_collect(
gen_chunk *
object, drv_context * ctx)
134 static bool cut_declarations_flt(
statement s, cd_context * ctx)
153 pips_assert(
"declaration statement is in a sequence",
163 bool nswitched =
false;
238 static bool variable_can_switch_to_register(
entity var)
263 static list make_it_register(
list lq)
286 debug_on(
"PIPS_REGISTERS_DEBUG_LEVEL");
293 drv_collect((
void *) stat, &ctx);
307 variable_can_switch_to_register(var))
343 set_free(ctx.invalidated), ctx.invalidated = NULL;
344 set_free(switched), switched = NULL;
void free_qualifier(qualifier p)
qualifier make_qualifier_register(void)
struct _newgen_struct_statement_ * statement
const char * module_name(const char *s)
Return the module part of an entity name.
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
#define gen_context_recurse(start, ctxt, domain_number, flt, rwt)
#define gen_get_ancestor_type(i, o)
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_null2(__attribute__((unused)) void *u1, __attribute__((unused)) void *u2)
idem with 2 args, to please overpeaky compiler checks
bool gen_false(__attribute__((unused)) gen_chunk *unused)
Return false and ignore the argument.
void gen_null(__attribute__((unused)) void *unused)
Ignore the argument.
list gen_insert_list(list nl, const void *item, list l, bool before)
insert nl before or after item in list l, both initial lists are consumed
list gen_nreverse(list cp)
reverse a list in place
#define NIL
The empty list (nil in Lisp)
size_t gen_length(const list l)
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
#define CAR(pcons)
Get the value of the first element of a list.
void gen_free_list(list l)
free the spine of the list
bool gen_in_list_p(const void *vo, const list lx)
tell whether vo belongs to lx
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
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.
statement make_declarations_statement(list, int, string)
Make a declaration(s) statement.
bool declaration_statement_p(statement)
Had to be optimized according to Beatrice Creusillet.
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.
bool hash_defined_p(const hash_table htp, const void *key)
true if key has e value in htp.
#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 HASH_FOREACH(key_type, k, value_type, v, ht)
bool set_belong_p(const set, const void *)
set set_make(set_type)
Create an empty set of any type but hash_private.
set set_add_element(set, const set, const void *)
bool module_reorder(statement body)
Reorder a module and recompute order to statement if any.
#define entity_declarations(e)
MISC: newgen shorthands.
#define entity_variable_p(e)
An entity_variable_p(e) may hide a typedef and hence a functional type.
#define ENTITY_ADDRESS_OF_P(e)
bool entity_formal_p(entity p)
is p a formal parameter?
bool entity_array_p(entity e)
Is e a variable with an array type?
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
bool top_level_entity_p(entity e)
Check if the scope of entity e is global.
bool entity_pointer_p(entity e)
bool entity_static_variable_p(entity)
return true if the entity is declared with the keyword static
#define qualifier_register_p(x)
#define syntax_reference_p(x)
struct _newgen_struct_sequence_ * sequence
#define syntax_reference(x)
#define reference_variable(x)
#define entity_storage(x)
#define statement_domain
newgen_sizeofexpression_domain_defined
#define qualifier_auto_p(x)
#define call_domain
newgen_callees_domain_defined
#define EXPRESSION(x)
EXPRESSION.
#define reference_domain
newgen_range_domain_defined
#define sizeofexpression_domain
newgen_sequence_domain_defined
#define sequence_statements(x)
#define reference_indices(x)
#define variable_qualifiers(x)
#define variable_dimensions(x)
#define statement_declarations(x)
#define statement_comments(x)
#define call_arguments(x)
#define statement_number(x)
#define expression_syntax(x)
#define sequence_domain
newgen_reference_domain_defined
#define STATEMENT(x)
STATEMENT.
#define entity_initial(x)
FI: I do not understand why the type is duplicated at the set level.
The structure used to build lists in NewGen.
A gen_chunk is used to store every object.