2 #include "pips_config.h"
17 #include "resources.h"
23 static void remove_guard(
test t)
141 bool must_guard=
false;
267 debug_on(
"LOOP_EXPANSION_DEBUG_LEVEL");
272 bool apply_guard =
ENDP(statements_to_merge) &&
ENDP(statements_to_clean);
297 "Which loop do you want to expand?\n(give its label):"
406 debug_on(
"LOOP_EXPANSION_INIT_DEBUG_LEVEL");
411 "Which loop do you want to expand?\n(give its label):"
clone_context make_clone_context(entity a1, entity a2, list a3, statement a4)
void free_clone_context(clone_context p)
instruction make_instruction_loop(loop _field_)
loop make_loop(entity a1, range a2, statement a3, entity a4, execution a5, list a6)
expression copy_expression(expression p)
EXPRESSION.
statement copy_statement(statement p)
STATEMENT.
void free_extensions(extensions p)
test make_test(expression a1, statement a2, statement a3)
execution make_execution_sequential(void)
instruction make_instruction_test(test _field_)
void free_expression(expression p)
range make_range(expression a1, expression a2, expression a3)
bool region_to_minimal_dimensions(effect, transformer, list *, list *, bool, expression *)
statement clone_statement(statement s, clone_context cc)
clone_statement.c
struct _newgen_struct_statement_ * statement
#define region_any_reference(reg)
To be avoided.
list regions_write_regions(list)
list regions_read_regions(list)
void reset_proper_rw_effects(void)
void set_proper_rw_effects(statement_effects)
void set_cumulated_rw_effects(statement_effects)
list load_cumulated_rw_effects_list(statement)
void reset_cumulated_rw_effects(void)
#define effect_write_p(eff)
entity effect_entity(effect)
cproto-generated files
bool empty_string_p(const char *s)
const char * module_name(const char *s)
Return the module part of an entity name.
expression string_to_expression(const char *s, entity module)
Functions using simultaneously pipsdbm, which is based on strings, and ri-util, which contains basic ...
char * get_string_property(const char *)
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)
statement instruction_to_statement(instruction)
Build a statement from a give instruction.
void reset_current_module_entity(void)
Reset the current module entity.
void reset_current_module_statement(void)
Reset the current module statement.
const char * get_current_module_name(void)
Get the name of the current module.
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
entity get_current_module_entity(void)
Get the entity of the current module.
gen_chunk * gen_get_ancestor(int, const void *)
return the first ancestor object found of the given type.
bool gen_true(__attribute__((unused)) gen_chunk *unused)
Return true and ignore the argument.
instruction make_continue_instruction()
Creates a CONTINUE instruction, that is the FORTRAN nop, the ";" in C or the "pass" in Python for exa...
#define ENDP(l)
Test if a list is empty.
#define NIL
The empty list (nil in Lisp)
void gen_free_list(list l)
free the spine of the 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.
list statement_block(statement)
Get the list of block statements of a statement sequence.
loop statement_loop(statement)
Get the loop of a statement.
test statement_test(statement)
Get the test of a statement.
bool statement_test_p(statement)
bool statement_loop_p(statement)
statement make_assign_statement(expression, expression)
statement update_statement_instruction(statement, instruction)
Replace the instruction in statement s by instruction i.
list statement_to_declarations(void *)
Get a list of all variables declared recursively within a statement.
list find_statements_with_pragma(statement, const char *)
Get a list of statements with pragma begining with a prefix.
void insert_statement(statement, statement, bool)
This is the normal entry point.
bool expression_constant_p(expression)
HPFC module by Fabien COELHO.
static void do_loop_expansion(statement st, expression size, bool center, bool apply_guard)
bool loop_expansion(const char *module_name)
loop_expansion.c
bool loop_expansion_init(const char *module_name)
first step of the loop expansion process: create a statement to insert and flag it with a pragma
static void do_loop_expansion_init(statement st, expression size)
creates a new statement that perfom the expansion of the loop this statement is flagged for further p...
static void guard_expanded_statement(statement s, expression guard)
create a guard guard around statement s
static void guard_expanded_statement_if_needed(statement s, expression guard, loop parent_loop)
create a guard guard around statement s if needed it is needed when a not-private variable (that is n...
#define pips_user_warning
set set_assign_list(set, const list)
assigns a list contents to a set all duplicated elements are lost
bool set_belong_p(const set, const void *)
set set_make(set_type)
Create an empty set of any type but hash_private.
const char * get_string_property_or_ask(const char *, const char[])
bool module_reorder(statement body)
Reorder a module and recompute order to statement if any.
#define MINUS_OPERATOR_NAME
#define PLUS_OPERATOR_NAME
#define statement_block_p(stat)
#define AND_OPERATOR_NAME
FI: intrinsics are defined at a third place after bootstrap and effects! I guess the name should be d...
#define DIVIDE_OPERATOR_NAME
#define GREATER_OR_EQUAL_OPERATOR_NAME
#define MULTIPLY_OPERATOR_NAME
#define LESS_OR_EQUAL_OPERATOR_NAME
#define make_empty_statement
An alias for make_empty_block_statement.
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
entity entity_empty_label(void)
set get_referenced_entities(void *elem)
retrieves the set of entities used in elem beware that this entities may be formal parameters,...
entity entity_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
expression range_to_expression(range r, enum range_to_expression_mode mode)
computes the distance between the lower bound and the upper bound of the range
expression entity_to_expression(entity e)
if v is a constant, returns a constant call.
expression MakeBinaryCall(entity f, expression eg, expression ed)
Creates a call expression to a function with 2 arguments.
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
expression make_op_exp(char *op_name, expression exp1, expression exp2)
================================================================
extensions empty_extensions(void)
extension.c
void add_pragma_str_to_statement(statement st, const char *s, bool copy_flag)
Add a string as a pragma to a statement.
basic basic_of_expression(expression)
basic basic_of_expression(expression exp): Makes a basic of the same basic as the expression "exp".
entity make_new_scalar_variable(entity, basic)
void AddEntityToCurrentModule(entity)
Add a variable entity to the current module declarations.
entity find_label_entity(const char *, const char *)
util.c
#define test_domain
newgen_entity_domain_defined
#define reference_variable(x)
#define statement_domain
newgen_sizeofexpression_domain_defined
#define range_increment(x)
#define entity_undefined_p(x)
#define expression_undefined
#define statement_extensions(x)
#define test_condition(x)
#define statement_undefined_p(x)
#define statement_undefined
#define STATEMENT(x)
STATEMENT.
void module_to_value_mappings(entity m)
void module_to_value_mappings(entity m): build hash tables between variables and values (old,...
transformer load_statement_precondition(statement)
void reset_precondition_map(void)
void set_precondition_map(statement_mapping)
FI: I do not understand why the type is duplicated at the set level.
The structure used to build lists in NewGen.