PIPS
|
#include <stdio.h>
#include <ctype.h>
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "effects.h"
#include "resources.h"
#include "misc.h"
#include "ri-util.h"
#include "prettyprint.h"
#include "effects-util.h"
#include "text-util.h"
#include "properties.h"
#include "ray_dte.h"
#include "sommet.h"
#include "sg.h"
#include "polyedre.h"
#include "phrase_tools.h"
#include "effects-generic.h"
#include "effects-simple.h"
#include "effects-convex.h"
#include "phrase_distribution.h"
#include "comEngine.h"
#include "comEngine_generate_code.h"
#include "phrase.h"
Go to the source code of this file.
Variables | |
static hash_table | gRealFifo |
static entity | gStepEnt |
static hash_table | gOldRefToHREFifo |
static reference | gRefToReplace |
curLoop | urLoop |
lStats | Stats |
Definition at line 1129 of file comEngine_generate_procCode.c.
References CONS, copy_expression(), entity_to_expression(), gen_nconc(), loop_index, loop_range, make_assign_statement(), NIL, range_upper, and STATEMENT.
Referenced by generate_code_loop().
f((curFifo == -1) || (curInd == get_int_property("COMENGINE_SIZE_OF_FIFO"))) {
Definition at line 645 of file comEngine_generate_procCode.c.
References gEntToHREFifo, get_realFifoNum(), gIndToNum, hash_put(), and intptr_t.
Referenced by find_or_create_slot(), and make_toggle_mmcd().
statement comEngine_generate_procCode | ( | statement | externalized_code, |
_UNUSED_ list | l_in, | ||
_UNUSED_ list | l_out | ||
) |
Definition at line 1289 of file comEngine_generate_procCode.c.
References call_to_statement, comEngine_generate_code(), comEngine_make_new_scalar_variable(), entity_to_expression(), gen_make_list(), gGenHRE, gOldRefToHREFifo, gRealFifo, gRefToHREFifo, gStepEnt, hash_pointer, hash_table_free(), hash_table_make(), int_to_expression(), is_basic_int, make_assign_statement(), make_basic(), make_block_statement(), make_call(), module_name_to_runtime_entity(), NIL, START_HRE, statement_domain, strdup(), and WAIT_FOR_HRE.
Referenced by comEngine_distribute_code().
void comEngine_replace_reference_in_stat | ( | statement | stat, |
reference | ref, | ||
expression | new | ||
) |
stat | tat |
ref | ef |
new | ew |
Definition at line 871 of file comEngine_generate_procCode.c.
References comEngine_replace_reference_in_stat_rwt(), expression_domain, gen_context_recurse, gen_true2(), gRefToReplace, and ref.
Referenced by generate_code_loop(), make_lInitStats(), make_lSwitchStats(), make_mmcd_stats_from_ref(), process_innerStat1_proc(), regenerate_toggles(), replace_array_ref_with_fifos(), and replace_array_ref_with_fifos2().
|
static |
Definition at line 849 of file comEngine_generate_procCode.c.
References exp, expression_normalized, expression_reference(), expression_reference_p(), expression_syntax, free_normalized(), free_syntax(), gRefToReplace, NORMALIZE_EXPRESSION, normalized_undefined, and reference_equal_p().
Referenced by comEngine_replace_reference_in_stat().
stat | tat |
lRef | Ref |
Definition at line 1210 of file comEngine_generate_procCode.c.
References CONS, gen_free_list(), get_realFifoNum(), gRefToEff, gRefToFifo, gRefToFifoOff, hash_get(), hash_put(), HASH_UNDEFINED_VALUE, intptr_t, MAP, NIL, pips_assert, print_reference(), printf(), REFERENCE, and reference_equal_p().
Referenced by generate_code_loop().
Definition at line 685 of file comEngine_generate_procCode.c.
References alloc_new_slot(), gEntToHREFifo, hash_get(), HASH_UNDEFINED_VALUE, and intptr_t.
Referenced by make_init_newInd_stat().
stat | tat |
Definition at line 1142 of file comEngine_generate_procCode.c.
References CONS, gen_nconc(), generate_code_function(), generate_stat_from_ref_list_proc(), get_call_stat_proc(), gStatToRef, hash_get(), HASH_UNDEFINED_VALUE, make_block_statement(), NIL, print_statement(), printf(), STATEMENT, statement_test(), statement_undefined, test_false, and test_true.
Referenced by generate_code_function().
|
static |
Definition at line 402 of file comEngine_generate_procCode.c.
References call_to_expression(), copy_reference(), count, entity_intrinsic(), entity_to_expression(), expression_domain, expression_undefined, GEN_LOAD_MMCD, gen_make_list(), GEN_STORE_MMCD, get_realFifoNum(), get_toggleEnt_from_ref(), gRefToFifo, hash_get(), HASH_UNDEFINED_VALUE, int_to_expression(), intptr_t, make_call(), make_mmcd_load_store_stat(), NIL, offset, pips_assert, PLUS_OPERATOR_NAME, print_reference(), printf(), reference_to_expression(), statement_undefined, and strdup().
Referenced by generate_mmcd_stats_from_ref().
|
static |
Definition at line 468 of file comEngine_generate_procCode.c.
References CONS, count, gen_free_list(), gen_nconc(), generate_mmcd_stat_from_ref(), gRefToEff, hash_get(), HASH_UNDEFINED_VALUE, intptr_t, MAP, NIL, offset, pips_assert, R_EFFECT, REFERENCE, and STATEMENT.
Referenced by generate_stat_from_ref_list_proc(), generate_stat_from_ref_list_proc_list(), and make_mmcd_stats_from_ref().
lRef | Ref |
lToggleEnt | ToggleEnt |
stat | tat |
Definition at line 989 of file comEngine_generate_procCode.c.
References CONS, gen_nconc(), generate_mmcd_stats_from_ref(), int_to_expression(), make_block_statement(), make_step_inc_statement(), NIL, STATEMENT, and statement_undefined.
Referenced by generate_code_call(), generate_code_loop(), generate_code_test_proc(), process_code_seq(), and usual_loop_tiling().
lRef | Ref |
lInStats | InStats |
Definition at line 1025 of file comEngine_generate_procCode.c.
References CONS, gen_nconc(), generate_mmcd_stats_from_ref(), int_to_expression(), make_step_inc_statement(), NIL, and STATEMENT.
Referenced by generate_code_loop().
Definition at line 1109 of file comEngine_generate_procCode.c.
References statement_undefined.
Referenced by generate_code_call(), and generate_code_test_proc().
Definition at line 86 of file comEngine_generate_procCode.c.
References DIMENSION, dimension_lower, dimension_upper, gen_length(), gen_nth(), get_bool_property(), int, integer_constant_expression_p(), integer_constant_expression_value(), intptr_t, offset, pips_assert, and rank.
Referenced by supported_ref_p().
Definition at line 274 of file comEngine_generate_procCode.c.
References gOldRefToHREFifo, gRealFifo, gRefToFifoOff, gRefToHREFifo, hash_get(), HASH_MAP, hash_put(), HASH_UNDEFINED_VALUE, and intptr_t.
Referenced by alloc_new_slot(), create_realFifo_proc(), and generate_mmcd_stat_from_ref().
void get_supportedRef_proc | ( | statement | stat, |
hash_table | htOffset, | ||
list * | lSupportedRef, | ||
list * | lUnSupportedRef | ||
) |
stat | tat |
htOffset | tOffset |
lSupportedRef | SupportedRef |
lUnSupportedRef | UnSupportedRef |
Definition at line 1077 of file comEngine_generate_procCode.c.
References CONS, gen_nconc(), gLoopToRef, gLoopToSupRef, gLoopToUnSupRef, hash_get(), hash_put(), HASH_UNDEFINED_VALUE, loop_index, MAP, NIL, REFERENCE, statement_loop(), and supported_ref_p().
Referenced by do_HRE_memory_mapping_loop().
Definition at line 327 of file comEngine_generate_procCode.c.
References ENTITY, entity_undefined, gRefToFifo, gRefToFifoOff, gToggleToInc, hash_get(), HASH_UNDEFINED_VALUE, intptr_t, MAP, and pips_assert.
Referenced by generate_mmcd_stat_from_ref(), and make_mmcd_stats_from_ref().
stat | tat |
Definition at line 260 of file comEngine_generate_procCode.c.
References gen_context_recurse, has_call_stat_inside_flt(), has_call_stat_inside_rwt(), and statement_domain.
Definition at line 213 of file comEngine_generate_procCode.c.
References instruction_tag, is_instruction_call, is_instruction_forloop, is_instruction_loop, is_instruction_sequence, is_instruction_test, is_instruction_whileloop, pips_internal_error, and statement_instruction.
Referenced by has_call_stat_inside().
|
static |
Definition at line 251 of file comEngine_generate_procCode.c.
Referenced by has_call_stat_inside().
Definition at line 632 of file comEngine_generate_procCode.c.
References gen_context_recurse, gen_null2(), has_loop_inside_flt(), and statement_domain.
Referenced by make_init_newInd_stat().
Definition at line 594 of file comEngine_generate_procCode.c.
References instruction_tag, is_instruction_call, is_instruction_forloop, is_instruction_loop, is_instruction_sequence, is_instruction_test, is_instruction_whileloop, pips_internal_error, and statement_instruction.
Referenced by has_loop_inside().
statement make_exec_mmcd | ( | void | ) |
Definition at line 967 of file comEngine_generate_procCode.c.
References call_to_statement, entity_to_expression(), expression_domain, gen_make_list(), gStepEnt, int_to_expression(), make_call(), module_name_to_runtime_entity(), and strdup().
Referenced by add_exec_mmcd().
stat | tat |
newInd | ewInd |
Definition at line 701 of file comEngine_generate_procCode.c.
References entity_to_expression(), find_or_create_slot(), GEN_LOAD_MMCD, gLoopToUnSupRef, has_loop_inside(), hash_get(), HASH_UNDEFINED_VALUE, int_to_expression(), loop_body, loop_index, make_mmcd_load_store_stat(), NIL, pips_assert, statement_loop(), statement_undefined, and strdup().
Referenced by add_toggle_inc_statements().
list make_loop_lStats_proc | ( | statement | stat, |
entity | transferSize, | ||
statement | innerStat, | ||
entity | newOuterInd, | ||
list | lSupportedRef, | ||
hash_table | htOffset, | ||
expression | bufferSizeExp | ||
) |
stat | tat |
transferSize | ransferSize |
innerStat | nnerStat |
newOuterInd | ewOuterInd |
lSupportedRef | SupportedRef |
htOffset | tOffset |
bufferSizeExp | ufferSizeExp |
Definition at line 1114 of file comEngine_generate_procCode.c.
References make_lStats().
Referenced by make_loopStat1().
stat | tat |
newOuterInd | ewOuterInd |
Definition at line 554 of file comEngine_generate_procCode.c.
References C_GREATER_THAN_OPERATOR_NAME, call_to_expression(), copy_expression(), empty_comments, empty_extensions(), entity_empty_label(), entity_intrinsic(), entity_to_expression(), expression_domain, gen_make_list(), gGenHRE, is_instruction_test, loop_range, make_call(), make_empty_statement, make_instruction(), make_statement(), make_step_inc_statement(), make_synchronization_none(), make_test(), make_wait_step_statement(), NIL, range_lower, statement_loop(), STATEMENT_NUMBER_UNDEFINED, and STATEMENT_ORDERING_UNDEFINED.
|
static |
Definition at line 942 of file comEngine_generate_procCode.c.
References CONS, gen_nconc(), make_mmcd_stats_from_ref(), make_transStat(), NIL, and STATEMENT.
Referenced by make_loop_lStats_proc().
|
static |
Definition at line 359 of file comEngine_generate_procCode.c.
References call_to_expression(), call_to_statement, entity_intrinsic(), entity_to_expression(), expression_domain, gen_make_list(), GEN_STORE_MMCD, gStepEnt, int_to_expression(), make_call(), module_name_to_runtime_entity(), and PLUS_C_OPERATOR_NAME.
Referenced by generate_mmcd_stat_from_ref(), make_init_newInd_stat(), and make_toggle_mmcd().
|
static |
Definition at line 884 of file comEngine_generate_procCode.c.
References comEngine_replace_reference_in_stat(), CONS, entity_to_expression(), gen_nconc(), generate_mmcd_stats_from_ref(), get_toggleEnt_from_ref(), gLoopToToggleEnt, gRefToInd, gRefToToggle, hash_get(), hash_put(), HASH_UNDEFINED_VALUE, loop_index, make_reference(), MAP, NIL, pips_assert, REFERENCE, STATEMENT, statement_loop(), and statement_undefined.
Referenced by make_lStats().
incNum | ncNum |
Definition at line 537 of file comEngine_generate_procCode.c.
References call_to_expression(), entity_intrinsic(), entity_to_expression(), expression_domain, gen_make_list(), gStepEnt, int_to_expression(), make_assign_statement(), make_call(), and PLUS_OPERATOR_NAME.
Referenced by add_exec_mmcd(), generate_code_call(), generate_stat_from_ref_list_proc(), generate_stat_from_ref_list_proc_list(), make_loop_step_stat(), and process_gLoopToSync_proc().
ent | nt |
Definition at line 668 of file comEngine_generate_procCode.c.
References alloc_new_slot(), entity_to_expression(), GEN_LOAD_MMCD, int_to_expression(), make_mmcd_load_store_stat(), and strdup().
Referenced by add_toggle_inc_statements(), and regenerate_toggles().
statement make_transStat | ( | statement | stat, |
entity | newOuterInd, | ||
entity | transferSize, | ||
expression | bufferSizeExp | ||
) |
tatement stepStat = make_loop_step_stat(stat, newOuterInd);
newStat = make_block_statement(gen_nconc(CONS(STATEMENT, stepStat, NIL), CONS(STATEMENT, newStat, NIL)));
f(!gGenHRE) { statement indStat = make_init_newInd_stat(stat, newOuterInd);
if(indStat != statement_undefined) { newStat = make_block_statement(gen_nconc(CONS(STATEMENT, newStat, NIL), CONS(STATEMENT, indStat, NIL))); } }
stat | tat |
newOuterInd | ewOuterInd |
transferSize | ransferSize |
bufferSizeExp | ufferSizeExp |
Definition at line 733 of file comEngine_generate_procCode.c.
References C_LESS_OR_EQUAL_OPERATOR_NAME, C_MODULO_OPERATOR_NAME, call_to_expression(), copy_expression(), DIVIDE_OPERATOR_NAME, empty_comments, empty_extensions(), entity_empty_label(), entity_intrinsic(), entity_to_expression(), expression_domain, expression_integer_value(), free_expression(), free_statement(), gen_make_list(), int_to_expression(), intptr_t, is_instruction_test, loop_range, make_assign_statement(), make_call(), make_instruction(), make_statement(), make_synchronization_none(), make_test(), MULTIPLY_OPERATOR_NAME, NIL, PLUS_C_OPERATOR_NAME, range_upper, statement_loop(), STATEMENT_NUMBER_UNDEFINED, STATEMENT_ORDERING_UNDEFINED, and statement_undefined.
Referenced by make_loop_lStats_HRE(), and make_lStats().
stat | tat |
lInStats | InStats |
Definition at line 1188 of file comEngine_generate_procCode.c.
References CONS, gen_nconc(), gLoopToSync, hash_get(), HASH_UNDEFINED_VALUE, intptr_t, make_step_inc_statement(), NIL, and STATEMENT.
Referenced by generate_code_loop().
void process_innerStat1_proc | ( | statement | stat, |
entity | oldInd, | ||
entity | newOuterInd, | ||
entity | newInnerInd | ||
) |
stat | tat |
oldInd | ldInd |
newOuterInd | ewOuterInd |
newInnerInd | ewInnerInd |
Definition at line 1057 of file comEngine_generate_procCode.c.
References call_to_expression(), comEngine_replace_reference_in_stat(), entity_intrinsic(), entity_to_expression(), expression_domain, gen_make_list(), make_call(), make_reference(), NIL, and PLUS_OPERATOR_NAME.
Referenced by usual_loop_tiling().
|
static |
Definition at line 139 of file comEngine_generate_procCode.c.
References entity_type, EXPRESSION, gen_free_list(), get_final_offset(), hash_put(), intptr_t, MAP, NIL, norm(), NORMALIZE_EXPRESSION, normalized_linear, normalized_linear_p, offset, pips_assert, rank, ref, reference_indices, reference_variable, type_variable, type_variable_p, variable_dimensions, and vect_coeff().
Referenced by get_supportedRef_proc().
|
static |
Definition at line 77 of file comEngine_generate_procCode.c.
Referenced by comEngine_generate_procCode(), and get_realFifoNum().
|
static |
Definition at line 68 of file comEngine_generate_procCode.c.
Referenced by comEngine_generate_procCode(), and get_realFifoNum().
|
static |
Definition at line 844 of file comEngine_generate_procCode.c.
Referenced by comEngine_replace_reference_in_stat(), and comEngine_replace_reference_in_stat_rwt().
|
static |
Definition at line 72 of file comEngine_generate_procCode.c.
Referenced by comEngine_generate_procCode(), make_exec_mmcd(), make_mmcd_load_store_stat(), and make_step_inc_statement().