PIPS
|
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "effects.h"
#include "complexity_ri.h"
#include "text.h"
#include "ri-util.h"
#include "prettyprint.h"
#include "effects-util.h"
#include "text-util.h"
#include "database.h"
#include "misc.h"
#include "pipsdbm.h"
#include "resources.h"
#include "control.h"
#include "transformations.h"
#include "effects-generic.h"
#include "effects-simple.h"
#include "properties.h"
#include "complexity.h"
#include "sac.h"
Go to the source code of this file.
Functions | |
static statement | atomize_condition (statement cs) |
atomize the condition of a test and returns generated statements More... | |
static bool | check_if_conv_call (call c, bool *success) |
accept if conversion if the call is an assignment call More... | |
static bool | check_if_conv_test (test t, bool *success) |
checks if a test statement is suitable for if conversion, that is it only contains sequence of assignments More... | |
static bool | check_if_conv_walker (instruction i, bool *success) |
static bool | check_if_conv (statement stat) |
checks if if conversion can be performed on test statement More... | |
static void | update_test_condition (test t, expression cond) |
adds More... | |
static statement | make_if_converted_test_statement (expression cond, statement branch) |
create a test statement with appropriate extension and a test under cond with a single true branch branch More... | |
static statement | do_transform_if_statements (statement branch, expression cond) |
merge content of a test with the test itself More... | |
static void | if_conv_init_statement (statement stat) |
bool | if_conversion_init (char *mod_name) |
if_conversion_init.c More... | |
atomize the condition of a test and returns generated statements
cs | test statement |
Definition at line 66 of file if_conversion_init.c.
References expression_reference_p(), make_new_scalar_variable(), simd_atomize_this_expression(), statement_test(), statement_undefined, and test_condition.
Referenced by if_conv_init_statement().
checks if if conversion can be performed on test statement
stat | test statement |
Definition at line 127 of file if_conversion_init.c.
References check_if_conv_test(), instruction_test, pips_assert, statement_instruction, and statement_test_p().
Referenced by if_conv_init_statement().
accept if conversion if the call is an assignment call
Definition at line 79 of file if_conversion_init.c.
References call_constant_p, call_function, copy_call(), ENTITY_ASSIGN_P, ENTITY_CONTINUE_P, free_call(), and split_update_call().
Referenced by check_if_conv_walker().
checks if a test statement is suitable for if conversion, that is it only contains sequence of assignments
Definition at line 110 of file if_conversion_init.c.
References check_if_conv_walker(), gen_context_recurse, gen_null2(), instruction_domain, test_false, and test_true.
Referenced by check_if_conv(), and check_if_conv_walker().
|
static |
Definition at line 90 of file if_conversion_init.c.
References check_if_conv_call(), check_if_conv_test(), instruction_call, instruction_tag, instruction_test, is_instruction_block, is_instruction_call, and is_instruction_test.
Referenced by check_if_conv_test().
|
static |
merge content of a test with the test itself
branch | content of the test |
cond | condition of the test |
Definition at line 168 of file if_conversion_init.c.
References CONS, copy_expression(), copy_statement(), ENDP, FOREACH, gen_nreverse(), make_block_statement(), make_if_converted_test_statement(), NIL, STATEMENT, statement_block(), statement_block_p, statement_test(), statement_test_p(), and update_test_condition().
Referenced by if_conv_init_statement().
|
static |
Definition at line 212 of file if_conversion_init.c.
References atomize_condition(), check_if_conv(), clean_up_sequences(), complexity_polynome(), CONS, control_successors, copy_expression(), do_transform_if_statements(), entity_intrinsic(), gen_get_recurse_current_ancestor(), gen_length(), get_int_property(), HASH_UNDEFINED_VALUE, ifdebug, INSTANCE_OF, load_statement_complexity(), make_instruction_block(), make_statement_list, MakeUnaryCall(), NOT_OPERATOR_NAME, pips_debug, pips_user_warning, polynome_constant_p(), polynome_TCST(), print_statement(), STATEMENT, statement_test(), statement_test_p(), statement_undefined_p, test_condition, test_false, test_true, and update_statement_instruction().
Referenced by if_conversion_init().
bool if_conversion_init | ( | char * | mod_name | ) |
mod_name | od_name |
Definition at line 337 of file if_conversion_init.c.
References copy_statement(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, FOREACH, free_statement(), gen_recurse, gen_true(), if_conv_init_statement(), ifdebug, insert_statement_no_matter_what(), make_empty_block_statement(), module_name_to_entity(), module_reorder(), pips_debug, print_statement(), reset_complexity_map(), reset_current_module_entity(), reset_current_module_statement(), set_complexity_map(), set_current_module_entity(), set_current_module_statement(), STATEMENT, statement_block(), and statement_domain.
|
static |
create a test statement with appropriate extension and a test under cond with a single true branch branch
Definition at line 150 of file if_conversion_init.c.
References CONS, EXTENSION, extensions_extension, IF_TO_CONVERT, instruction_to_statement(), make_empty_statement, make_extension_pragma(), make_instruction_test(), make_pragma_string(), make_test(), NIL, statement_extensions, and strdup().
Referenced by do_transform_if_statements().
|
static |
adds
cond | to the condtion of |
t |
Definition at line 142 of file if_conversion_init.c.
References AND_OPERATOR_NAME, copy_expression(), entity_intrinsic(), MakeBinaryCall(), and test_condition.
Referenced by do_transform_if_statements().