25 #include "pips_config.h"
34 #include "resources.h"
43 void insert_transformation(
char * name,
int vectorLengthOut,
int subwordSizeOut,
int vectorLengthIn,
int subwordSizeIn,
int nbArgs,
list mapping)
53 (
int*)
malloc(
sizeof(
int)*vectorLengthOut));
55 for(i = vectorLengthOut-1, l=mapping; (i>=0) && (l!=
NIL); i--, l=
CDR(l))
79 static statement generate_transformation_statement(simdStatementInfo si,
int line)
107 firstArg = secArg =
NIL;
108 for(l = statementArgument_dependances(simdStatementInfo_arguments(si)[
offset]);
112 vectorElement ve = VECTORELEMENT(
CAR(l));
120 firstArg =
CONS(
ENTITY, vectorElement_vector(ve), firstArg);
122 secArg =
CONS(
ENTITY, vectorElement_vector(ve), secArg);
128 (i < vectorLength) && (firstArg !=
NIL) &&
132 statementArgument ssa = simdStatementInfo_arguments(si)[i +
offset];
137 for(l = statementArgument_dependances(ssa); l !=
NIL; l =
CDR(l))
139 vectorElement ve = VECTORELEMENT(
CAR(l));
142 first =
CONS(
ENTITY, vectorElement_vector(ve), first);
144 sec =
CONS(
ENTITY, vectorElement_vector(ve), sec);
158 if ( (firstArg !=
NIL) &&
160 (best_transformation_p(tr, bestTr)) )
179 return make_transformation_statement(bestTr,
180 simdStatementInfo_vectors(si)[
line],
transformation make_transformation(string a1, intptr_t a2, intptr_t a3, intptr_t a4, intptr_t a5, intptr_t a6, int *a7)
void gen_list_and(list *a, const list b)
Compute A = A inter B: complexity in O(n2)
#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.
void gen_free_list(list l)
free the spine of the list
#define CDR(pcons)
Get the list less its first element.
expression entity_to_expression(entity e)
if v is a constant, returns a constant call.
#define EXPRESSION(x)
EXPRESSION.
#define statement_undefined
static statement make_exec_statement_from_name(string ename, list args)
#define transformation_name(x)
#define opcode_vectorSize(x)
#define transformation_mapping(x)
#define transformation_vectorLengthIn(x)
#define transformation_vectorLengthOut(x)
#define TRANSFORMATION(x)
TRANSFORMATION.
#define transformation_nbArgs(x)
#define transformation_undefined
static int line
FLEX_SCANNER.
The structure used to build lists in NewGen.