25 #include "pips_config.h"
35 #include "resources.h"
97 bool loopIndFound =
false;
114 else if((coeff != 0) &&
160 return (coeff2 - coeff1);
186 printf(
"not write ref\n");
197 bool bRefPut =
false;
218 bool bReplaceKeyRef =
false;
255 bReplaceKeyRef =
true;
335 for(i = minOff; i <= maxOff; i++)
371 if(sameOff != curOff)
434 for(i = diff; i > 0; i--)
480 printf(
"adddddddddddddddddddddddddddddd\n");
485 printf(
"remove_write_ref done\n");
542 if(minOff == maxBefOff)
550 printf(
"maxOff: %d\n", maxOff);
551 printf(
"minOff: %d\n", minOff);
567 (maxOff - minOff), loopInd);
615 debug_on(
"SIMD_LOOP_CONST_ELIM_SCALAR_EXPANSION_DEBUG_LEVEL");
644 pips_assert(
"Statement is consistent after SIMD_SCALAR_EXPANSION",
call make_call(entity a1, list a2)
expression copy_expression(expression p)
EXPRESSION.
statement copy_statement(statement p)
STATEMENT.
reference make_reference(entity a1, list a2)
bool statement_consistent_p(statement p)
void free_instruction(instruction p)
reference copy_reference(reference p)
REFERENCE.
static reference ref
Current stmt (an integer)
static graph dg
dg is the dependency graph ; FIXME : should not be static global ?
list reference_indices_entity_list(reference ref)
bool code_has_write_eff_ref_p(reference ref, statement stat)
void comEngine_replace_reference_in_stat(statement stat, reference ref, expression new)
struct _newgen_struct_reference_ * reference
#define CONFLICT(x)
CONFLICT.
#define dg_arc_label_conflicts(x)
#define conflict_source(x)
void set_cumulated_rw_effects(statement_effects)
void reset_cumulated_rw_effects(void)
#define effect_any_reference(e)
FI: cannot be used as a left hand side.
#define effect_write_p(eff)
const char * module_name(const char *s)
Return the module part of an entity name.
#define gen_recurse(start, domain_number, flt, rwt)
#define successor_arc_label(x)
struct _newgen_struct_graph_ * graph
#define vertex_successors(x)
#define SUCCESSOR(x)
SUCCESSOR.
#define graph_vertices(x)
statement make_block_statement(list)
Make a block statement from a list of statement.
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.
bool gen_true(__attribute__((unused)) gen_chunk *unused)
Return true and ignore the argument.
instruction make_instruction_block(list statements)
Build an instruction block from a list of statements.
list gen_make_list(int domain,...)
#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)
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.
void gen_free_list(list l)
free the spine of the list
list gen_last(list l)
Return the last element of a list.
#define CDR(pcons)
Get the list less its first element.
#define MAPL(_map_list_cp, _code, _l)
Apply some code on the addresses of all the elements of a list.
gen_chunk gen_nth(int n, const list l)
to be used as ENTITY(gen_nth(3, l))...
#define MAP(_map_CASTER, _map_item, _map_code, _map_list)
Apply/map an instruction block on all the elements of a list (old fashioned)
list gen_insert_before(const void *no, const void *o, list l)
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 make_assign_statement(expression, expression)
void hash_dont_warn_on_redefinition(void)
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_warn_on_redefinition(void)
these function set the variable should_i_warn_on_redefinition to the value true or false
void hash_table_free(hash_table htp)
this function deletes a hash table that is no longer useful.
void * hash_del(hash_table htp, const void *key)
this function removes from the hash table pointed to by htp the couple whose key is equal to key.
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define HASH_MAP(k, v, code, ht)
static list make_lSwitchStats(list lSwitchStats, reference maxOffRef, list lNewEnt, int diff, entity loopInd)
static bool write_conf_on_ref(reference ref)
static list create_new_ent_list(int minOff, int maxOff, entity oldEnt)
static bool loop_index_in_several_indices(entity index, reference ref)
bool phrase_remove_dependences(const char *module_name)
phrase_remove_dependences.c
static void phrase_remove_dependences_rwt(statement stat)
static list make_lInitStats(list lInitStats, reference maxOffRef, list lNewEnt, entity loopInd, expression indInit)
static int get_const_diff(Pvecteur vect1, Pvecteur vect2)
static list remove_write_ref(list lRef)
static void phrase_check_reference(reference ref)
static int get_const_off(entity index, reference ref)
static void replace_ref_by_ent(list lRef, list lNewEnt, entity index, int max)
static bool vect_same_variables_p(Pvecteur v1, Pvecteur v2)
static hash_table gRefTolRef
void print_reference(reference r)
void print_statement(statement)
Print a statement on stderr.
static void norm(struct rproblem *RR)
cette procedure normalise la fonction cout, calcule les valeurs des seconds membres resultant d'une n...
bool module_reorder(statement body)
Reorder a module and recompute order to statement if any.
#define PLUS_OPERATOR_NAME
#define NORMALIZE_EXPRESSION(e)
const char * entity_local_name(entity e)
entity_local_name modified so that it does not core when used in vect_fprint, since someone thought t...
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.
basic entity_basic(entity e)
return the basic associated to entity e if it's a function/variable/constant basic_undefined otherwis...
entity entity_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
expression reference_to_expression(reference r)
expression entity_to_expression(entity e)
if v is a constant, returns a constant call.
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
expression call_to_expression(call c)
Build an expression that call a function or procedure.
void AddEntityToCurrentModule(entity)
Add a variable entity to the current module declarations.
entity make_new_scalar_variable_with_prefix(const char *, entity, basic)
Create a new scalar variable of type b in the given module.
#define expression_domain
newgen_execution_domain_defined
#define REFERENCE(x)
REFERENCE.
#define normalized_linear_p(x)
#define reference_variable(x)
#define statement_domain
newgen_sizeofexpression_domain_defined
#define EXPRESSION(x)
EXPRESSION.
#define reference_domain
newgen_range_domain_defined
#define reference_indices(x)
#define statement_instruction(x)
#define statement_comments(x)
#define normalized_linear(x)
#define STATEMENT(x)
STATEMENT.
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
The structure used to build lists in NewGen.
#define TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....
Value vect_coeff(Variable var, Pvecteur vect)
Variable vect_coeff(Variable var, Pvecteur vect): coefficient de coordonnee var du vecteur vect —> So...
bool vect_contains_variable_p(Pvecteur v, Variable var)
bool vect_contains_variable_p(Pvecteur v, Variable var) BA 19/05/94 input : a vector and a variable o...