27 #if defined(BUILDER_INDEX_SET_SPLITTING) || \
28 defined(BUILDER_FORCE_LOOP_FUSION)
31 #include "pips_config.h"
57 pips_user_error(
"please set INDEX_SET_SPLITTING_BOUND property to an entity that is not the loop bound\n");
78 statement the_second_loop_statement = second_loop_statement;
83 the_second_loop_statement=s;
88 bool index_set_split_before_bound =
get_bool_property(
"INDEX_SET_SPLITTING_SPLIT_BEFORE_BOUND");
103 expression new_loop_bound_expression_with_xcrement =
109 expression fst_loop_upper = index_set_split_before_bound ?
110 new_loop_bound_expression_with_xcrement:
111 new_loop_bound_expression;
113 expression snd_loop_lower = index_set_split_before_bound ?
114 new_loop_bound_expression:
115 new_loop_bound_expression_with_xcrement;
158 pips_user_error(
"please set INDEX_SET_SPLITTING_BOUND property to a known entity\n");
164 if( sscanf(loop_bound,
"%d",&integer)==1 )
177 pips_user_error(
"please set INDEX_SET_SPLITTING_BOUND property to a known entity\n");
185 index_set_split_loop(loop_statement,loop_bound_entity);
230 if(try_loop_fusion(st,next))
242 static void do_loop_fusion(
entity lbl) {
262 do_loop_fusion(loop_label_entity);
clone_context make_clone_context(entity a1, entity a2, list a3, statement a4)
void free_clone_context(clone_context p)
expression copy_expression(expression p)
EXPRESSION.
statement copy_statement(statement p)
STATEMENT.
instruction make_instruction_sequence(sequence _field_)
sequence make_sequence(list a)
bdt base
Current expression.
statement clone_statement(statement s, clone_context cc)
clone_statement.c
entity make_C_or_Fortran_constant_entity(const char *name, tag bt, size_t size, bool is_fortran, bool(*error_manager)(const char *, const char *))
This function creates a constant.
const char * module_name(const char *s)
Return the module part of an entity name.
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_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
entity get_current_module_entity(void)
Get the entity of the current module.
void replace_entities(void *s, hash_table ht)
Recursively substitute a set of entities in a statement.
void gen_recurse_stop(void *obj)
Tells the recursion not to go in this object.
bool gen_true2(__attribute__((unused)) gen_chunk *u1, __attribute__((unused)) void *u2)
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 POP(l)
Modify a list pointer to point on the next element of the list.
#define NIL
The empty list (nil in Lisp)
#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.
#define CDR(pcons)
Get the list less its first element.
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.
loop statement_loop(statement)
Get the loop of a statement.
bool statement_loop_p(statement)
statement update_statement_instruction(statement, instruction)
Replace the instruction in statement s by instruction i.
void insert_statement(statement, statement, bool)
This is the normal entry point.
hash_table hash_table_make(hash_key_type key_type, size_t size)
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 pips_user_warning
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define STATEMENT_ORDERING_UNDEFINED
mapping.h inclusion
#define HASH_DEFAULT_SIZE
#define string_undefined_p(s)
bool module_reorder(statement body)
Reorder a module and recompute order to statement if any.
#define MAX_OPERATOR_NAME
#define MINUS_OPERATOR_NAME
#define PLUS_OPERATOR_NAME
#define DEFAULT_INTEGER_TYPE_SIZE
#define STATEMENT_NUMBER_UNDEFINED
default values
#define binary_intrinsic_expression(name, e1, e2)
#define make_statement_list(stats...)
easy list constructor
#define empty_comments
Empty comments (i.e.
#define MIN_OPERATOR_NAME
bool same_entity_p(entity e1, entity e2)
predicates on entities
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
entity FindEntityFromUserName(const char *package, const char *name)
entity entity_empty_label(void)
bool fortran_module_p(entity m)
Test if a module is in Fortran.
bool expression_integer_value(expression e, intptr_t *pval)
expression entity_to_expression(entity e)
if v is a constant, returns a constant call.
bool range_equal_p(range r1, range r2)
entity find_label_entity(const char *, const char *)
util.c
#define statement_ordering(x)
#define range_increment(x)
#define statement_label(x)
#define entity_undefined_p(x)
#define sequence_statements(x)
#define instruction_sequence(x)
#define statement_declarations(x)
#define statement_instruction(x)
#define statement_comments(x)
#define statement_decls_text(x)
#define statement_undefined_p(x)
#define statement_number(x)
#define sequence_domain
newgen_reference_domain_defined
#define statement_undefined
#define STATEMENT(x)
STATEMENT.
Psysteme new_loop_bound(Psysteme scn, Pbase base_index)
Psysteme new_loop_bound(Psysteme scn, Pbase base_index) computation of the new iteration space (given...
The structure used to build lists in NewGen.