PIPS
|
#include <stdlib.h>
#include <stdio.h>
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "effects.h"
#include "database.h"
#include "ri-util.h"
#include "effects-util.h"
#include "pipsdbm.h"
#include "control.h"
#include "callgraph.h"
#include "misc.h"
#include "resources.h"
#include "properties.h"
#include "expressions.h"
Go to the source code of this file.
Functions | |
static bool | set_pattern () |
retrieves the expression used as a pattern based on the one - statement function given in a property and sets static variables accordingly More... | |
static void | substitute_expression_walker (expression e, expression *pi) |
void | substitute_expression (void *in, expression pattern, expression into) |
expression_substitution.c More... | |
static bool | replace_expression_similar_to_pattern (expression e) |
static bool | replace_instruction_similar_to_pattern (instruction i) |
bool | expression_substitution (const char *module_name) |
simple pass that performs substitution of expression by module call More... | |
Variables | |
static expression | pattern = expression_undefined |
static const char * | pattern_module_name = string_undefined |
bool expression_substitution | ( | const char * | module_name | ) |
simple pass that performs substitution of expression by module call
prelude
search pattern
validate
ostlude
module_name | odule_name |
Definition at line 157 of file expression_substitution.c.
References compute_callees(), convert_to_standard_operators(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, expression_domain, gen_false(), gen_multi_recurse(), gen_null(), get_current_module_statement(), instruction_domain, module_name(), module_name_to_entity(), module_reorder(), range_domain, reference_domain, replace_expression_similar_to_pattern(), replace_instruction_similar_to_pattern(), reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), set_current_module_statement(), and set_pattern().
|
static |
recover pattern's arguments
fill the arguments
fix the expression field
Definition at line 101 of file expression_substitution.c.
References code_declarations, CONS, copy_expression(), ENTITY, entity_formal_p(), entity_initial, entity_name, EXPRESSION, expression_normalized, expression_similar_get_context_p(), expression_syntax, FindEntity(), FOREACH, free_syntax(), gen_nreverse(), hash_get(), hash_table_free(), HASH_UNDEFINED_VALUE, make_call(), make_syntax_call(), NIL, normalized_undefined, pattern_module_name, pips_assert, TOP_LEVEL_MODULE_NAME, and value_code.
Referenced by expression_substitution(), and replace_instruction_similar_to_pattern().
|
static |
replacement successfull
Definition at line 139 of file expression_substitution.c.
References call_to_expression(), exp, expression_call(), expression_syntax, free_expression(), instruction_call, instruction_call_p, replace_expression_similar_to_pattern(), and syntax_undefined.
Referenced by expression_substitution().
|
static |
retrieves the expression used as a pattern based on the one - statement function given in a property and sets static variables accordingly
Definition at line 58 of file expression_substitution.c.
References call_arguments, CAR, convert_to_standard_operators(), db_get_memory_resource(), ENDP, EXPRESSION, get_string_property(), instruction_block, instruction_block_p, instruction_call, pattern_module_name, pips_user_warning, return_instruction_p(), STATEMENT, statement_instruction, and string_undefined_p.
Referenced by expression_substitution().
void substitute_expression | ( | void * | in, |
expression | pattern, | ||
expression | into | ||
) |
in | n |
pattern | attern |
into | nto |
Definition at line 94 of file expression_substitution.c.
References expression_domain, gen_context_recurse, gen_true2(), pattern, and substitute_expression_walker().
Referenced by do_terapix_argument_handler().
|
static |
Definition at line 88 of file expression_substitution.c.
References copy_syntax(), expression_syntax, same_expression_p(), and update_expression_syntax().
Referenced by substitute_expression().
|
static |
Definition at line 50 of file expression_substitution.c.
Referenced by substitute_expression().
|
static |
Definition at line 51 of file expression_substitution.c.
Referenced by replace_expression_similar_to_pattern(), and set_pattern().