PIPS
|
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "effects.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 "callgraph.h"
#include "sac.h"
Go to the source code of this file.
Functions | |
static instruction | make_phi_assign_instruction (reference lRef, expression cond, expression ref1, expression ref2) |
creates a phi-instruction using the entity given in property the generated instruction as the form lRef = PHI(cond,ref1, ref2) all parameters are copied More... | |
static bool | simd_supported_stat_p (statement stat) |
static bool | process_true_call_stat (expression cond, statement stat) |
converts statement stat into a phi-statement if possible More... | |
static void | process_true_stat (statement parent, expression cond, statement stat) |
static void | if_conv_statement (statement cs) |
bool | if_conversion (char *mod_name) |
if_conversion.c More... | |
static statement | do_loop_nest_unswitching_purge (statement adam, list conditions) |
static void | do_loop_nest_unswitching (statement st, list *conditions) |
bool | loop_nest_unswitching (const char *module_name) |
will help for partial eval later
some conditions left
parent is a loop : check for a conflict
Definition at line 329 of file if_conversion.c.
References AddEntityToCurrentModule(), basic_of_expression(), binary_call_lhs, binary_call_rhs, binary_intrinsic_expression, call_arguments, CONS, copy_expression(), do_loop_nest_unswitching_purge(), ENDP, entity_to_expression(), EXPRESSION, expression_call(), expression_minmax_p(), expression_normalized, expression_syntax, FOREACH, gen_copy_seq(), gen_free_list(), gen_full_free_list(), gen_get_ancestor(), gen_length(), gen_remove_once(), get_current_module_entity(), get_referenced_entities(), GREATER_THAN_OPERATOR_NAME, int, loop_index, loop_range, make_assign_expression(), make_new_scalar_variable(), NIL, NORMALIZE_EXPRESSION, normalized_complex_p, pips_assert, pips_internal_error, range_upper, set_belong_p(), set_free(), statement_domain, statement_loop(), statement_loop_p(), and update_expression_syntax().
Referenced by loop_nest_unswitching().
Definition at line 310 of file if_conversion.c.
References CAR, CDR, clone_statement(), copy_expression(), ENDP, EXPRESSION, free_clone_context(), get_current_module_entity(), get_current_module_statement(), instruction_to_statement(), make_clone_context(), make_instruction_test(), make_test(), and NIL.
Referenced by do_loop_nest_unswitching().
|
static |
Definition at line 244 of file if_conversion.c.
References extensions_extension, gen_remove(), get_extension_from_statement_with_pragma(), IF_TO_CONVERT, instruction_test, process_true_stat(), statement_extensions, statement_instruction, test_condition, and test_true.
Referenced by if_conversion().
bool if_conversion | ( | char * | mod_name | ) |
mod_name | od_name |
Definition at line 281 of file if_conversion.c.
References compute_callees(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, gen_recurse, gen_true(), if_conv_statement(), module_name_to_entity(), module_reorder(), reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), set_current_module_statement(), and statement_domain.
bool loop_nest_unswitching | ( | const char * | module_name | ) |
module_name | odule_name |
Definition at line 391 of file if_conversion.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, do_loop_nest_unswitching(), ENDP, gen_context_recurse, gen_true2(), get_current_module_statement(), module_name(), module_name_to_entity(), module_reorder(), NIL, pips_assert, reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), set_current_module_statement(), and statement_domain.
|
static |
creates a phi-instruction using the entity given in property the generated instruction as the form lRef = PHI(cond,ref1, ref2) all parameters are copied
Definition at line 64 of file if_conversion.c.
References copy_expression(), copy_reference(), get_string_property(), make_assign_instruction(), MakeTernaryCall(), module_name_to_runtime_entity(), and reference_to_expression().
Referenced by process_true_call_stat().
|
static |
converts statement stat into a phi-statement if possible
cond | condition of the potential new phi - statement |
stat | statement to check |
to prevent side effect from further inplace modification
Definition at line 113 of file if_conversion.c.
References AddEntityToCurrentModule(), basic_of_reference(), basic_undefined_p, binary_call_lhs, binary_call_rhs, call_to_statement, copy_call(), copy_expression(), declaration_statement_p(), entity_local_name(), expression_constant_p(), expression_reference(), expression_reference_p(), expression_syntax, expression_undefined, free_expression(), get_current_module_entity(), ifdebug, insert_statement(), instruction_call, make_new_scalar_variable_with_prefix(), make_phi_assign_instruction(), make_reference(), NIL, pips_debug, print_statement(), ref, reference_to_expression(), reference_variable, simd_supported_stat_p(), statement_instruction, statement_undefined, statement_undefined_p, syntax_reference, and update_statement_instruction().
Referenced by process_true_stat().
|
static |
Definition at line 189 of file if_conversion.c.
References FOREACH, free_statement(), instruction_call_p, instruction_sequence_p, instruction_undefined, loop_body, pips_assert, process_true_call_stat(), STATEMENT, statement_block(), statement_block_p, statement_instruction, statement_loop(), statement_loop_p(), statement_split_initializations(), and update_statement_instruction().
Referenced by if_conv_statement().
Definition at line 84 of file if_conversion.c.
References call_arguments, call_function, CAR, CDR, effects_write_at_least_once_p(), ENTITY_ASSIGN_P, EXPRESSION, expression_to_proper_effects(), free(), instruction_call, instruction_call_p, split_update_call(), and statement_instruction.
Referenced by process_true_call_stat().