25 #include "pips_config.h"
64 #include "resources.h"
93 fprintf(stderr,
"statement without unary references \n");
110 fprintf(stderr,
"reference to %s is %p\n",
114 static void print_eff(
effect e)
128 bool wp65(
const string input_module_name)
147 debug(8,
"wp65",
"begin\n");
167 &compute_module, &computational,
168 &memory_module, &emulator);
178 DBR_WP65_COMPUTE_FILE,
190 debug(8,
"wp65",
"end\n");
204 pcompute_module, pcomputational,
205 pmemory_module, pemulator)
218 string compute_module_name;
219 string memory_module_name;
243 debug(6,
"module_to_wp65_modules",
"begin\n");
322 (void)
fprintf(stderr,
"Bank indices:\n");
324 (void)
fprintf(stderr,
"Code for the computational module:\n");
326 (void)
fprintf(stderr,
"Code for the memory module:\n");
347 proc_id, proc_id_mm, bank_indices,
349 compute_module, computational,
350 memory_module, emulator, fetch_map,store_map);
385 (void)
fprintf(stderr,
"Final code for the computational module:\n");
387 (void)
fprintf(stderr,
"Final code for the memory module:\n");
395 * pcompute_module = compute_module;
396 * pcomputational = computational;
397 * pmemory_module = memory_module;
398 * pemulator = emulator;
400 debug(6,
"module_to_wp65_modules",
"end\n");
415 fputs(
"\nKey mappings for WP65:\n\n", fd);
417 fputs(
"Mapping llv_to_lcr from list of local variables to conflicting references:\n",
423 for(; !
ENDP(llvl);
POP(llvl)) {
427 (void) putc(
' ', fd);
429 (
void) putc(
',', fd);
432 for(; !
ENDP(lcrl);
POP(lcrl)) {
436 (void) putc(
'\n', fd);
438 (
void) putc(
',', fd);
443 fputs(
"\nMapping r_to_llv from a reference to a list of local variables:\n",
449 for(; !
ENDP(llvl);
POP(llvl)) {
453 (void) putc(
' ', fd);
455 (
void) putc(
',', fd);
457 (void) putc(
'\n', fd);
461 fputs(
"\nMapping v_to_lllv from variables to lists of lists of local variables:\n",
466 for(; !
ENDP(lllvl);
POP(lllvl)) {
472 (void) putc(
')', fd);
474 (
void) putc(
',', fd);
477 (void) putc(
'\n', fd);
485 fputs(
"\nMapping r_to_ud from references to use-def:\n", fd);
495 fputs(
"\nMapping v_to_esv from variables to emulated shared variables:\n",
504 (void) putc(
'\n', fd);
521 debug(1,
"wp65_conform_p",
522 "program body is an unstructured with at least two nodes\n");
528 debug(1,
"wp65_conform_p",
"program body is not a block\n");
537 debug(1,
"wp65_conform_p",
538 "program body contains a non-perfectly nested loop\n");
parameter make_parameter(type a1, mode a2, dummy a3)
mode make_mode(enum mode_utype tag, void *val)
storage make_storage(enum storage_utype tag, void *val)
language make_language_unknown(void)
basic make_basic_int(intptr_t _field_)
language copy_language(language p)
LANGUAGE.
dummy make_dummy_unknown(void)
formal make_formal(entity a1, intptr_t a2)
static reference ref
Current stmt (an integer)
Pbase vect_add_variable(Pbase b, Variable v)
package vecteur - routines sur les bases
static graph dg
dg is the dependency graph ; FIXME : should not be static global ?
struct _newgen_struct_statement_ * statement
void compute_communications(list l, statement_mapping *fetch_map, statement_mapping *store_map)
This function associates to each variable the statement in l where it should be communicated Fecth_ma...
#define effect_any_reference(e)
FI: cannot be used as a left hand side.
#define effect_domain
newgen_descriptor_domain_defined
char * get_string_property(const char *)
#define gen_recurse(start, domain_number, flt, rwt)
struct _newgen_struct_graph_ * graph
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.
entity set_current_module_entity(entity)
static.c
entity get_current_module_entity(void)
Get the entity of the current module.
void gen_multi_recurse(void *o,...)
Multi recursion visitor function.
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.
#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.
#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.
#define list_undefined
Undefined list definition :-)
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
bool return_statement_p(statement)
Test if a statement is a C or Fortran "return".
bool stop_statement_p(statement)
Test if a statement is a Fortran STOP.
statement make_return_statement(entity)
bool assignment_statement_p(statement)
Test if a statement is an assignment.
hash_table hash_table_make(hash_key_type key_type, size_t size)
void hash_table_free(hash_table htp)
this function deletes a hash table that is no longer useful.
void instruction_to_wp65_code(entity module, list l, graph dg, int pn, int bn, int ls, int pd, entity proc_id, entity proc_id_mm, Pbase bank_indices, hash_table v_to_esv, hash_table v_to_nlv, entity compute_module, statement computational, entity memory_module, statement emulator, statement_mapping fetch_map, statement_mapping store_map)
void vect_fprint(FILE *f, Pvecteur v, get_variable_name_t variable_name)
void vect_fprint(FILE * f, Pvecteur v, char * (*variable_name)()): impression d'un vecteur creux v su...
void wp65_debug_print_text(entity m, statement s)
include "values.h"
void wp65_debug_print_module(entity m, statement s)
void debug(const int the_expected_debug_level, const char *calling_function_name, const char *a_message_format,...)
ARARGS0.
void get_model(int *ppn, int *pbn, int *pls)
void model_fprint(FILE *fd, int pn, int bn, int ls)
Code Generation for Distributed Memory Machines.
#define DEFINE_CURRENT_MAPPING(name, type)
#define MAKE_STATEMENT_MAPPING()
string concatenate(const char *,...)
Return the concatenation of the given strings.
#define HASH_MAP(k, v, code, ht)
#define string_undefined_p(s)
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
hash_table set_ordering_to_statement(statement s)
To be used instead of initialize_ordering_to_statement() to make sure that the hash table ots is in s...
void reset_ordering_to_statement(void)
Reset the mapping from ordering to statement.
void fprint_reference(FILE *fd, reference r)
text empty_text(entity __attribute__((unused)) e, int __attribute__((unused)) m, statement __attribute__((unused)) s)
void close_prettyprint()
because some prettyprint functions may be used for debug, so the last hook set by somebody may have s...
void init_prettyprint(text(*hook)(entity, int, statement))
checks that the prettyprint hook was actually reset...
text text_module(entity, statement)
bool make_text_resource(const char *, const char *, const char *, text)
print.c
#define PRETTYPRINT_PARALLEL
void set_string_property(const char *, const char *)
bool module_reorder(statement body)
Reorder a module and recompute order to statement if any.
#define instruction_block_p(i)
#define unstructured_control
After the modification in Newgen: unstructured = entry:control x exit:control we have create a macro ...
#define module_language(e)
implemented as a macro to allow lhs
#define instruction_block(i)
#define module_functional_parameters(func)
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...
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
entity make_empty_subroutine(const char *name, language l)
const char * module_local_name(entity e)
Returns the module local user name.
entity make_empty_function(const char *name, type r, language l)
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
bool variable_declaration_coherency_p(entity module, statement st)
void AddEntityToDeclarations(entity, entity)
END_EOLE.
type MakeIntegerResult(void)
entity make_scalar_integer_entity(const char *, const char *)
Create an integer variable of name "name" in module of name "module_name".
type MakeTypeVariable(basic, cons *)
BEGIN_EOLE.
#define REFERENCE(x)
REFERENCE.
#define reference_variable(x)
#define control_predecessors(x)
#define entity_storage(x)
#define EXPRESSION(x)
EXPRESSION.
#define instruction_undefined
#define reference_domain
newgen_range_domain_defined
#define PARAMETER(x)
PARAMETER.
#define reference_indices(x)
#define control_successors(x)
#define instruction_unstructured_p(x)
#define statement_instruction(x)
#define statement_comments(x)
#define control_statement(x)
#define instruction_unstructured(x)
#define statement_undefined
#define STATEMENT(x)
STATEMENT.
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
The structure used to build lists in NewGen.
A gen_chunk is used to store every object.
#define BASE_NULLE
MACROS SUR LES BASES.
#define PIPELINE_DEPTH
These values should be read in model.rc (FI, 20/11/91) #define PROCESSOR_NUMBER 4 #define BANK_NUMBER...
#define BANK_NAME
#define WP65_SUFFIX "_WP65"
#define COMPUTE_ENGINE_NAME
#define BANK_LINE_IDENTIFIER
#define PROCESSOR_IDENTIFIER
#define MEMORY_EMULATOR_SUFFIX "_BANK"
#define BANK_OFFSET_IDENTIFIER
entity MakeEntityFunction(string sname)
void fprint_wp65_hash_tables(FILE *fd, hash_table llv_to_lcr, hash_table r_to_llv, hash_table v_to_lllv, hash_table r_to_ud, hash_table v_to_esv)
Ignore this function: debugging purposes only.
dg_vertex_label vertex_label
static void unary_into_binary_ref(reference ref)
void module_to_wp65_modules(entity module, statement module_code, graph dg, int pn, int bn, int ls, int pd, entity *pcompute_module, statement *pcomputational, entity *pmemory_module, statement *pemulator)
dg_arc_label arc_label
Code Generation for Distributed Memory Machines.
static void translate_unary_into_binary_ref(statement stat)
bool wp65(const string input_module_name)
bool wp65_conform_p(statement s)