25 #include "pips_config.h"
47 #include "resources.h"
370 debug_on(
"SIMD_ATOMIZER_DEBUG_LEVEL");
float a2sf[2] __attribute__((aligned(16)))
USER generates a user error (i.e., non fatal) by printing the given MSG according to the FMT.
reductions copy_reductions(reductions p)
REDUCTIONS.
expression make_expression(syntax a1, normalized a2)
basic copy_basic(basic p)
BASIC.
expression copy_expression(expression p)
EXPRESSION.
reference make_reference(entity a1, list a2)
statement make_statement(entity a1, intptr_t a2, intptr_t a3, string a4, instruction a5, list a6, string a7, extensions a8, synchronization a9)
syntax copy_syntax(syntax p)
SYNTAX.
void free_expression(expression p)
reference copy_reference(reference p)
REFERENCE.
synchronization make_synchronization_none(void)
syntax make_syntax_reference(reference _field_)
#define MIN(x, y)
minimum and maximum if they are defined somewhere else, they are very likely to be defined the same w...
struct _newgen_struct_statement_ * statement
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 call_constant_p(C)
#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.
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.
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)
void gen_null(__attribute__((unused)) void *unused)
Ignore the argument.
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.
#define ENDP(l)
Test if a list is empty.
#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.
#define CDR(pcons)
Get the list less its first element.
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.
list statement_block(statement)
Get the list of block statements of a statement sequence.
call statement_call(statement)
Get the call of a statement.
bool statement_call_p(statement)
statement make_assign_statement(expression, expression)
void insert_statement(statement, statement, bool)
This is the normal entry point.
#define pips_internal_error
#define STATEMENT_ORDERING_UNDEFINED
mapping.h inclusion
entity reduction_operator_entity(reduction_operator op)
match a reduction operator against operator entity
void normalize_all_expressions_of(void *obj)
void create(char *workspace_name, char **filenames)
create a new workspace...
void reset_cumulated_reductions(void)
void set_cumulated_reductions(pstatement_reductions)
reductions load_cumulated_reductions(statement)
void store_cumulated_reductions(statement, reductions)
#define REDUCTION(x)
REDUCTION.
#define reduction_reference(x)
#define reductions_list(x)
bool module_reorder(statement body)
Reorder a module and recompute order to statement if any.
#define binary_call_rhs(c)
#define ENTITY_ASSIGN_P(e)
#define DEFAULT_INTEGER_TYPE_SIZE
#define NORMALIZE_EXPRESSION(e)
#define ENTITY_POINT_TO_P(e)
#define STATEMENT_NUMBER_UNDEFINED
default values
#define ENTITY_FIELD_P(e)
C data structure and pointer management.
#define binary_call_lhs(c)
#define instruction_block(i)
#define empty_comments
Empty comments (i.e.
#define entity_constant_p(e)
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 entity_empty_label(void)
bool expression_linear_p(expression e)
returns if e is already normalized and linear.
expression reference_to_expression(reference r)
bool expression_call_p(expression e)
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.
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 reference_equal_p(reference r1, reference r2)
bool expression_reference_p(expression e)
Test if an expression is a reference.
reference expression_reference(expression e)
Short cut, meaningful only if expression_reference_p(e) holds.
extensions empty_extensions(void)
extension.c
basic basic_of_expression(expression)
basic basic_of_expression(expression exp): Makes a basic of the same basic as the expression "exp".
int basic_type_size(basic)
See also SizeOfElements()
void AddLocalEntityToDeclarations(entity, entity, statement)
Add the variable entity e to the list of variables of the function module.
entity make_new_scalar_variable(entity, basic)
void AddEntityToCurrentModule(entity)
Add a variable entity to the current module declarations.
int type_memory_size(type)
basic expression_basic(expression)
basic basic_of_reference(reference)
Retrieves the basic of a reference in a newly allocated basic object.
#define normalized_undefined
#define expression_domain
newgen_execution_domain_defined
#define functional_result(x)
#define instruction_sequence_p(x)
#define syntax_reference(x)
#define statement_ordering(x)
#define type_functional(x)
#define statement_domain
newgen_sizeofexpression_domain_defined
@ is_syntax_sizeofexpression
#define basic_overloaded_p(x)
#define basic_undefined_p(x)
#define EXPRESSION(x)
EXPRESSION.
#define statement_label(x)
#define expression_undefined
#define reference_indices(x)
#define statement_extensions(x)
#define instruction_call_p(x)
#define subscript_array(x)
#define statement_declarations(x)
#define statement_instruction(x)
#define statement_comments(x)
#define instruction_call(x)
#define syntax_subscript(x)
#define call_arguments(x)
#define syntax_range_p(x)
#define statement_number(x)
#define expression_syntax(x)
#define variable_basic(x)
#define statement_undefined
#define STATEMENT(x)
STATEMENT.
#define syntax_domain
newgen_synchronization_domain_defined
#define FUNC_TO_ATOMIZE_P(call)
static void atomize_call_statement(statement cs)
This function is called for each call statement and atomize it.
static expression current_lhs
static void get_type_max_width(call ca, int *maxWidth)
This function computes the maximum width of all the variables used in a call.
static void simd_insert_statement(statement cs, statement stat)
This function insert stat before orginal_statement in the code.
static void simd_do_atomize(expression ce, statement cs)
static void change_basic_if_needed(statement stat)
This function aims at changing the basic size of the left expression of the newly created assign stat...
static void atomize_statements(statement cs)
This function is called for all statements in the code.
static statement orginal_statement
An atomizer that uses the one made by Fabien Coelho for HPFC, and is in fact just a hacked version of...
static bool do_expression_reduction(statement s, reduction r, expression e)
static entity sac_make_new_variable(entity module, basic b)
static bool do_reduction_atomization(statement s)
bool reduction_atomization(const char *module_name)
bool simd_atomizer(char *mod_name)
statement simd_atomize_this_expression(entity(*create)(entity, basic), expression e)
returns the assignment statement if moved, or NULL if not.
static void patch_constant_size(syntax s, bool *patch_all)
static bool reference_filter(expression exp, __attribute__((unused)) statement cs)
The structure used to build lists in NewGen.
#define exp
Avoid some warnings from "gcc -Wshadow".