25 #include "pips_config.h"
33 #include "resources.h"
94 if (width > varwidth->
max)
95 varwidth->
max = width;
97 if (width < varwidth->
min)
98 varwidth->
min = width;
150 varwidth = varwidths.
max;
152 varwidth = varwidths.
min;
157 if ((varwidth > regWidth/2) || (varwidth <= 0))
160 for(
int j = 8; j <= regWidth/2; j*=2)
170 return regWidth / varwidth;
237 factor.
min = INT_MAX;
294 pips_assert(
"Statement is consistent after SIMDIZER_AUTO_UNROLL",
323 pips_assert(
"Statement is consistent after SIMDIZER_AUTO_UNROLL",
380 int npath =
path << 1 ;
463 *theloopstatement=*root;
int get_int_property(const string)
clone_context make_clone_context(entity a1, entity a2, list a3, statement a4)
void free_clone_context(clone_context p)
effects copy_effects(effects p)
EFFECTS.
bool statement_consistent_p(statement p)
void free_expression(expression p)
statement clone_statement(statement s, clone_context cc)
clone_statement.c
struct _newgen_struct_statement_ * statement
void set_cumulated_rw_effects(statement_effects)
effects load_cumulated_rw_effects(statement)
void store_cumulated_rw_effects(statement, effects)
void reset_cumulated_rw_effects(void)
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_recurse(start, 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.
bool gen_true2(__attribute__((unused)) gen_chunk *u1, __attribute__((unused)) void *u2)
void gen_null(__attribute__((unused)) void *unused)
Ignore the argument.
bool gen_true(__attribute__((unused)) gen_chunk *unused)
Return true and ignore the argument.
bool perfectly_nested_loop_p(statement stat)
Test if a statement is a perfect loop-nest.
#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.
void gen_remove_once(list *pl, const void *o)
Remove the first occurence of o in list pl:
#define NIL
The empty list (nil in Lisp)
list gen_copy_seq(list l)
Copy a list structure.
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
list gen_last(list l)
Return the last 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 make_assign_statement(expression, expression)
void insert_statement(statement, statement, bool)
This is the normal entry point.
void statement_remove_useless_label(statement, bool *)
remove the label of a statement if the statement is not unstructured.
void do_symbolic_tiling(statement, list)
symbolic_tiling.c
void full_loop_unroll(statement loop_statement)
get rid of the loop by body replication;
void do_loop_unroll(statement loop_statement, int rate, void(*statement_post_processor)(statement))
loop_unroll.c
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
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_union(set, const set, const set)
set set_make(set_type)
Create an empty set of any type but hash_private.
void reset_simd_operator_mappings()
void set_simd_operator_mappings(void *m)
operatorid.c
void set_bool_property(const char *, bool)
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 GREATER_THAN_OPERATOR_NAME
#define NORMALIZE_EXPRESSION(e)
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
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
bool expression_integer_value(expression e, intptr_t *pval)
bool simplify_expression(expression *pexp)
use polynomials to simplify an expression in some cases this operation can change the basic of the ex...
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...
void AddEntityToCurrentModule(entity)
Add a variable entity to the current module declarations.
entity find_label_entity(const char *, const char *)
util.c
entity make_new_index_entity(entity, string)
#define normalized_complex_p(x)
#define instruction_loop_p(x)
#define instruction_loop(x)
#define statement_domain
newgen_sizeofexpression_domain_defined
#define EXPRESSION(x)
EXPRESSION.
#define entity_undefined_p(x)
#define reference_domain
newgen_range_domain_defined
#define expression_undefined
@ is_instruction_unstructured
@ is_instruction_whileloop
@ is_instruction_sequence
#define instruction_tag(x)
#define expression_normalized(x)
#define sequence_statements(x)
#define reference_indices(x)
#define instruction_sequence(x)
#define expression_undefined_p(x)
#define statement_instruction(x)
#define statement_undefined_p(x)
#define STATEMENT(x)
STATEMENT.
int get_subwordSize_from_opcode(opcode oc, int argNum)
void reset_simd_treematch(void)
void set_simd_treematch(matchTree)
treematch.c
int effective_variables_width(instruction)
varwidth.c
list match_statement(statement)
return a list of matching statements
#define opcode_vectorSize(x)
#define opcodeClass_opcodes(x)
Pvecteur cp
pointeur sur l'egalite ou l'inegalite courante
FI: I do not understand why the type is duplicated at the set level.
The structure used to build lists in NewGen.
static void gather_local_indices(reference r, set s)
bool simdizer_auto_unroll(char *mod_name)
static void compute_parallelism_factor(statement s, MinMaxVar *factor)
static bool full_simd_unroll_loop_filter(statement s)
static void simd_loop_unroll(statement loop_statement, intptr_t rate)
static list do_simdizer_auto_tile_int_to_list(int maxdepth, int path, loop l)
bool loop_auto_unroll(const char *mod_name)
unroll.c
bool simdizer_auto_tile(const char *module_name)
static statement simdizer_auto_tile_generate_all_tests(statement root, int maxdepth, expression tests[1+maxdepth])
static bool simple_simd_unroll_loop_filter(statement s)
static int simple_simd_unroll_rate(loop l)
static bool should_unroll_p(instruction i)
static void stmt_rm_labels(statement s)
static statement do_simdizer_auto_tile_generate_all_tests(statement root, int maxdepth, int path, expression *tests)
static void keep_loop_indices(statement s, list *L)
static void compute_variable_size(statement s, MinMaxVar *varwidth)
static void simd_unroll_as_needed(statement module_stmt)