PIPS
|
#include <stdio.h>
#include <string.h>
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "effects.h"
#include "dg.h"
#include "graph.h"
#include "matrice.h"
#include "tiling.h"
#include "database.h"
#include "text.h"
#include "misc.h"
#include "properties.h"
#include "text-util.h"
#include "ri-util.h"
#include "prettyprint.h"
#include "effects-util.h"
#include "resources.h"
#include "pipsdbm.h"
#include "movements.h"
#include "effects-generic.h"
#include "effects-convex.h"
#include "top-level.h"
#include "control.h"
#include "wp65.h"
Go to the source code of this file.
Typedefs | |
typedef dg_arc_label | arc_label |
Code Generation for Distributed Memory Machines. More... | |
typedef dg_vertex_label | vertex_label |
Functions | |
static void | unary_into_binary_ref (reference ref) |
static void | translate_unary_into_binary_ref (statement stat) |
entity | MakeEntityFunction (string sname) |
bool | wp65 (const string input_module_name) |
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) |
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. More... | |
bool | wp65_conform_p (statement s) |
typedef dg_arc_label arc_label |
typedef dg_vertex_label vertex_label |
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.
fd | d |
llv_to_lcr | lv_to_lcr |
r_to_llv | _to_llv |
v_to_lllv | _to_lllv |
r_to_ud | _to_ud |
v_to_esv | _to_esv |
Definition at line 406 of file wp65.c.
References CAR, CDR, ENDP, ENTITY, entity_local_name(), entity_name, fprint_reference(), fprintf(), HASH_MAP, intptr_t, is_action_read, LIST, POP, and REFERENCE.
Referenced by loop_nest_to_wp65_code().
sname | name |
Definition at line 101 of file wp65.c.
References f(), make_empty_function(), make_language_unknown(), and MakeIntegerResult().
Referenced by module_to_wp65_modules().
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 | ||
) |
variable to emulated shared variable
To establish an occurence numbering accross loop nests
Generate two new modules, compute module and memory module
Generate scalar variables that are going to be used all over the compute and memory module
variables related to bank emulation are put together in one basis to decrease the number of parameters; they are used as such when liner systems of constraints are built
skip a potential useless unstructured
generate code for each loop nest in the module and append it to computational and emulator
kill_statement_number_and_ordering(computational); kill_statement_number_and_ordering(emulator);
return results
module | odule |
module_code | odule_code |
dg | g |
pn | dependence graph |
bn | processor_number |
ls | bank number |
pd | line size |
pcompute_module | pipeline depth |
pcomputational | computational |
pmemory_module | memory_module |
pemulator | emulator |
Definition at line 202 of file wp65.c.
References AddEntityToDeclarations(), BANK_IDENTIFIER, BANK_LINE_IDENTIFIER, BANK_NAME, BANK_OFFSET_IDENTIFIER, BASE_NULLE, CAR, compute_communications(), COMPUTE_ENGINE_NAME, concatenate(), CONS, control_statement, copy_language(), debug(), dg, entity_local_name(), entity_storage, entity_undefined, fprintf(), gen_nconc(), hash_pointer, hash_table_free(), hash_table_make(), ifdebug, instruction_block, instruction_to_wp65_code(), instruction_undefined, instruction_unstructured, instruction_unstructured_p, is_mode_reference, is_storage_formal, list_undefined, make_basic_int(), make_block_statement(), make_dummy_unknown(), make_empty_subroutine(), make_formal(), make_mode(), make_parameter(), make_return_statement(), make_scalar_integer_entity(), MAKE_STATEMENT_MAPPING, make_storage(), MakeEntityFunction(), MakeTypeVariable(), module, module_functional_parameters, module_language, module_local_name(), module_reorder(), NIL, PARAMETER, PROCESSOR_IDENTIFIER, STATEMENT, statement_comments, statement_instruction, statement_undefined, strdup(), string_undefined_p, unstructured_control, UU, vect_add_variable(), vect_fprint(), and wp65_debug_print_module().
Referenced by wp65().
|
static |
Definition at line 88 of file wp65.c.
References fprintf(), gen_recurse, gen_true(), get_current_module_entity(), ifdebug, module, reference_domain, unary_into_binary_ref(), and wp65_debug_print_text().
Referenced by wp65().
|
static |
Definition at line 78 of file wp65.c.
References CAR, CONS, EXPRESSION, gen_length(), int_to_expression(), NIL, ref, and reference_indices.
Referenced by translate_unary_into_binary_ref().
Let's modify the old code instead of copy it but do not tell pipsdbm; else we would get a copy of the code, not consistent with the dependence graph
fprintf(stderr,"refs du code\n"); debug_refs(s); fprintf(stderr,"refs du dg\n"); debug_refs(dg);
fprintf(stderr,"refs du code\n"); debug_refs(s); fprintf(stderr,"refs du dg\n"); debug_refs(dg);
Put final code for the computational module in a text resource of the database
Put final code for the memory module in a text resource of the database
reset_current_module_statement();
input_module_name | nput_module_name |
Definition at line 128 of file wp65.c.
References close_prettyprint(), db_get_memory_resource(), debug(), debug_off, debug_on, dg, empty_text(), entity_undefined, free(), get_model(), get_string_property(), ifdebug, init_prettyprint(), make_text_resource(), model_fprint(), module, module_name_to_entity(), module_to_wp65_modules(), PIPELINE_DEPTH, PRETTYPRINT_PARALLEL, regions_init(), reset_current_module_entity(), reset_ordering_to_statement(), set_current_module_entity(), set_ordering_to_statement(), set_string_property(), statement_undefined, strdup(), text_module(), translate_unary_into_binary_ref(), and variable_declaration_coherency_p().
there should be only one instruction: do not put a STOP in the source file
Definition at line 508 of file wp65.c.
References assignment_statement_p(), CAR, control_predecessors, control_statement, control_successors, debug(), instruction_block, instruction_block_p, instruction_unstructured, instruction_unstructured_p, MAPL, NIL, perfectly_nested_loop_p(), return_statement_p(), s1, STATEMENT, statement_instruction, stop_statement_p(), and unstructured_control.