#include "config.h"#include "system.h"#include "coretypes.h"#include "tm.h"#include "tree.h"#include "flags.h"#include "rtl.h"#include "tm_p.h"#include "ggc.h"#include "basic-block.h"#include "output.h"#include "expr.h"#include "function.h"#include "diagnostic.h"#include "timevar.h"#include "tree-dump.h"#include "tree-flow.h"#include "tree-pass.h"#include "tree-ssa-propagate.h"#include "langhooks.h"#include "target.h"#include "toplev.h"

Go to the source code of this file.
| enum ccp_lattice_t |
Definition at line 216 of file tree-ssa-ccp.c.
Definition at line 283 of file tree-ssa-ccp.c.
References handled_component_p(), is_gimple_id(), is_gimple_min_invariant(), TREE_CODE, and TREE_OPERAND.
Referenced by get_default_value(), and maybe_fold_stmt_indirect().
Definition at line 841 of file tree-ssa-ccp.c.
References CONSTANT, DECL_BUILT_IN, do_store_ccp, fold_binary(), fold_build1, fold_builtin(), fold_convert(), fold_unary(), FOR_EACH_SSA_TREE_OPERAND, FOR_EACH_SSA_USE_OPERAND, free(), get_callee_fndecl(), get_rhs(), get_value(), get_value_loaded_by(), i, iter, prop_value_d::lattice_val, prop_value_d::mem_ref, NULL, NULL_TREE, NUM_SSA_OPERANDS, operand_equal_p(), replace_uses_in(), SET_USE, SSA_NAME, SSA_OP_USE, stmt_makes_single_load(), tcc_binary, tcc_comparison, tcc_unary, TREE_CODE, TREE_CODE_CLASS, TREE_OPERAND, tree_ssa_useless_type_conversion_1(), TREE_TYPE, use_operand_p, val, prop_value_d::value, XNEWVEC, and ZERO_SSA_OPERANDS.
Definition at line 2197 of file tree-ssa-ccp.c.
References a, BITMAP_ALLOC, bitmap_clear(), BITMAP_FREE, BUILT_IN_MD, callee, DECL_BUILT_IN_CLASS, DECL_FUNCTION_CODE, fold_builtin(), fold_builtin_fputs(), fold_builtin_memory_chk(), fold_builtin_snprintf_chk(), fold_builtin_strcpy(), fold_builtin_strncpy(), fold_builtin_strncpy_chk(), fold_builtin_stxcpy_chk(), fold_convert(), fold_ignored_result(), gcc_unreachable, get_callee_fndecl(), get_maxval_strlen(), i, is_gimple_cast(), is_gimple_val(), memset, NULL, NULL_TREE, result, STRIP_NOPS, TREE_CHAIN, TREE_CODE, TREE_OPERAND, TREE_TYPE, TREE_VALUE, val, and visited.
Definition at line 536 of file tree-ssa-ccp.c.
References bsi_end_p(), bsi_next(), bsi_start(), bsi_stmt(), DONT_SIMULATE_AGAIN, FOR_EACH_BB, FOR_EACH_SSA_TREE_OPERAND, get_value(), i, iter, prop_value_d::lattice_val, likely_value(), memset, num_ssa_names, PHI_ARG_DEF, PHI_CHAIN, phi_nodes(), PHI_NUM_ARGS, PHI_RESULT, SSA_NAME, SSA_OP_ALL_DEFS, TREE_CODE, val, VARYING, and XNEWVEC.
| static void ccp_lattice_meet | ( | prop_value_t * | val1, | |
| prop_value_t * | val2 | |||
| ) | [static] |
Definition at line 654 of file tree-ssa-ccp.c.
References CONSTANT, do_store_ccp, gcc_assert, prop_value_d::lattice_val, prop_value_d::mem_ref, NULL_TREE, operand_equal_p(), simple_cst_equal(), UNDEFINED, UNKNOWN_VAL, prop_value_d::value, and VARYING.
| static enum ssa_prop_result ccp_visit_phi_node | ( | tree | phi | ) | [static] |
Definition at line 718 of file tree-ssa-ccp.c.
References ccp_lattice_meet(), CONSTANT, edge::dest, do_store_ccp, dump_file, dump_flags, dump_lattice_value(), EDGE_EXECUTABLE, edge::flags, fprintf(), gcc_assert, gcc_unreachable, get_value(), i, is_gimple_min_invariant(), prop_value_d::lattice_val, prop_value_d::mem_ref, NULL_TREE, PHI_ARG_DEF, PHI_ARG_EDGE, PHI_NUM_ARGS, PHI_RESULT, print_generic_expr(), set_lattice_value(), edge::src, SSA_PROP_INTERESTING, SSA_PROP_NOT_INTERESTING, SSA_PROP_VARYING, TDF_DETAILS, UNDEFINED, UNINITIALIZED, UNKNOWN_VAL, prop_value_d::value, and VARYING.
| static enum ssa_prop_result ccp_visit_stmt | ( | tree | stmt, | |
| edge * | taken_edge_p, | |||
| tree * | output_p | |||
| ) | [static] |
Definition at line 1348 of file tree-ssa-ccp.c.
References dump_file, dump_flags, FOR_EACH_SSA_TREE_OPERAND, fprintf(), iter, NULL_TREE, print_generic_stmt(), set_lattice_value(), SSA_OP_ALL_DEFS, SSA_PROP_VARYING, TDF_DETAILS, TREE_CODE, VARYING, visit_assignment(), and visit_cond_stmt().
| static tree convert_to_gimple_builtin | ( | block_stmt_iterator * | si_p, | |
| tree | expr | |||
| ) | [static] |
Definition at line 2489 of file tree-ssa-ccp.c.
References annotate_all_with_locus(), bsi_insert_before(), BSI_NEW_STMT, bsi_next(), bsi_stmt(), EXPR_HAS_LOCATION, EXPR_LOCATION, find_new_referenced_vars(), get_initialized_tmp_var(), mark_new_vars_to_rename(), NULL, pop_gimplify_context(), push_gimplify_context(), fold_stmt_r_data::stmt, ti, tmp, tsi_end_p(), tsi_next(), tsi_start(), tsi_stmt(), and tsi_stmt_ptr().
| void debug_lattice_value | ( | prop_value_t | val | ) |
| static unsigned int do_ssa_ccp | ( | void | ) | [static] |
| static unsigned int do_ssa_store_ccp | ( | void | ) | [static] |
| static void dump_lattice_value | ( | FILE * | outf, | |
| const char * | prefix, | |||
| prop_value_t | val | |||
| ) | [static] |
Definition at line 239 of file tree-ssa-ccp.c.
References CONSTANT, dump_flags, fprintf(), gcc_unreachable, prop_value_d::lattice_val, print_generic_expr(), UNDEFINED, UNINITIALIZED, UNKNOWN_VAL, prop_value_d::value, and VARYING.
| static prop_value_t evaluate_stmt | ( | tree | stmt | ) | [static] |
Definition at line 1120 of file tree-ssa-ccp.c.
References ccp_fold(), CONSTANT, fold_const_aggregate_ref(), fold_defer_overflow_warnings(), fold_undefer_overflow_warnings(), get_rhs(), is_constant, is_gimple_min_invariant(), prop_value_d::lattice_val, likely_value(), prop_value_d::mem_ref, NULL_TREE, UNDEFINED, UNKNOWN_VAL, val, prop_value_d::value, and VARYING.
| static unsigned int execute_fold_all_builtins | ( | void | ) | [static] |
Definition at line 2520 of file tree-ssa-ccp.c.
References bsi_end_p(), bsi_next(), bsi_start(), bsi_stmt_ptr(), BUILT_IN_NORMAL, call(), callee, ccp_fold_builtin(), cfg_changed, cleanup_tree_cfg(), convert_to_gimple_builtin(), DECL_BUILT_IN_CLASS, DECL_FUNCTION_CODE, dump_file, dump_flags, FOR_EACH_BB, fprintf(), gcc_assert, get_callee_fndecl(), get_rhs(), i, integer_zero_node, mark_new_vars_to_rename(), maybe_clean_or_replace_eh_stmt(), ok(), print_generic_stmt(), result, set_rhs(), TDF_DETAILS, TREE_CODE, and tree_purge_dead_eh_edges().
Definition at line 1395 of file tree-ssa-ccp.c.
References ccp_finalize(), ccp_initialize(), ccp_visit_phi_node(), ccp_visit_stmt(), do_store_ccp, and ssa_propagate().
Definition at line 979 of file tree-ssa-ccp.c.
References base, gcc_target::binds_local_p, build_int_cst(), c, compare_tree_int(), CONSTANT, CONSTRUCTOR_ELTS, ctor(), DECL_BIT_FIELD, DECL_INITIAL, fold_build1, FOR_EACH_CONSTRUCTOR_ELT, GET_MODE_CLASS, GET_MODE_SIZE, get_value(), HOST_WIDE_INT, idx, prop_value_d::lattice_val, MODE_INT, NULL_TREE, SSA_NAME, targetm, TREE_CODE, tree_int_cst_equal(), TREE_INT_CST_LOW, TREE_OPERAND, TREE_READONLY, TREE_STATIC, TREE_STRING_LENGTH, TREE_STRING_POINTER, TREE_TYPE, TYPE_MODE, and prop_value_d::value.
Referenced by evaluate_stmt().
Definition at line 2362 of file tree-ssa-ccp.c.
References build_function_call_expr(), callee, ccp_fold_builtin(), changed, fold_stmt_r_data::changed_p, DECL_BUILT_IN, DECL_P, fold(), fold_stmt_r(), get_callee_fndecl(), get_rhs(), implicit_built_in_decls, fold_stmt_r_data::inside_addr_expr_p, NULL, NULL_TREE, OBJ_TYPE_REF_OBJECT, result, set_rhs(), fold_stmt_r_data::stmt, STRIP_USELESS_TYPE_CONVERSION, TREE_CODE, TREE_OPERAND, TREE_TYPE, and walk_tree().
Referenced by lbv_to_gcc_expression(), lle_to_gcc_expression(), optimize_stmt(), remove_useless_stmts_1(), replace_immediate_uses(), and substitute_and_fold().
Definition at line 2455 of file tree-ssa-ccp.c.
References changed, fold_stmt_r_data::changed_p, fold(), fold_stmt_r(), gcc_assert, get_rhs(), fold_stmt_r_data::inside_addr_expr_p, NULL, set_rhs(), fold_stmt_r_data::stmt, STRIP_USELESS_TYPE_CONVERSION, and walk_tree().
Referenced by forward_propagate_addr_expr_1(), forward_propagate_addr_into_variable_array_index(), propagate_rhs_into_lhs(), replace_reciprocal(), and replace_uses_by().
Definition at line 1970 of file tree-ssa-ccp.c.
References fold_stmt_r_data::changed_p, COMPARISON_CLASS_P, DECL_FIELD_CONTEXT, find_compatible_field(), fold_binary(), fold_defer_overflow_warnings(), fold_read_from_constant_string(), fold_stmt_r(), fold_undefer_overflow_warnings(), fold_stmt_r_data::inside_addr_expr_p, integer_zero_node, is_gimple_condexpr(), maybe_fold_stmt_addition(), maybe_fold_stmt_indirect(), maybe_fold_tmr(), NULL, NULL_TREE, recompute_tree_invariant_for_addr_expr(), fold_stmt_r_data::stmt, TREE_CODE, TREE_OPERAND, TREE_TYPE, TYPE_MAIN_VARIANT, and walk_tree().
Definition at line 1413 of file tree-ssa-ccp.c.
Definition at line 1448 of file tree-ssa-ccp.c.
| static prop_value_t get_default_value | ( | tree | var | ) | [static] |
Definition at line 327 of file tree-ssa-ccp.c.
References ccp_decl_initial_min_invariant(), CONSTANT, DECL_INITIAL, do_store_ccp, IS_EMPTY_STMT, is_gimple_min_invariant(), is_gimple_reg(), prop_value_d::lattice_val, prop_value_d::mem_ref, MTAG_P, NULL_TREE, SSA_NAME_DEF_STMT, SSA_NAME_VALUE, SSA_NAME_VAR, sym, TREE_CODE, TREE_READONLY, TREE_STATIC, UNDEFINED, UNINITIALIZED, UNKNOWN_VAL, val, prop_value_d::value, and VARYING.
Definition at line 2098 of file tree-ssa-ccp.c.
References bitmap_bit_p(), bitmap_set_bit(), c_strlen(), i, PHI_ARG_DEF, PHI_NUM_ARGS, PHI_RESULT, simple_cst_equal(), SSA_NAME, SSA_NAME_DEF_STMT, SSA_NAME_VERSION, STRIP_NOPS, TREE_CODE, tree_int_cst_lt(), tree_int_cst_sgn(), TREE_OPERAND, and val.
Referenced by ccp_fold_builtin().
| static prop_value_t* get_value | ( | tree | var, | |
| bool | may_use_default_p | |||
| ) | [static] |
Definition at line 400 of file tree-ssa-ccp.c.
References get_default_value(), prop_value_d::lattice_val, SSA_NAME_VERSION, UNINITIALIZED, and val.
| static ccp_lattice_t likely_value | ( | tree | stmt | ) | [static] |
Definition at line 469 of file tree-ssa-ccp.c.
References CONSTANT, do_store_ccp, FOR_EACH_SSA_TREE_OPERAND, gcc_assert, get_call_expr_in(), get_rhs(), get_value(), is_gimple_min_invariant(), iter, prop_value_d::lattice_val, NULL_TREE, SSA_OP_ALL_VIRTUALS, SSA_OP_USE, SSA_OP_VUSE, stmt_ann(), TREE_CODE, UNDEFINED, UNKNOWN_VAL, val, VARYING, and ZERO_SSA_OPERANDS.
Definition at line 1540 of file tree-ssa-ccp.c.
References array_ref_low_bound(), build4, build_int_cst_wide(), div_and_round_double(), fold_convert(), HOST_WIDE_INT, idx, int_const_binop(), integer_zero_node, integer_zerop(), NULL_TREE, size_int, TREE_CODE, TREE_INT_CST_HIGH, TREE_INT_CST_LOW, tree_low_cst(), TREE_OPERAND, TREE_TYPE, TYPE_ALIGN, TYPE_ALIGN_UNIT, TYPE_DOMAIN, TYPE_MIN_VALUE, and TYPE_SIZE_UNIT.
| static tree maybe_fold_offset_to_component_ref | ( | tree | record_type, | |
| tree | base, | |||
| tree | offset, | |||
| tree | orig_type, | |||
| bool | base_is_ptr | |||
| ) | [static] |
Definition at line 1636 of file tree-ssa-ccp.c.
References AGGREGATE_TYPE_P, build1, build3, byte_position(), DECL_BIT_FIELD, DECL_FIELD_CONTEXT, DECL_SIZE_UNIT, f, field_type(), int_const_binop(), maybe_fold_offset_to_array_ref(), maybe_fold_offset_to_component_ref(), NULL_TREE, TREE_CHAIN, TREE_CODE, tree_int_cst_compare(), tree_int_cst_lt(), TREE_TYPE, and TYPE_FIELDS.
Definition at line 1853 of file tree-ssa-ccp.c.
References build1, fold_convert(), fold_unary(), int_const_binop(), integer_zerop(), INTEGRAL_TYPE_P, maybe_fold_offset_to_array_ref(), maybe_fold_offset_to_component_ref(), NULL, NULL_TREE, POINTER_TYPE_P, sizetype, TREE_CODE, tree_int_cst_lt(), TREE_OPERAND, TREE_TYPE, TYPE_DOMAIN, TYPE_MIN_VALUE, TYPE_SIZE_UNIT, and TYPE_UNSIGNED.
Definition at line 1741 of file tree-ssa-ccp.c.
References ccp_decl_initial_min_invariant(), DECL_INITIAL, fold(), fold_read_from_constant_string(), int_const_binop(), integer_zero_node, integer_zerop(), maybe_fold_offset_to_array_ref(), maybe_fold_offset_to_component_ref(), NULL_TREE, POINTER_TYPE_P, STRIP_NOPS, STRIP_TYPE_NOPS, TREE_CODE, TREE_OPERAND, and TREE_TYPE.
| static bool set_lattice_value | ( | tree | var, | |
| prop_value_t | new_val | |||
| ) | [static] |
Definition at line 414 of file tree-ssa-ccp.c.
References CONSTANT, do_store_ccp, dump_file, dump_flags, dump_lattice_value(), fprintf(), gcc_assert, get_value(), prop_value_d::lattice_val, prop_value_d::mem_ref, TDF_DETAILS, UNDEFINED, UNKNOWN_VAL, and prop_value_d::value.
| static enum ssa_prop_result visit_assignment | ( | tree | stmt, | |
| tree * | output_p | |||
| ) | [static] |
Definition at line 1180 of file tree-ssa-ccp.c.
References changed, CONSTANT, DECL_BIT_FIELD, do_store_ccp, evaluate_stmt(), first_vdef(), fold_unary(), FOR_EACH_SSA_TREE_OPERAND, get_value(), get_value_loaded_by(), i, is_gimple_min_invariant(), prop_value_d::lattice_val, prop_value_d::mem_ref, NULL, NULL_TREE, operand_equal_p(), set_lattice_value(), SSA_NAME, SSA_OP_VIRTUAL_DEFS, SSA_PROP_INTERESTING, SSA_PROP_NOT_INTERESTING, SSA_PROP_VARYING, stmt_makes_single_load(), stmt_makes_single_store(), TREE_CODE, TREE_OPERAND, TREE_TYPE, UNDEFINED, UNKNOWN_VAL, val, prop_value_d::value, VARYING, and widen_bitfield().
| static enum ssa_prop_result visit_cond_stmt | ( | tree | stmt, | |
| edge * | taken_edge_p | |||
| ) | [static] |
Definition at line 1318 of file tree-ssa-ccp.c.
References bb_for_stmt(), evaluate_stmt(), find_taken_edge(), SSA_PROP_INTERESTING, SSA_PROP_VARYING, val, and prop_value_d::value.
Definition at line 1482 of file tree-ssa-ccp.c.
References build2, build_int_cst(), DECL_SIZE, DECL_UNSIGNED, fold(), fold_build2, gcc_assert, HOST_BITS_PER_WIDE_INT, host_integerp(), HOST_WIDE_INT, i, NULL_TREE, tree_low_cst(), TREE_TYPE, and TYPE_SIZE.
Referenced by record_equivalences_from_stmt(), and visit_assignment().
prop_value_t* const_val [static] |
Definition at line 231 of file tree-ssa-ccp.c.
Referenced by build_const_val(), canon_condition(), canonicalize_condition(), Constant_Operand0(), Constant_Operand1(), Convert_Le_With_Floor_2Lt(), Expand_Float32_Const(), Expand_Float64_Const(), Expand_LONGLONG_Const(), ipcp_propagate_const(), ipcp_replace_map_create(), lower_bit_field_id(), Remove_Floor_From_One_Sided_Cond(), Sh_LWN_CreateDivceil(), Sh_LWN_CreateDivfloor(), Simd_Vectorize_Induction_Variables(), Simplify_Cond_With_Div_Floor(), Simplify_If_Conditional(), and Toggle_Eq_To_Remove_One().
bool do_store_ccp [static] |
Definition at line 234 of file tree-ssa-ccp.c.
Referenced by ccp_fold(), ccp_lattice_meet(), ccp_visit_phi_node(), execute_ssa_ccp(), get_default_value(), likely_value(), set_lattice_value(), and visit_assignment().
Initial value:
{
"ccp",
gate_ccp,
do_ssa_ccp,
NULL,
NULL,
0,
TV_TREE_CCP,
PROP_cfg | PROP_ssa | PROP_alias,
0,
PROP_smt_usage,
0,
TODO_cleanup_cfg | TODO_dump_func | TODO_update_ssa
| TODO_ggc_collect | TODO_verify_ssa
| TODO_verify_stmts | TODO_update_smt_usage,
0
}
Definition at line 1419 of file tree-ssa-ccp.c.
Referenced by init_optimization_passes(), and init_tree_optimization_passes().
Initial value:
{
"fab",
NULL,
execute_fold_all_builtins,
NULL,
NULL,
0,
0,
PROP_cfg | PROP_ssa | PROP_alias,
0,
0,
0,
TODO_dump_func
| TODO_verify_ssa
| TODO_update_ssa,
0
}
Definition at line 2615 of file tree-ssa-ccp.c.
Referenced by init_optimization_passes(), and init_tree_optimization_passes().
Initial value:
{
"store_ccp",
gate_store_ccp,
do_ssa_store_ccp,
NULL,
NULL,
0,
TV_TREE_STORE_CCP,
PROP_cfg | PROP_ssa | PROP_alias,
0,
PROP_smt_usage,
0,
TODO_dump_func | TODO_update_ssa
| TODO_ggc_collect | TODO_verify_ssa
| TODO_cleanup_cfg
| TODO_verify_stmts | TODO_update_smt_usage,
0
}
Definition at line 1457 of file tree-ssa-ccp.c.
Referenced by init_optimization_passes().
1.5.6