PIPS
|
#include "linear.h"
#include "genC.h"
#include "misc.h"
#include "ri.h"
#include "cloning.h"
#include "ri-util.h"
Go to the source code of this file.
statement clone_statement | ( | statement | s, |
clone_context | cc | ||
) |
cc | c |
Definition at line 437 of file clone_statement.c.
References do_clone_statement(), hash_string, hash_table_free(), and hash_table_make().
Referenced by do_loop_expansion_init(), do_loop_nest_unswitching_purge(), do_loop_unroll_with_epilogue(), do_loop_unroll_with_prologue(), do_simdizer_auto_tile_generate_all_tests(), dowhile_to_while_walker(), full_loop_unroll(), and make_new_loop_statement().
|
static |
Definition at line 102 of file clone_statement.c.
References application_arguments, application_function, CONS, do_clone_expression(), EXPRESSION, FOREACH, gen_nreverse(), make_application(), and NIL.
Referenced by do_clone_syntax().
|
static |
Definition at line 331 of file clone_statement.c.
References call_arguments, call_function, CONS, do_clone_expression(), EXPRESSION, FOREACH, gen_nreverse(), make_call(), and NIL.
Referenced by do_clone_instruction(), and do_clone_syntax().
|
static |
Definition at line 72 of file clone_statement.c.
References cast_expression, cast_type, copy_type(), do_clone_expression(), and make_cast().
Referenced by do_clone_syntax().
|
static |
There is no reason to replicate such an entity when cloning since they are left unchanged, except maybe if they contain dependent types...
The entity can be a typedef instead of a variable...
The type of the entity can be a typedef that has been renamed...
FI: I am adding this for loop_unroll, but I believe 1) that typedef variables should not be renamed since only non-dependent types are supported, and 2) that loop unroll should be implemented in a simpler way and complemented by flatten_code
For dependent types, the variables used in dimension might have been renamed, but the cloning is not compatible with dependent types because declarations are moved...
Definition at line 166 of file clone_statement.c.
References AddLocalEntityToDeclarations(), basic_derived, basic_derived_p, basic_typedef, basic_typedef_p, BLOCK_SEP_CHAR, clone_context_new_module, clone_context_new_module_statement, copy_basic(), entity_array_p(), entity_basic(), entity_consistent_p(), entity_enum_p(), entity_name, entity_scalar_p(), entity_storage, entity_struct_p(), entity_type, entity_undefined, entity_union_p(), free_storage(), gen_full_copy_list(), hash_get(), hash_put(), HASH_UNDEFINED_VALUE, make_new_array_variable_with_prefix(), make_new_derived_entity_with_prefix(), make_new_scalar_variable_with_prefix(), make_storage_rom(), MODULE_SEP, pips_assert, pips_internal_error, type_variable, type_variable_p, typedef_entity_p(), variable_basic, and variable_dimensions.
Referenced by do_clone_loop(), and do_clone_statement().
|
static |
forward declarations
Definition at line 157 of file clone_statement.c.
References do_clone_syntax(), expression_syntax, make_expression(), and normalized_undefined.
Referenced by do_clone_application(), do_clone_call(), do_clone_cast(), do_clone_forloop(), do_clone_instruction(), do_clone_multitest(), do_clone_range(), do_clone_reference(), do_clone_sizeofexpression(), do_clone_statement(), do_clone_subscript(), do_clone_test(), and do_clone_whileloop().
|
static |
Definition at line 352 of file clone_statement.c.
References do_clone_expression(), do_clone_statement(), f(), forloop_body, forloop_condition, forloop_increment, forloop_initialization, and make_forloop().
Referenced by do_clone_instruction().
|
static |
Definition at line 362 of file clone_statement.c.
References do_clone_call(), do_clone_expression(), do_clone_forloop(), do_clone_loop(), do_clone_multitest(), do_clone_sequence(), do_clone_test(), do_clone_whileloop(), instruction_call, instruction_expression, instruction_forloop, instruction_loop, instruction_multitest, instruction_sequence, instruction_tag, instruction_test, instruction_undefined, instruction_undefined_p, instruction_whileloop, is_instruction_call, is_instruction_expression, is_instruction_forloop, is_instruction_goto, is_instruction_loop, is_instruction_multitest, is_instruction_sequence, is_instruction_test, is_instruction_unstructured, is_instruction_whileloop, make_instruction_call(), make_instruction_expression(), make_instruction_forloop(), make_instruction_loop(), make_instruction_multitest(), make_instruction_sequence(), make_instruction_test(), make_instruction_whileloop(), and pips_user_error.
Referenced by do_clone_statement().
|
static |
if the label was cloned in the past, we get the same clone this function returned before instead of creating a new one
Checking if the entity is in the list of cloned labels
Insert those two values at beginning of the list (reverse inserting order as it's insterting before instead of inserting at the end)
cc | hash_table ht |
Definition at line 291 of file clone_statement.c.
References CAR, clone_context_labels, clone_context_new_module, CONS, ENDP, ENTITY, entity_empty_label(), entity_empty_label_p(), entity_undefined, entity_undefined_p, make_new_label(), POP, and same_entity_p().
Referenced by do_clone_loop(), do_clone_statement(), and do_clone_whileloop().
|
static |
ht
unsure ...
Definition at line 275 of file clone_statement.c.
References do_clone_entity(), do_clone_label(), do_clone_range(), do_clone_statement(), gen_chunk_undefined_p, gen_find_eq(), loop_body, loop_index, loop_label, loop_locals, loop_range, make_execution_sequential(), make_loop(), and NIL.
Referenced by do_clone_instruction().
|
static |
Definition at line 344 of file clone_statement.c.
References do_clone_expression(), do_clone_statement(), make_multitest(), multitest_body, and multitest_controller.
Referenced by do_clone_instruction().
|
static |
Definition at line 64 of file clone_statement.c.
References do_clone_expression(), make_range(), range_increment, range_lower, and range_upper.
Referenced by do_clone_loop(), and do_clone_syntax().
|
static |
nd formard declarations
Definition at line 46 of file clone_statement.c.
References CONS, do_clone_expression(), entity_constant_p, entity_name, entity_undefined, EXPRESSION, FOREACH, gen_nreverse(), hash_get(), HASH_UNDEFINED_VALUE, make_call(), make_reference(), NIL, reference_indices, and reference_variable.
Referenced by do_clone_syntax().
|
static |
Definition at line 252 of file clone_statement.c.
References CONS, do_clone_statement(), FOREACH, gen_nreverse(), make_sequence(), new_statements, NIL, sequence_statements, and STATEMENT.
Referenced by do_clone_instruction().
|
static |
Definition at line 80 of file clone_statement.c.
References copy_sizeofexpression(), do_clone_expression(), is_sizeofexpression_expression, is_sizeofexpression_type, make_sizeofexpression_expression(), sizeofexpression_expression, sizeofexpression_tag, and sizeofexpression_undefined.
Referenced by do_clone_syntax().
|
static |
ht
add new declarations to top level statement this prevents difficult scope renaming in C
Definition at line 393 of file clone_statement.c.
References CONS, do_clone_entity(), do_clone_expression(), do_clone_instruction(), do_clone_label(), empty_comments, empty_extensions(), ENDP, ENTITY, entity_initial, entity_to_expression(), expression_undefined_p, FOREACH, gen_nconc(), gen_nreverse(), instruction_to_statement(), make_assign_statement(), make_instruction_sequence(), make_sequence(), make_statement(), make_synchronization_none(), NIL, STATEMENT, statement_declarations, statement_instruction, statement_label, STATEMENT_NUMBER_UNDEFINED, STATEMENT_ORDERING_UNDEFINED, statement_undefined_p, value_expression, value_expression_p, and value_unknown_p.
Referenced by clone_statement(), do_clone_forloop(), do_clone_loop(), do_clone_multitest(), do_clone_sequence(), do_clone_test(), and do_clone_whileloop().
|
static |
Definition at line 93 of file clone_statement.c.
References CONS, do_clone_expression(), EXPRESSION, FOREACH, gen_nreverse(), make_subscript(), NIL, subscript_array, and subscript_indices.
Referenced by do_clone_syntax().
|
static |
Definition at line 111 of file clone_statement.c.
References check_call(), check_reference(), CONS, do_clone_application(), do_clone_call(), do_clone_cast(), do_clone_range(), do_clone_reference(), do_clone_sizeofexpression(), do_clone_subscript(), FOREACH, gen_nreverse(), INSTANCE_OF, is_syntax_application, is_syntax_call, is_syntax_cast, is_syntax_range, is_syntax_reference, is_syntax_sizeofexpression, is_syntax_subscript, is_syntax_va_arg, make_syntax_application(), make_syntax_call(), make_syntax_cast(), make_syntax_range(), make_syntax_reference(), make_syntax_sizeofexpression(), make_syntax_subscript(), make_syntax_va_arg(), NIL, pips_assert, pips_internal_error, SIZEOFEXPRESSION, syntax_application, syntax_call, syntax_cast, syntax_range, syntax_reference, syntax_sizeofexpression, syntax_subscript, syntax_tag, syntax_undefined, and syntax_va_arg.
Referenced by do_clone_expression().
|
static |
Definition at line 264 of file clone_statement.c.
References do_clone_expression(), do_clone_statement(), make_test(), test_condition, test_false, test_true, and test_undefined_p.
Referenced by do_clone_instruction().
|
static |
ht
Definition at line 321 of file clone_statement.c.
References copy_evaluation(), do_clone_expression(), do_clone_label(), do_clone_statement(), make_whileloop(), whileloop_body, whileloop_condition, whileloop_evaluation, and whileloop_label.
Referenced by do_clone_instruction().