PIPS
|
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "effects.h"
#include "resources.h"
#include "properties.h"
#include "misc.h"
#include "ri-util.h"
#include "effects-util.h"
#include "pipsdbm.h"
#include "sac.h"
#include "patterns.h"
#include <errno.h>
Go to the source code of this file.
Variables | |
static matchTree | patterns_tree = NULL |
static list | finalArgType = NIL |
static list | curArgType = NIL |
|
static |
Definition at line 273 of file treematch.c.
References gen_find_opcodeClass().
Referenced by insert_pattern().
nbArgs | bArgs |
opcodes | pcodes |
Definition at line 267 of file treematch.c.
References make_opcodeClass().
no such branch -> create a new branch
tokens | okens |
args | rgs |
Definition at line 278 of file treematch.c.
References CAR, CDR, CONS, get_opcodeClass(), insert_tree_branch(), INT, make_patternx(), make_tree(), matchTree_patterns, matchTree_undefined, NIL, opcodeClass_undefined, patterns_tree, PATTERNX, pips_user_warning, and select_tree_branch().
Definition at line 115 of file treematch.c.
References extend_matchTreeSons(), and matchTree_sons.
Referenced by insert_pattern().
|
static |
Definition at line 108 of file treematch.c.
References make_matchTree(), make_matchTreeSons(), and NIL.
Referenced by insert_pattern(), and simd_treematcher().
Warning: list of arguments is built in reversed order (the head is in fact the last argument)
no match
no match
Definition at line 183 of file treematch.c.
References call_arguments, call_constant_p, call_function, EXPRESSION, FOREACH, get_operator_id(), match_expression(), matchTree_undefined, matchTree_undefined_p, select_tree_branch(), and top_level_entity_p().
Referenced by match_expression(), and match_statement().
|
static |
field call should be taken care of as references
right now we have matched the rhs of the field, now bring back the lhs !
unexpected token !! -> no match
Definition at line 129 of file treematch.c.
References basic_of_reference(), basic_type_size(), basic_undefined, binary_call_rhs, call_constant_p, call_function, CONS, CONSTANT_TOK, ENTITY_FIELD_P, EXPRESSION, expression_syntax, free_basic(), get_int_property(), is_syntax_call, is_syntax_range, is_syntax_reference, match_call(), matchTree_undefined, matchTree_undefined_p, REFCAR, REFERENCE_TOK, select_tree_branch(), syntax_call, syntax_reference, and syntax_tag.
Referenced by match_call().
return a list of matching statements
find the matching patterns
build the matches
Definition at line 237 of file treematch.c.
References CONS, FOREACH, gen_free_list(), make_match(), MATCH, match_call(), matches, matchTree_patterns, matchTree_undefined_p, merge_lists(), NIL, patterns_tree, PATTERNX, patternx_args, patternx_class, statement_call(), and statement_call_p().
Referenced by compute_parallelism_factor(), and init_statement_matches_map().
merge the 2 lists.
Warning: list gets reversed.
merge according to the format specifier list
append remaining arguments, if any
Definition at line 204 of file treematch.c.
References CAR, CDR, CONS, EXPRESSION, FOREACH, int_to_expression(), NIL, PATTERNARG, patternArg_dynamic_p, patternArg_static, and pips_user_warning.
Referenced by match_statement().
void reset_simd_treematch | ( | void | ) |
Definition at line 52 of file treematch.c.
References patterns_tree, and pips_assert.
Referenced by simd_treematcher(), simd_unroll_as_needed(), and simdizer().
Definition at line 120 of file treematch.c.
References apply_matchTreeSons(), bound_matchTreeSons_p(), matchTree_sons, and matchTree_undefined.
Referenced by insert_pattern(), match_call(), and match_expression().
void set_simd_treematch | ( | matchTree | t | ) |
Definition at line 46 of file treematch.c.
References patterns_tree, and pips_assert.
Referenced by simd_treematcher(), simd_unroll_as_needed(), and simdizer().
bool simd_check_argType | ( | void | ) |
Definition at line 87 of file treematch.c.
References BASIC, basic_equal_p(), CAR, CDR, curArgType, ENDP, finalArgType, FOREACH, gen_full_free_list(), and NIL.
Referenced by extract_matching_statements().
void simd_fill_curArgType | ( | statement | stat | ) |
stat | tat |
Definition at line 82 of file treematch.c.
References curArgType, simd_fill_curArgType_call(), and statement_call().
Referenced by extract_matching_statements().
Definition at line 69 of file treematch.c.
References BASIC, basic_of_expression(), call_arguments, CONS, EXPRESSION, FOREACH, and NIL.
Referenced by simd_fill_curArgType(), and simd_fill_finalArgType().
void simd_fill_finalArgType | ( | statement | stat | ) |
stat | tat |
Definition at line 77 of file treematch.c.
References finalArgType, simd_fill_curArgType_call(), and statement_call().
Referenced by simdize_simple_statements_pass2().
void simd_reset_finalArgType | ( | void | ) |
Definition at line 61 of file treematch.c.
References curArgType, finalArgType, gen_free_list(), and NIL.
Referenced by simdize_simple_statements_pass2().
create a new tree match
fill it
put it in pipsdbm
clean up
module_name | odule_name |
Definition at line 310 of file treematch.c.
References DB_PUT_MEMORY_RESOURCE, fopen_config(), make_tree(), module_name(), patterns_yyin, patterns_yyparse(), pips_assert, reset_simd_treematch(), sac_lineno, and set_simd_treematch().
Definition at line 59 of file treematch.c.
Referenced by simd_check_argType(), simd_fill_curArgType(), and simd_reset_finalArgType().
Definition at line 58 of file treematch.c.
Referenced by simd_check_argType(), simd_fill_finalArgType(), and simd_reset_finalArgType().
|
static |
Definition at line 45 of file treematch.c.
Referenced by insert_pattern(), match_statement(), reset_simd_treematch(), and set_simd_treematch().