25 #include "pips_config.h"
46 #include "resources.h"
82 pips_user_warning(
"EXPRESSION_SUBSTITUTION_PATTERN undefined, but needed to perform expression substitution\n");
186 return pattern_set_p;
call make_call(entity a1, list a2)
syntax make_syntax_call(call _field_)
expression copy_expression(expression p)
EXPRESSION.
syntax copy_syntax(syntax p)
SYNTAX.
void free_expression(expression p)
void free_syntax(syntax p)
callees compute_callees(const statement stat)
Recompute the callees of a module statement.
struct _newgen_struct_statement_ * statement
const char * module_name(const char *s)
Return the module part of an entity name.
static void substitute_expression_walker(expression e, expression *pi)
static bool replace_instruction_similar_to_pattern(instruction i)
static bool set_pattern()
retrieves the expression used as a pattern based on the one - statement function given in a property ...
bool expression_substitution(const char *module_name)
simple pass that performs substitution of expression by module call
static bool replace_expression_similar_to_pattern(expression e)
static const char * pattern_module_name
static expression pattern
void substitute_expression(void *in, expression pattern, expression into)
expression_substitution.c
void convert_to_standard_operators(void *)
char * get_string_property(const char *)
#define gen_context_recurse(start, ctxt, domain_number, flt, rwt)
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.
statement get_current_module_statement(void)
Get the current module statement.
entity set_current_module_entity(entity)
static.c
void gen_multi_recurse(void *o,...)
Multi recursion visitor function.
bool gen_false(__attribute__((unused)) gen_chunk *unused)
Return false and ignore the argument.
bool gen_true2(__attribute__((unused)) gen_chunk *u1, __attribute__((unused)) void *u2)
void gen_null(__attribute__((unused)) void *unused)
Ignore the argument.
bool return_instruction_p(instruction i)
Test if an instruction is a C or Fortran "return".
#define ENDP(l)
Test if a list is empty.
list gen_nreverse(list cp)
reverse a list in place
#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)
#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.
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.
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_table_free(hash_table htp)
this function deletes a hash table that is no longer useful.
#define pips_user_warning
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define TOP_LEVEL_MODULE_NAME
Module containing the global variables in Fortran and C.
#define HASH_UNDEFINED_VALUE
value returned by hash_get() when the key is not found; could also be called HASH_KEY_NOT_FOUND,...
#define string_undefined_p(s)
bool module_reorder(statement body)
Reorder a module and recompute order to statement if any.
#define instruction_block_p(i)
#define instruction_block(i)
entity FindEntity(const char *package, const char *name)
Retrieve an entity from its package/module name and its local name.
bool entity_formal_p(entity p)
is p a formal parameter?
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
bool expression_similar_get_context_p(expression target, expression pattern, hash_table *symbol_table)
similar to expression_similar_p but the hash_map containing the crossref value is retured for further...
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 same_expression_p(expression e1, expression e2)
this is slightly different from expression_equal_p, as it will return true for a+b vs b+a
expression call_to_expression(call c)
Build an expression that call a function or procedure.
#define normalized_undefined
#define expression_domain
newgen_execution_domain_defined
#define code_declarations(x)
#define instruction_domain
newgen_functional_domain_defined
#define EXPRESSION(x)
EXPRESSION.
#define reference_domain
newgen_range_domain_defined
#define expression_undefined
#define expression_normalized(x)
#define instruction_call_p(x)
#define statement_instruction(x)
#define instruction_call(x)
#define call_arguments(x)
#define expression_syntax(x)
#define range_domain
newgen_ram_domain_defined
#define STATEMENT(x)
STATEMENT.
#define entity_initial(x)
The structure used to build lists in NewGen.
#define exp
Avoid some warnings from "gcc -Wshadow".