PIPS
|
Go to the source code of this file.
Macros | |
#define | dma_load_p(e) ((e) == dma_load ) |
Add NewGen-like methods: More... | |
#define | dma_store_p(e) ((e) == dma_store ) |
#define | dma_allocate_p(e) ((e) == dma_allocate ) |
#define | dma_deallocate_p(e) ((e) == dma_deallocate ) |
#define | OUTLINE_PRAGMA "outline this" |
#define | OUTLINE_IGNORE "outline_ignore" |
Enumerations | |
enum | region_to_dma_switch { dma_load , dma_store , dma_allocate , dma_deallocate , dma_load , dma_store , dma_allocate , dma_deallocate } |
Warning! Do not modify this file that is automatically generated! More... | |
#define dma_allocate_p | ( | e | ) | ((e) == dma_allocate ) |
Definition at line 14 of file accel-util.h.
#define dma_deallocate_p | ( | e | ) | ((e) == dma_deallocate ) |
Definition at line 15 of file accel-util.h.
#define dma_load_p | ( | e | ) | ((e) == dma_load ) |
Add NewGen-like methods:
Definition at line 12 of file accel-util.h.
#define dma_store_p | ( | e | ) | ((e) == dma_store ) |
Definition at line 13 of file accel-util.h.
#define OUTLINE_IGNORE "outline_ignore" |
Definition at line 18 of file accel-util.h.
#define OUTLINE_PRAGMA "outline this" |
Definition at line 17 of file accel-util.h.
enum region_to_dma_switch |
Warning! Do not modify this file that is automatically generated!
Modify src/Libs/accel-util/accel-util-local.h instead, to add your own modifications. header file built by cproto accel_util-local.h
Enumerator | |
---|---|
dma_load | |
dma_store | |
dma_allocate | |
dma_deallocate | |
dma_load | |
dma_store | |
dma_allocate | |
dma_deallocate |
Definition at line 10 of file accel-util.h.
new_body | ew_body |
induction_var | nduction_var |
Definition at line 1307 of file outlining.c.
References add_declaration_statement(), FOREACH, outlining_variable_commenter(), pop_generated_variable_commenter(), and push_generated_variable_commenter().
Referenced by outliner_parameters().
bool array_expansion | ( | const char * | module_name | ) |
init
do
validate
module_name | odule_name |
Definition at line 395 of file statement_insertion.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, do_array_expansion(), do_array_expansion_aux(), expanded, free_value_mappings(), gen_context_recurse, get_current_module_entity(), get_current_module_statement(), HASH_DEFAULT_SIZE, hash_pointer, hash_table_free(), hash_table_make(), module_name(), module_name_to_entity(), module_reorder(), module_to_value_mappings(), reset_cumulated_rw_effects(), reset_current_module_entity(), reset_current_module_statement(), reset_precondition_map(), set_cumulated_rw_effects(), set_current_module_entity(), set_current_module_statement(), set_precondition_map(), set_proper_rw_effects(), and statement_domain.
bool bootstrap_kernels | ( | const | string | ) |
string | odule_name |
Definition at line 297 of file kernels.c.
References DB_PUT_MEMORY_RESOURCE, db_resource_p(), make_callees(), module_name(), NIL, and pips_internal_error.
bool clear_pragma | ( | const char * | module_name | ) |
Clear all pragma This should be done on any input with unhandled pragma, we don't what semantic we might break...
Put the new CODE ressource into PIPS:
module_name | odule_name |
Definition at line 403 of file manage_pragma.c.
References clear_pragma_on_statement(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, gen_recurse, gen_true(), module_name(), module_name_to_entity(), pips_debug, reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), set_current_module_statement(), statement_domain, and statement_undefined.
void clear_pragma_on_statement | ( | statement | s | ) |
Remove all pragma attached to a given statement.
Definition at line 388 of file manage_pragma.c.
References CONS, EXTENSION, extension_pragma_p, extensions_extension, FOREACH, gen_free_list(), NIL, and statement_extensions.
Referenced by clear_pragma(), is_SCOP_rich(), and outline_stmts_between_pragmas_in_sequence().
bool computation_intensity | ( | const char * | module_name | ) |
The computation intensity is derived from the complexity and the memory footprint. It assumes the cost model: execution_time = startup_overhead + memory_footprint / bandwidth + complexity / frequency
init stuff
do it now !
validate changes
reset
module_name | odule_name |
Definition at line 123 of file computation_intensity.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, do_computation_intensity(), gen_context_recurse, gen_null2(), get_current_module_statement(), init_computation_intensity_param(), module_name(), module_name_to_entity(), reset_complexity_map(), reset_cumulated_rw_effects(), reset_current_module_entity(), reset_current_module_statement(), set_complexity_map(), set_cumulated_rw_effects(), set_current_module_entity(), set_current_module_statement(), and statement_domain.
bool delay_communications_inter | ( | const char * | module_name | ) |
module_name | odule_name |
Definition at line 970 of file delay.c.
References delay_communications(), delay_communications_interprocedurally_p, and module_name().
bool delay_communications_intra | ( | const char * | module_name | ) |
module_name | odule_name |
Definition at line 974 of file delay.c.
References delay_communications(), delay_communications_interprocedurally_p, and module_name().
bool delay_load_communications | ( | char * | module_name | ) |
This phase looks for load or save statements that can be put out of the loop body and move these statements, if possible.
Get the code of the module.
Go through all the statements
then a backward translation
propagate inter procedurally , except if we have no caller
clean badly generated sequences
module_name | odule_name |
Definition at line 607 of file delay.c.
References clean_up_sequences(), compute_callees(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, delay_communications_init(), delay_communications_interprocedurally(), delay_communications_interprocedurally_p, delay_communications_intraprocedurally(), delay_communications_reset(), delay_communications_statement(), dependence_graph, false, get_proper_rw_effects(), module, module_name(), module_name_to_entity(), module_reorder(), context::need_flatten, NIL, pips_assert, remove_preferences(), reset_cumulated_rw_effects(), reset_current_module_entity(), reset_current_module_statement(), reset_ordering_to_statement(), reset_proper_rw_effects(), context::result, set_cumulated_rw_effects(), set_current_module_entity(), set_current_module_statement(), set_ordering_to_statement(), set_proper_rw_effects(), statement_consistent_p(), and statement_flatten_declarations().
Referenced by delay_load_communications_inter(), and delay_load_communications_intra().
bool delay_load_communications_inter | ( | char * | module_name | ) |
module_name | odule_name |
Definition at line 665 of file delay.c.
References delay_communications_interprocedurally_p, delay_load_communications(), and module_name().
bool delay_load_communications_intra | ( | char * | module_name | ) |
module_name | odule_name |
Definition at line 669 of file delay.c.
References delay_communications_interprocedurally_p, delay_load_communications(), and module_name().
bool delay_store_communications | ( | char * | module_name | ) |
Get the code of the module.
Go through all the statements
a first forward translation
propagate inter procedurally , except if we have no caller
clean badly generated sequences
module_name | odule_name |
Definition at line 674 of file delay.c.
References clean_up_sequences(), compute_callees(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, delay_communications_init(), delay_communications_interprocedurally(), delay_communications_interprocedurally_p, delay_communications_intraprocedurally(), delay_communications_reset(), delay_communications_statement(), dependence_graph, get_proper_rw_effects(), module, module_name(), module_name_to_entity(), module_reorder(), context::need_flatten, NIL, pips_assert, remove_preferences(), reset_cumulated_rw_effects(), reset_current_module_entity(), reset_current_module_statement(), reset_ordering_to_statement(), reset_proper_rw_effects(), context::result, set_cumulated_rw_effects(), set_current_module_entity(), set_current_module_statement(), set_ordering_to_statement(), set_proper_rw_effects(), statement_consistent_p(), and statement_flatten_declarations().
Referenced by delay_store_communications_inter(), and delay_store_communications_intra().
bool delay_store_communications_inter | ( | char * | module_name | ) |
module_name | odule_name |
Definition at line 733 of file delay.c.
References delay_communications_interprocedurally_p, delay_store_communications(), and module_name().
bool delay_store_communications_intra | ( | char * | module_name | ) |
module_name | odule_name |
Definition at line 737 of file delay.c.
References delay_communications_interprocedurally_p, delay_store_communications(), and module_name().
d
Definition at line 1336 of file isolate_statement.c.
References copy_expression(), dimension_lower, dimension_upper, int_to_expression(), and make_range().
Referenced by do_group_constants_terapix().
call dimensions_to_dma | ( | effect | reg_from, |
entity | to, | ||
list | ld, | ||
list | lo, | ||
enum region_to_dma_switch | m | ||
) |
converts dimensions to a dma call from a memory from to another memory to
from | expression giving the adress of the input memory |
to | expression giving the adress of the output memory |
ld | list of dimensions to analyze |
m | kind of call to generate |
Scalar detection:
Need the address for the allocator to modify the pointer itself:
Generate a "void **" type:
dest = "(void **) &to"
Except for the deallocation or if we have a scalar and then we have already created a pointer to it, the original array is referenced through pointer dereferencing:
sizeof(element)*number elements of the array:
Generate communication functions:
Build the sizes of the array block to transfer:
f expressions
Build the sizes of the array with element to transfer:
of expressions
Build the offsets of the array block to transfer:
of expressions
Use a special transfert function for scalars instead of reusing the 1D function. It may useful for example if it is implemented as a FIFO at the hardware level:
Generate host and accel adresses:
Output parameters in an order compatible with some C99 implementation of the runtime: size and block size first, so that some arguments can be defined with them:
Insert offset:
Insert the block size to transfert:
Insert the array sizes:
Insert the element size expression:
reg_from | eg_from |
to | o |
ld | f dimensions |
lo | f offsets |
Definition at line 379 of file isolate_statement.c.
References AddEntityToModule(), AddEntityToModuleCompilationUnit(), ADDRESS_OF_OPERATOR_NAME, CONS, copy_language(), DEREFERENCING_OPERATOR_NAME, DIMENSION, dma_allocate, dma_allocate_p, dma_deallocate, dma_deallocate_p, dma_load, dma_store, entity_intrinsic(), entity_scalar_p(), entity_to_expression(), entity_undefined_p, EXPRESSION, FOREACH, fortran_module_p(), gen_append(), gen_full_free_list(), gen_nreverse(), get_current_module_entity(), get_dma_dimension(), get_dma_name(), get_sizeofexpression_for_region(), make_basic_pointer(), make_call(), make_cast(), make_empty_subroutine(), make_expression(), make_expression_list, make_syntax_cast(), make_type_variable(), make_type_void(), make_variable(), MakeBinaryCall(), MakeUnaryCall(), module_language, module_name_to_entity(), MULTIPLY_OPERATOR_NAME, NIL, normalized_undefined, pips_internal_error, pips_user_warning, reference_variable, region_any_reference, region_to_address(), SizeOfDimension(), SizeOfDimensions(), and variable_to_dimensions().
Referenced by effects_to_dma().
Definition at line 68 of file array_to_pointer.c.
References entity_formal_p(), entity_initial, entity_variable_length_array_p(), expression_brace_p(), get_bool_property(), value_expression, value_expression_p, and value_undefined_p.
Referenced by do_array_to_pointer(), do_array_to_pointer_walk_expression(), and do_linearize_array().
void do_isolate_statement | ( | statement | s, |
const char * | prefix, | ||
const char * | suffix | ||
) |
perform statement isolation on statement s
that is make sure that all access to variables in s
are made either on private variables or on new entities declared on a new memory space.
The prefix
is used as a prefix to new entities' name.
this hash table holds an entity to (entity + tag ) binding
Add the calls now if needed, in the correct order:
guard the whole block by according conditions
prends ton couteau suisse et viens jouer avec moi dans pips
prefix | refix |
suffix | uffix |
Definition at line 1018 of file isolate_statement.c.
References CAR, CDR, CONS, declaration_statement_p(), dma_allocate, dma_deallocate, dma_load, dma_store, do_isolate_statement_preconditions_satisified_p(), effects_to_dma(), ENDP, expression_undefined, expression_undefined_p, free(), HASH_DEFAULT_SIZE, HASH_MAP, hash_pointer, hash_table_free(), hash_table_make(), insert_statement(), instruction_to_statement(), make_block_statement(), make_empty_statement, make_instruction_test(), make_test(), NIL, pips_assert, pips_user_warning, POP, prefix, STATEMENT, statement_block(), statement_block_p, and statement_undefined.
Referenced by isolate_statement(), and kernel_load_store_generator().
void dump_entity_set | ( | set | s | ) |
Definition at line 209 of file ikernels.c.
References entity_name, fprintf(), and SET_FOREACH.
regions
on entity e
regions | egions |
Definition at line 1325 of file isolate_statement.c.
References FOREACH, reference_variable, REGION, region_any_reference, region_undefined, and same_entity_p().
Referenced by do_solve_hardware_constraints_on_nb_proc(), and do_solve_hardware_constraints_on_volume().
bool flag_kernel | ( | const | string | ) |
string | odule_name |
Definition at line 287 of file kernels.c.
References callees_callees, CONS, db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, db_resource_p(), module_name(), pips_internal_error, strdup(), and STRING.
bool generate_two_addresses_code | ( | const | string | ) |
prelude
validate
ostlude
string | odule_name |
Definition at line 991 of file terapixify.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, gen_recurse, gen_true(), get_current_module_statement(), module_name(), module_name_to_entity(), module_reorder(), reset_cumulated_rw_effects(), reset_current_module_entity(), reset_current_module_statement(), set_conflict_testing_properties(), set_cumulated_rw_effects(), set_current_module_entity(), set_current_module_statement(), statement_domain, and two_addresses_code_generator().
misc.c
misc.c
Required by R-Stream. Depending on the activated option, only loop indexes or both loop indexes and written scalar variables are put into the list.
ref_ent | ef_ent |
Definition at line 58 of file misc.c.
References ENDP, entity_array_p(), find_write_effect_on_entity(), FOREACH, gen_once(), get_bool_property(), get_variables_to_remove(), index_of_a_loop_p(), instruction_loop, instruction_sequence, instruction_tag, instruction_test, instruction_whileloop, is_instruction_loop, is_instruction_sequence, is_instruction_test, is_instruction_whileloop, load_statement_enclosing_loops(), loop_body, sequence_statements, statement_instruction, statement_loop(), statement_loop_p(), statement_whileloop(), test_false, test_true, and whileloop_body.
Referenced by get_variables_to_remove(), and outliner_parameters().
bool gpu_promote_sequential | ( | const char * | module_name | ) |
Initialize set for each statement
module_name | odule_name |
Definition at line 143 of file gpu_promote_sequential.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, gpu_promote_sequential_on_statement(), local_name_to_top_level_entity(), module_name(), module_reorder(), reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), and set_current_module_statement().
The heuristic that trigger the promotion is quite simple at that time, all sequential code is promoted if a parallel loop is present in the sequence
seq | is the sequence on which to operate @loop l is an optionnal param that give the enclosing loop |
seq | eq |
Definition at line 83 of file gpu_promote_sequential.c.
References CONS, empty_statement_or_continue_p(), FOREACH, gen_nreverse(), ifdebug, NIL, parallel_loop_statement_p(), pips_debug, print_statement(), promote_statement(), and sequence_statements.
Referenced by gpu_promote_sequential_walker_in().
void gpu_promote_sequential_on_statement | ( | statement | s | ) |
Definition at line 139 of file gpu_promote_sequential.c.
References gen_null(), gen_recurse, gpu_promote_sequential_walker_in(), and loop_domain.
Referenced by gpu_promote_sequential().
bool group_constants | ( | const | string | ) |
Dependences for accel-util.h.
cproto-generated files group_constants.c
prelude
f entities
gather statement constants
gather constants
pack all constants and perform replacement
validate
ostlude
string | odule_name |
Definition at line 347 of file group_constants.c.
References call_domain, db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, declaration_filter(), do_group_constant_entity(), do_group_constants(), do_group_statement_constant(), expression_domain, find_statement_from_label_name(), gen_context_multi_recurse(), gen_false(), gen_null(), gen_true(), get_current_module_statement(), get_string_property(), group_constant_range_filter(), module_name(), module_name_to_entity(), module_reorder(), range_domain, reference_domain, reset_current_module_entity(), reset_current_module_statement(), reset_rw_effects(), set_current_module_entity(), set_current_module_statement(), set_free(), set_make(), set_pointer, set_rw_effects(), and statement_undefined_p.
Definition at line 256 of file inlining.c.
References ENTITY, FOREACH, and same_entity_name_p().
Referenced by check_private_variables_loop_walker(), inline_expression_call(), and outliner_independent_recursively().
bool ikernel_load_store | ( | char * | ) |
bool inlining | ( | const char * | module_name | ) |
perform inlining using effects
module_name | name of the module to inline |
module_name | odule_name |
Definition at line 957 of file inlining.c.
References do_inlining(), IPARAM_INIT, module_name(), and use_effects.
bool inlining_simple | ( | const char * | module_name | ) |
perform inlining without using effects
module_name | name of the module to inline |
module_name | odule_name |
Definition at line 971 of file inlining.c.
References do_inlining(), IPARAM_INIT, module_name(), and use_effects.
bool is_a_kernel | ( | const char * | func_name | ) |
func_name | unc_name |
Definition at line 369 of file ikernels.c.
References callees_callees, db_get_memory_resource(), FOREACH, same_string_p, and STRING.
Referenced by copy_from_call(), copy_to_call(), kernel_data_mapping(), and opencl_compile_mergeable_dag().
Checks if an entity is in a list.
Done by comparing the minimal user name.
Definition at line 688 of file outlining.c.
References ENDP, entity_minimal_user_name(), and FOREACH.
Referenced by outliner_parameters().
replace all references on entity old
by references on entity new
and adds offset offsets
to its indices
where | here |
old | ld |
new | ew |
offsets | ffsets |
Definition at line 1148 of file isolate_statement.c.
References gen_context_multi_recurse(), gen_true(), isolate_patch_reference(), isolate_patch_statement(), reference_domain, and statement_domain.
Referenced by effects_to_dma(), and isolate_patch_statement().
bool isolate_statement | ( | const char * | module_name | ) |
new
from old
, knowing the dimension of the isolated entity dimensions
and its offsets offsets
and the direction of the transfer t
init stuff
get user input
and proceed
validate
module_name | odule_name |
Definition at line 1349 of file isolate_statement.c.
References compute_callees(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, do_isolate_statement(), empty_string_p(), find_statement_from_label_name(), free_value_mappings(), get_current_module_entity(), get_current_module_name(), get_current_module_statement(), get_string_property(), module_name(), module_name_to_entity(), module_reorder(), module_to_value_mappings(), pips_debug, pips_user_error, prefix, reset_cumulated_rw_effects(), reset_current_module_entity(), reset_current_module_statement(), reset_precondition_map(), reset_proper_rw_effects(), set_cumulated_rw_effects(), set_current_module_entity(), set_current_module_statement(), set_precondition_map(), set_proper_rw_effects(), and statement_undefined_p.
bool kernel_data_mapping | ( | char * | module_name | ) |
set_entity_to_size(); should be performed at the workspace level
regions
out regions
in regions
preconditions
preconditions
Initialize global hashtables
Initialize set for each statement
Run the pass except if current module is a kernel
module_name | odule_name |
Definition at line 1344 of file ikernels.c.
References copies_from_in, copies_from_out, copies_to_in, copies_to_out, COPY_FROM_OUT, copy_from_statement(), COPY_TO_IN, copy_to_statement(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_on, fprintf(), free_value_mappings(), gen_recurse, gen_true(), get_current_module_entity(), get_current_module_statement(), hash_pointer, hash_table_make(), ifdebug, init_one_statement(), INIT_STATEMENT_SIZE, is_a_kernel(), local_name_to_top_level_entity(), make_memory_mapping(), MAKE_SET, module_name(), module_to_value_mappings(), pips_debug, print_entities(), region, reset_cumulated_rw_effects(), reset_current_module_entity(), reset_current_module_statement(), reset_in_effects(), reset_out_effects(), reset_precondition_map(), reset_proper_rw_effects(), set_cumulated_rw_effects(), set_current_module_entity(), set_current_module_statement(), set_in_effects(), set_out_effects(), set_precondition_map(), set_proper_rw_effects(), set_to_list(), statement_domain, and transfert_statement().
bool kernel_load_store | ( | const char * | module_name | ) |
based on convex array regions
module_name | odule_name |
Definition at line 143 of file kernels.c.
References kernel_load_store_engine(), and module_name().
turn a loop flagged with LOOP_LABEL into a kernel (GPU, terapix ...)
module_name | name of the module |
prelude
retreive loop label
run kernelize
validate
ostlude
module_name | odule_name |
Definition at line 259 of file kernels.c.
References compute_callees(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, do_kernelize(), entity_undefined_p, find_label_entity(), gen_context_recurse, gen_null2(), get_current_module_statement(), get_string_property_or_ask(), module_name(), module_name_to_entity(), module_reorder(), pips_user_error, reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), set_current_module_statement(), and statement_domain.
bool linearize_array | ( | const char * | module_name | ) |
linearize accesses to an array, and use pointers if asked to
module_name | odule_name |
Definition at line 987 of file array_to_pointer.c.
References linearize_array_generic(), and module_name().
bool linearize_array_fortran | ( | const char * | module_name | ) |
module_name | odule_name |
Definition at line 992 of file array_to_pointer.c.
References linearize_array_generic(), and module_name().
bool linearize_array_generic | ( | const char * | module_name | ) |
linearize accesses to an array, and use pointers if asked to
prelude
Do we have to cast the array at call site ?
it is too dangerous to perform this task on compilation unit, system variables may be changed
just linearize accesses and change signature from n-D arrays to 1-D arrays
additionally perform array-to-pointer conversion for c modules only
validate
ostlude
module_name | odule_name |
Definition at line 930 of file array_to_pointer.c.
References c_module_p(), cleanup_subscripts(), compilation_unit_entity_p(), compilation_unit_of_module(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, db_touch_resource(), debug_off, debug_on, discard_module_declaration_text(), do_array_to_pointer(), do_linearize_array(), ENTITY, entity_declarations, entity_initial, entity_variable_p, false, FOREACH, fortran_module_p(), get_bool_property(), get_current_module_entity(), get_current_module_statement(), module_name(), module_name_to_entity(), module_reorder(), pips_assert, pips_user_warning, reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), set_current_module_statement(), and statement_consistent_p().
Referenced by linearize_array(), and linearize_array_fortran().
bool loop_expansion | ( | const char * | module_name | ) |
first case: statement inserted by loop_expansion_init were illegal
generate guard if no statement to merge or no statement to clean
remove the test statement
second case: statement inserted by loop_expansion_init were legal
remove the test statement and merge
ok for the ui part, let's do something !
commit changes
< we may have add statements
module_name | odule_name |
Definition at line 261 of file loop_expansion.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, do_loop_expansion(), empty_extensions(), empty_string_p(), ENDP, entity_undefined_p, find_label_entity(), find_loop_from_label(), find_statements_with_pragma(), FOREACH, free_extensions(), gen_free_list(), get_bool_property(), get_current_module_entity(), get_current_module_name(), get_current_module_statement(), get_string_property(), get_string_property_or_ask(), make_continue_instruction(), module_name(), module_name_to_entity(), module_reorder(), pips_user_error, reset_cumulated_rw_effects(), reset_current_module_entity(), reset_current_module_statement(), set_cumulated_rw_effects(), set_current_module_entity(), set_current_module_statement(), STATEMENT, statement_extensions, statement_undefined_p, string_to_expression(), and update_statement_instruction().
bool loop_expansion_init | ( | const char * | module_name | ) |
first step of the loop expansion process: create a statement to insert and flag it with a pragma
ok for the ui part, let's do something !
commit changes
< we may have add statements
module_name | odule_name |
Definition at line 401 of file loop_expansion.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, do_loop_expansion_init(), empty_string_p(), entity_undefined_p, find_label_entity(), find_loop_from_label(), get_current_module_entity(), get_current_module_statement(), get_string_property(), get_string_property_or_ask(), module_name(), module_name_to_entity(), module_reorder(), pips_user_error, reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), set_current_module_statement(), statement_undefined_p, and string_to_expression().
bool normalize_microcode | ( | char * | module_name | ) |
prelude
checks
make sure
unroll some loops with constant trip count
reorder some loops
detect initial array sizes
now, try to guess the goal of the parameters
reserve some register for internal use
it's a pointer
a rom array with only one element, outlining and isolate_statement where too smart :)
pips bonus step: the consistency
rename all declared entities using terasm convention
need a copy otherwise goes in infinite loop
it's a pointer
it's an int
reorder arguments to match terapix conventions
loops in terasm iterate over a given parameter, in the form DO I=1:N I is hidden to the user and N must be a parameter
normalize test
try some simple optimizations
validate
ostlude
module_name | odule_name |
Definition at line 626 of file terapixify.c.
References ADDRESS_OF_OPERATOR_NAME, basic_int_p, basic_pointer, basic_pointer_p, CALL, call_arguments, call_domain, callees_callees, callers_to_call_sites(), callers_to_statements(), can_terapixify_call_p(), can_terapixify_expression_p(), cannot_terapixify(), CAR, CDR, clean_up_sequences(), compilation_unit_of_module(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, db_touch_resource(), DEREFERENCING_OPERATOR_NAME, dummy_identifier, dummy_identifier_p, ENDP, ENTITY, entity_area_p(), entity_declarations, entity_intrinsic(), entity_scalar_p(), entity_storage, entity_to_expression(), entity_type, entity_used_in_loop_bound_p(), entity_user_name(), entity_variable_p, exp, expression_domain, force_terapix_argument_handler(), FOREACH, forloop_domain, formal_offset, formal_parameter_p(), free_expression(), gen_context_multi_recurse(), gen_context_recurse, gen_copy_seq(), gen_free_list(), gen_null(), gen_recurse, gen_true(), gen_true2(), get_current_module_entity(), get_current_module_name(), get_current_module_statement(), get_string_property(), HASH_DEFAULT_SIZE, hash_pointer, hash_table_make(), terapix_loop_handler_param::ht, intptr_t, make_basic_pointer(), make_type_variable(), make_variable(), MakeUnaryCall(), module_functional_parameters, module_name(), module_name_to_entity(), module_reorder(), NIL, normalize_microcode_anotate(), normalize_microcode_parameter_orders(), offset, PARAMETER, parameter_dummy, parameter_type, pips_assert, POP, prefix, printf(), REFCAR, replace_entity_by_expression(), reset_cumulated_rw_effects(), reset_current_module_entity(), reset_current_module_statement(), set_cumulated_rw_effects(), set_current_module_entity(), set_current_module_statement(), STATEMENT, statement_declarations, statement_domain, stmt_rm_useless_label_rwt(), storage_formal, STRING, terapix_argument_handler(), TERAPIX_IMAGE_PREFIX, terapix_loop_handler(), terapix_loop_optimizer(), TERAPIX_MASK_PREFIX, terapix_normalize_tests(), terapix_optimize_accumulator(), terapix_pointer_initialized_from_a_mask_p(), TERAPIX_PTRARG_PREFIX, TERAPIX_REGISTER_PREFIX, terapixify_loops(), type_variable, ultimate_type(), variable_basic, and whileloop_domain.
void normalize_microcode_anotate | ( | void | ) |
there should be only one caller
Eeny, meeny, miny, moe
get ready for annotation insertion
Definition at line 410 of file terapixify.c.
References add_pragma_str_to_statement(), asprintf, callees_callees, CAR, db_get_memory_resource(), DIMENSION, dimension_size(), entity_pointer_p(), entity_type, entity_undefined_p, entity_user_name(), FindEntityFromUserName(), FOREACH, free(), get_current_module_entity(), get_current_module_name(), get_current_module_statement(), module_formal_parameters(), pips_assert, STATEMENT, statement_block(), strdup(), STRING, type_variable, and variable_dimensions.
Referenced by normalize_microcode().
bool omp_loop_parallel_threshold_set | ( | const char * | module_name | ) |
Should never arise
Put the new CODE ressource into PIPS:
module_name | odule_name |
Definition at line 351 of file manage_pragma.c.
References add_loop_parallel_threshold(), code_language, db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, entity_initial, gen_recurse, gen_true(), is_language_fortran, language_tag, module_name(), module_name_to_entity(), pips_debug, pragma_domain, reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), set_current_module_statement(), set_prettyprint_language_from_property(), statement_undefined, value_code, and value_code_p.
bool omp_merge_pragma | ( | const char * | module_name | ) |
merge the pragma on the outer loop
Should never arise
module_name | odule_name |
Definition at line 297 of file manage_pragma.c.
References build_outer(), code_language, entity_initial, FOREACH, gen_context_recurse, gen_free_list(), gen_null2(), get_string_property(), inner_filter(), inner_rewrite(), is_language_fortran, language_tag, loop_domain, merge_on_outer(), module_name(), module_name_to_entity(), NIL, pips_debug, PIPS_PHASE_POSTLUDE, PIPS_PHASE_PRELUDE, set_prettyprint_language_from_property(), value_code, and value_code_p.
bool ompify_code | ( | const char * | ) |
entry point for outline module outlining will be performed using either comment recognition or interactively
module_name | name of the module containing the statements to outline |
prelude
retrieve name of the outlined module
retrieve statement to outline
apply outlining
validate
ostlude
module_name | odule_name |
Definition at line 1385 of file outlining.c.
References compute_callees(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, empty_string_p(), ENDP, find_statement_from_label_name(), find_statements_interactively(), find_statements_with_pragma(), fortran_module_p(), free(), get_bool_property(), get_current_module_entity(), get_current_module_name(), get_current_module_statement(), get_string_property(), get_string_property_or_ask(), loop_body, make_statement_list, module_name(), module_name_to_entity(), module_reorder(), outliner(), pips_user_error, reset_cumulated_rw_effects(), reset_current_module_entity(), reset_current_module_statement(), reset_rw_effects(), set_cumulated_rw_effects(), set_current_module_entity(), set_current_module_statement(), set_rw_effects(), statement_loop(), statement_loop_p(), statement_to_outline, statement_undefined_p, strdup(), and strupper().
_ctx | ctx |
Definition at line 454 of file manage_pragma.c.
References build_new_top_level_module_name(), clear_pragma_on_statement(), CONS, ENDP, FOREACH, gen_free_list(), gen_nreverse(), NIL, context::outline_done, outliner(), pips_user_warning, context::pragma_begin, context::pragma_end, context::prefix, sequence_statements, STATEMENT, and statement_has_this_pragma_string_p.
Referenced by pragma_outliner().
outline the statements in statements_to_outline into a module named outline_module_name the outlined statements are replaced by a call to the newly generated module statements_to_outline is modified in place to represent that call
outline_module_name | name of the new module |
statements_to_outline | is a list of consecutive statements to outline into outline_module_name |
1 : init
pass loop bounds as parameters if required
2 : scan
3 : parameters
4 : patch parameters
5 : file
6 : call
7: remove obsolete entities, this is needed otherwise the IR keeps some obsolete data
outline_module_name | utline_module_name |
statements_to_outline | tatements_to_outline |
Definition at line 1327 of file outlining.c.
References c_module_p(), copy_language(), do_remove_entity_from_decl(), do_remove_entity_from_private(), ENDP, ENTITY, entity_declarations, find_statement_from_label_name(), FOREACH, free_entity(), gen_context_multi_recurse(), gen_free_list(), gen_remove(), gen_true(), get_bool_property(), get_current_module_entity(), get_current_module_name(), get_current_module_statement(), get_string_property(), loop_domain, loop_label, make_block_statement(), make_empty_subroutine(), module_language, NIL, outliner_call(), outliner_extract_loop_bound(), outliner_file(), outliner_init(), outliner_parameters(), outliner_patch_parameters(), outliner_scan(), pips_assert, STATEMENT, statement_domain, statement_loop(), statement_undefined_p, and statements_to_declarations().
Referenced by do_kernelize(), gpu_ify_statement(), gpu_memory_apply(), outline(), outline_stmts_between_pragmas_in_sequence(), scalopragma(), and taskify_statement().
and return the replacement statement
perform substitution : replace the original statements by a single call and patch the remaining statement (yes it's ugly)
trash any extensions|comments, they may not be valid now
new_fun | ew_fun |
statements_to_outline | tatements_to_outline |
effective_parameters | ffective_parameters |
Definition at line 1235 of file outlining.c.
References empty_comments, empty_extensions(), FOREACH, free(), free_extensions(), gen_free_list(), make_call(), make_continue_instruction(), make_instruction_call(), NIL, STATEMENT, statement_comments, statement_declarations, statement_extensions, statement_instruction, statement_undefined, statement_undefined_p, and string_undefined_p.
Referenced by compile_mpi(), and outliner().
prepare parameters and body
5-0 : create new compilation unit
5-1 : add all callees to the same foreign compilation units
5-2: fix the types of the formal parameter in case a new compilation unit is used. Make sure that the function type and the types of the formal parameters are consistent. The function type is correct because the compilation unit has just been parsed.
add a return at the end of the body, in all cases
we can now begin the outlining
et_current_module_entity()
horrible hack to prevent declaration duplication signed : Serge Guelton
we need to free them now, otherwise recompilation fails
new_fun | ew_fun |
formal_parameters | ormal_parameters |
new_body | ew_body |
Definition at line 1138 of file outlining.c.
References add_new_module_from_text(), AddEntityToModuleCompilationUnit(), asprintf, c_module_p(), CAR, CDR, code_declarations, compilation_unit_of_module(), CONS, copy_type(), dummy_identifier, ENTITY, entity_initial, entity_type, entity_user_name(), entity_variable_p, EntityCode(), FILE_SEP, FILE_SEP_STRING, find_ith_parameter(), FOREACH, fortran_module_p(), free(), free_text(), free_type(), functional_parameters, gen_free_list(), gen_length(), gen_nconc(), get_bool_property(), get_current_module_entity(), get_current_module_name(), insert_statement(), make_return_statement(), module_functional_parameters, NIL, outliner_compilation_unit(), outliner_independent(), PARAMETER, parameter_dummy, parameter_type, set_bool_property(), STAT_ORDER, strdup(), string_undefined, string_undefined_p, strndup(), text_named_module(), type_equal_p(), type_functional, type_undefined, type_undefined_p, and value_code.
Referenced by compile_mpi(), and outliner().
hash_table outliner_init | ( | entity | new_fun, |
list | statements_to_outline | ||
) |
try to be smart concerning array references
new_fun | ew_fun |
statements_to_outline | tatements_to_outline |
Definition at line 546 of file outlining.c.
References get_bool_property(), hash_pointer, hash_table_make(), and outliner_smart_references_computation().
Referenced by compile_mpi(), and outliner().
void outliner_parameters | ( | entity | new_fun, |
statement | new_body, | ||
list | referenced_entities, | ||
hash_table | entity_to_effective_parameter, | ||
list * | effective_parameters_, | ||
list * | formal_parameters_ | ||
) |
all variables are promoted parameters
this create the dummy parameter
FI: when a new compilation unit is used, why declare type in the initial compilation unit? It generates derived types within the wrong compilation unit... and back fires in the prettyprinter
this adds the effective parameter
this is a constant variable or fortran function result
new_fun | ew_fun |
new_body | ew_body |
referenced_entities | eferenced_entities |
entity_to_effective_parameter | ntity_to_effective_parameter |
effective_parameters_ | ffective_parameters_ |
formal_parameters_ | ormal_parameters_ |
Definition at line 698 of file outlining.c.
References add_induction_var_to_local_declarations(), AddLocalEntityToDeclarations(), clean_enclosing_loops(), CONS, copy_type(), DEFAULT_INTEGER_TYPE_SIZE, ENTITY, entity_constant_p, entity_function_p(), entity_initial, entity_name, entity_storage, entity_symbolic_p, entity_to_expression(), entity_type, entity_user_name(), entity_variable_p, EXPRESSION, FindOrCreateEntity(), FOREACH, fortran_module_p(), functional_result, gen_free_list(), gen_nreverse(), get_bool_property(), get_current_module_entity(), get_variables_to_remove(), hash_get(), hash_table_free(), HASH_UNDEFINED_VALUE, ifdebug, intptr_t, is_entity_in_list(), loops_mapping_of_statement(), make_basic_int(), make_dummy_identifier(), make_formal(), make_mode_reference(), make_mode_value(), make_parameter(), make_storage_formal(), make_type_variable(), make_value_unknown(), make_variable(), module_entity_to_compilation_unit_entity(), NIL, PARAMETER, pips_debug, print_expressions(), print_parameters(), set_enclosing_loops_map(), type_functional, and type_to_named_type().
Referenced by compile_mpi(), and outliner().
void outliner_patch_parameters | ( | list | statements_to_outline, |
list | referenced_entities, | ||
list | effective_parameters, | ||
list | formal_parameters, | ||
statement | new_body, | ||
statement | begin, | ||
statement | end | ||
) |
we need to patch parameters , effective parameters and body in C because parameters are passed by copy in function call it's not needed if
Here a scalar will be passed by address and a prelude/postlude will be used in the outlined module as below :
void new_module( int *scalar_0 ) { int scalar; scalar = *scalar_0; ... // Work on scalar ... *scalar_0 = scalar; }
Note FI: this is also useless when the variable does not appear in the out region of the outlined piece of code. However, the out effets and out regions are not available for every piece of code.
e is no longer a formal parameter, but a local variable
storage eos = entity_storage(e); // e's old storage
pips_assert("eos is a formal storage", storage_formal_p(eos));
formal fs = storage_formal(eos);
entity f = formal_function(fs); // In fact, f is not a function but a variable!
entity a = module_to_dynamic_area(f);
ram r = make_ram(f, a, UNKNOWN_RAM_OFFSET, NIL);
storage ens = make_storage_ram(r);
entity_storage(e) = ens;
free_storage(eos);
statements_to_outline | tatements_to_outline |
referenced_entities | eferenced_entities |
effective_parameters | ffective_parameters |
formal_parameters | ormal_parameters |
new_body | ew_body |
begin | egin |
end | nd |
Definition at line 809 of file outlining.c.
References add_C_variable_to_area(), add_declaration_statement(), ADDRESS_OF_OPERATOR_NAME, array_type_p(), basic_pointer, basic_pointer_p, CAR, CONS, convert_pointer_to_array(), copy_type(), DEREFERENCING_OPERATOR_NAME, DIMENSION, dummy_identifier, end, ENDP, ENTITY, entity_intrinsic(), entity_name, entity_to_expression(), entity_type, entity_undefined, entity_undefined_p, EXPRESSION, expression_reference(), expression_reference_p(), expression_syntax, find_write_effect_on_entity(), FOREACH, gen_append(), ifdebug, insert_statement(), int_to_expression(), make_assign_statement(), make_call(), make_dimension(), make_entity_copy_with_new_name(), make_expression(), make_syntax_call(), MakeUnaryCall(), NIL, normalized_undefined, offset, out, outlining_patched_variable_commenter(), PARAMETER, parameter_dummy, parameter_type, pips_assert, pips_debug, POP, pop_generated_variable_commenter(), print_statement(), push_generated_variable_commenter(), reference_variable, STATEMENT, store_cumulated_rw_effects_list(), the_current_debug_level, type_variable, type_variable_p, variable_basic, variable_dimensions, X, and x.
Referenced by compile_mpi(), and outliner().
Retrieve referenced entities
Retrieve declared entities
get the relative complements and create the parameter list
purge the functions from the parameter list, we assume they are declared externally also purge the formal parameters from other modules, gathered by get_referenced_entities but wrong here
function should be added to compilation unit
fortran function results must be declared in the new function
remove global variables if needed
sort list, and put parameters first
in some rare case, we can have too functions with the same local name
new_fun | ew_fun |
statements_to_outline | tatements_to_outline |
new_body | ew_body |
Definition at line 555 of file outlining.c.
References AddLocalEntityToDeclarations(), compilation_unit_of_module(), CONS, ENTITY, entity_declarations, entity_function_p(), FOREACH, fortran_module_p(), gen_chunk_undefined_p, gen_copy_seq(), gen_find_eq(), gen_free_list(), gen_list_and_not(), gen_nconc(), gen_remove_once(), get_bool_property(), get_current_module_entity(), get_current_module_name(), ifdebug, module_name_to_entity(), NIL, outline_remove_duplicates(), outliner_statements_referenced_entities(), outlining_variable_commenter(), pips_debug, pop_generated_variable_commenter(), print_entities(), push_generated_variable_commenter(), sort_entities_with_dep(), statements_localize_declarations(), statements_to_declarations(), and top_level_entity_p().
Referenced by compile_mpi(), and outliner().
we don't want initial values of outer entities
gather local initial values skipped by the previous call
set to list
statements | tatements |
Definition at line 251 of file outlining.c.
References ENTITY, entity_initial, entity_type, FOREACH, fprintf(), get_referenced_entities_filtered(), ifdebug, NIL, pips_debug, print_entities(), print_statement(), set_free(), set_make(), set_pointer, set_to_list(), set_union(), skip_constants_intrinsics_members(), skip_values(), STATEMENT, and statement_to_declarations().
Referenced by outliner_scan(), outliner_smart_references_computation(), and update_referenced_entities().
Check that a pragma is an "omp" one.
Definition at line 78 of file manage_pragma.c.
References call_function, CAR, entity_local_name(), EXPRESSION, expression_call(), expression_call_p(), gen_last(), OMP_OMP_FUNCTION_NAME, pips_internal_error, pragma_expression, pragma_expression_p, pragma_string, pragma_string_p, and same_string_p.
Referenced by build_omp_pragma_list().
bool pragma_outliner | ( | char * | module_name | ) |
module_name | odule_name |
Definition at line 512 of file manage_pragma.c.
References compute_callees(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, free_value_mappings(), gen_context_recurse, gen_null2(), generic_effects_reset_all_methods(), get_current_module_entity(), get_current_module_statement(), get_string_property(), local_name_to_top_level_entity(), module_name(), module_to_value_mappings(), context::outline_done, outline_stmts_between_pragmas_in_sequence(), context::pragma_begin, context::pragma_end, context::prefix, reset_cumulated_rw_effects(), reset_current_module_entity(), reset_current_module_statement(), reset_precondition_map(), reset_proper_rw_effects(), reset_rw_effects(), reset_transformer_map(), sequence_domain, set_cumulated_rw_effects(), set_current_module_entity(), set_current_module_statement(), set_methods_for_convex_effects(), set_precondition_map(), set_proper_rw_effects(), set_rw_effects(), and set_transformer_map().
void region_to_dimensions | ( | effect | reg, |
transformer | tr, | ||
list * | dimensions, | ||
list * | offsets, | ||
expression * | condition | ||
) |
reg | eg |
tr | r |
dimensions | imensions |
offsets | ffsets |
condition | ondition |
Definition at line 204 of file isolate_statement.c.
References declarations_to_dimensions(), effect_region_p, pips_assert, pips_internal_error, pips_user_warning, reference_variable, region_any_reference, and region_to_minimal_dimensions().
Referenced by effects_to_dma().
bool region_to_minimal_dimensions | ( | effect | , |
transformer | , | ||
list * | , | ||
list * | , | ||
bool | , | ||
expression * | |||
) |
induction_var | nduction_var |
effective_parameters | ffective_parameters |
Definition at line 1288 of file outlining.c.
References entity_minimal_user_name(), entity_undefined_p, exp, expression_to_entity(), FOREACH, gen_copy_seq(), gen_free_list(), gen_remove_once(), and printf().
induction_var | nduction_var |
formal_parameters | ormal_parameters |
Definition at line 1268 of file outlining.c.
References dummy_identifier, entity_minimal_user_name(), entity_undefined_p, FOREACH, gen_copy_seq(), gen_free_list(), gen_remove_once(), parameter_dummy, and printf().
void remove_preferences | ( | void * | obj | ) |
delay.c
delay.c
obj | bj |
Definition at line 89 of file delay.c.
References cell_domain, do_remove_preference(), gen_null(), and gen_recurse.
Referenced by delay_communications(), delay_load_communications(), delay_store_communications(), loop_annotate(), and simdizer().
This function returns true if the statement is a simd loadsave statement.
stat | tat |
Definition at line 127 of file delay.c.
References simd_load_stat_p(), and simd_store_stat_p().
Referenced by dmas_invert_p(), do_remove_redundant_communications_in_anyloop(), do_remove_redundant_communications_in_sequence(), select_independent_dmas(), simd_stat_p(), and simd_trace_call().
stat | tat |
Definition at line 111 of file delay.c.
References simd_load_call_p(), statement_call(), and statement_call_p().
Referenced by delay_communications_call(), do_recurse_statements_conflict_p(), and simd_dma_stat_p().
This function returns true if the statement is a simd statement.
stat | tat |
Definition at line 135 of file delay.c.
References simd_dma_stat_p(), and simd_work_stat_p().
stat | tat |
Definition at line 119 of file delay.c.
References simd_store_call_p(), statement_call(), and statement_call_p().
Referenced by delay_communications_call(), simd_dma_stat_p(), statements_conflict_p(), and statements_conflict_relaxed_p().
stat | tat |
Definition at line 115 of file delay.c.
References simd_work_call_p(), statement_call(), and statement_call_p().
Referenced by simd_stat_p().
bool solve_hardware_constraints | ( | const char * | module_name | ) |
validate
module_name | odule_name |
Definition at line 267 of file constraints.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, do_solve_hardware_constraints(), find_statement_from_label_name(), free_value_mappings(), get_current_module_entity(), get_current_module_name(), get_current_module_statement(), get_string_property(), module_name(), module_name_to_entity(), module_reorder(), module_to_value_mappings(), reset_cumulated_rw_effects(), reset_current_module_entity(), reset_current_module_statement(), reset_precondition_map(), reset_proper_rw_effects(), set_cumulated_rw_effects(), set_current_module_entity(), set_current_module_statement(), set_precondition_map(), set_proper_rw_effects(), and statement_undefined_p.
Definition at line 52 of file manage_pragma.c.
References call_function, CreateIntrinsic(), EXPRESSION, expression_call(), expression_call_p(), EXTENSION, extension_pragma, extensions_extension, FOREACH, OMP_OMP_FUNCTION_NAME, pragma_expression, pragma_expression_p, pragma_string, pragma_string_p, same_entity_p(), and statement_extensions.
bool statement_insertion | ( | const char * | module_name | ) |
init
do
validate
module_name | odule_name |
Definition at line 240 of file statement_insertion.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, do_statement_insertion(), get_current_module_statement(), module_name(), module_name_to_entity(), module_reorder(), reset_cumulated_rw_effects(), reset_current_module_entity(), reset_current_module_statement(), reset_proper_rw_effects(), set_cumulated_rw_effects(), set_current_module_entity(), set_current_module_statement(), and set_proper_rw_effects().
void terapix_loop_optimizer | ( | statement | st | ) |
look for iterators from the end
now try to hide the iteration in a pointer access somewhere
st | t |
Definition at line 498 of file terapixify.c.
References AddLocalEntityToDeclarations(), assignment_statement_p(), binary_call_lhs, binary_call_rhs, call_domain, call_function, CONS, copy_statement(), DEFAULT_INTEGER_TYPE_SIZE, do_terapix_loop_optimizer(), ENDP, entity_intrinsic(), ENTITY_MINUS_C_P, ENTITY_PLUS_C_P, expression_call(), expression_call_p(), expression_equal_p(), expression_integer_value(), expression_to_entity(), FOREACH, free_statement(), gen_context_recurse, gen_copy_seq(), gen_free_list(), gen_nreverse(), gen_null2(), gen_remove(), get_current_module_entity(), get_referenced_entities(), insert_statement(), intptr_t, loop_body, make_basic_int(), make_block_statement(), make_new_scalar_variable(), MINUS_C_OPERATOR_NAME, NIL, PLUS_C_OPERATOR_NAME, sequence_statements, set_belong_p(), set_free(), STATEMENT, statement_block(), statement_block_p, statement_call(), statement_loop(), statement_loop_p(), statement_sequence(), and tlo_context_t::success.
Referenced by normalize_microcode().
bool terapix_remove_divide | ( | const | string | ) |
prelude
converts divide operator into multiply operator: a/cste = a* (1/b) ~= a * ( 128 / cste ) / 128
validate
ostlude
string | odule_name |
Definition at line 1045 of file terapixify.c.
References call_domain, db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, do_terapix_remove_divide(), gen_recurse, gen_true(), get_current_module_statement(), module_name(), module_name_to_entity(), reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), and set_current_module_statement().
bool terapix_warmup | ( | const char * | module_name | ) |
prelude
go go power rangers
validate
ostlude
module_name | odule_name |
Definition at line 908 of file terapixify.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, do_terapix_warmup(), get_current_module_statement(), module_name(), module_name_to_entity(), module_reorder(), reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), and set_current_module_statement().
t,counting | pointers as a dimension |
BEWARE: does not take structs and unions into account
Definition at line 89 of file array_to_pointer.c.
References basic_pointer, basic_pointer_p, gen_length(), ifdebug, pips_debug, print_type(), type_dereferencement_depth(), type_variable, type_variable_p, ultimate_type(), variable_basic, and variable_dimensions.
Referenced by type_dereferencement_depth().
bool unfolding | ( | char * | module_name | ) |
perform unfolding using effect
module_name | name of the module to unfold |
module_name | odule_name |
Definition at line 1118 of file inlining.c.
References do_unfolding(), IPARAM_INIT, module_name(), and use_effects.
bool unfolding_simple | ( | char * | module_name | ) |
perform unfolding without using effects
module_name | name of the module to unfold |
module_name | odule_name |
Definition at line 1133 of file inlining.c.
References do_unfolding(), IPARAM_INIT, module_name(), and use_effects.
bool wrap_kernel_argument | ( | char * | module_name | ) |
This pass will wrap kernel arguments in a call to a wrapper function.
prelude
o the job
validate
ostlude
module_name | odule_name |
Definition at line 1486 of file ikernels.c.
References call_domain, callees_callees, caller_name, compute_callees(), copy_language(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_on, entity_undefined_p, FOREACH, gen_context_recurse, gen_true2(), get_current_module_statement(), get_string_property(), local_name_to_top_level_entity(), make_empty_subroutine(), module_language, module_name(), module_name_to_entity(), module_reorder(), pips_user_warning, reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), set_current_module_statement(), STRING, wrap_call_argument(), and wrapper_function.