GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "tree.h"
#include "gimple.h"
#include "tree-pass.h"
#include "ssa.h"
#include "gimple-pretty-print.h"
#include "fold-const.h"
#include "tree-eh.h"
#include "gimplify.h"
#include "gimple-iterator.h"
#include "stor-layout.h"
#include "tree-ssa-loop.h"
#include "tree-cfg.h"
#include "tree-ssa-dce.h"
Data Structures | |
struct | phiprop_d |
Functions | |
static tree | phiprop_insert_phi (basic_block bb, gphi *phi, gimple *use_stmt, struct phiprop_d *phivn, size_t n, bitmap dce_ssa_names) |
static bool | chk_uses (tree, tree *idx, void *data) |
static bool | propagate_with_phi (basic_block bb, gphi *vphi, gphi *phi, struct phiprop_d *phivn, size_t n, bitmap dce_ssa_names) |
gimple_opt_pass * | make_pass_phiprop (gcc::context *ctxt) |
Verify if *idx is available at *DATA.
References CDI_DOMINATORS, dominated_by_p(), gimple_bb(), SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, and TREE_CODE.
Referenced by propagate_with_phi().
gimple_opt_pass * make_pass_phiprop | ( | gcc::context * | ctxt | ) |
|
static |
Insert a new phi node for the dereference of PHI at basic_block BB with the virtual operands from USE_STMT.
References add_phi_arg(), bitmap_set_bit, create_phi_node(), dump_file, dump_flags, fold_build2, FOR_EACH_EDGE, gcc_assert, get_virtual_phi(), gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_rhs_code(), gimple_build_assign(), gimple_location(), gimple_phi_arg_location_from_edge(), gimple_set_location(), gimple_set_vuse(), gimple_vuse(), gsi_insert_on_edge(), is_gimple_assign(), is_gimple_min_invariant(), make_ssa_name(), NULL, NULL_TREE, PHI_ARG_DEF_FROM_EDGE, PHI_RESULT, basic_block_def::preds, print_generic_expr(), print_gimple_stmt(), SSA_NAME_DEF_STMT, SSA_NAME_VERSION, TDF_DETAILS, TREE_CODE, TREE_OPERAND, TREE_TYPE, unshare_expr(), update_stmt(), value, and phiprop_d::value.
Referenced by propagate_with_phi().
|
static |
Propagate between the phi node arguments of PHI in BB and phi result users. For now this matches # p_2 = PHI <&x, &y> <Lx>:; p_3 = p_2; z_2 = *p_3; and converts it to # z_2 = PHI <x, y> <Lx>:; Returns true if a transformation was done and edge insertions need to be committed. Global data PHIVN and N is used to track past transformation results. VPHI is the virtual PHI node in BB if there is one. We need to be especially careful here with aliasing issues as we are moving memory reads.
References calculate_dominance_info(), CDI_DOMINATORS, CDI_POST_DOMINATORS, cfun, changed, chk_uses(), dom_info_available_p(), dominated_by_p(), FOR_EACH_IMM_USE_FAST, FOR_EACH_IMM_USE_STMT, for_each_index(), FOR_EACH_PHI_ARG, get_immediate_dominator(), gimple_assign_lhs(), gimple_assign_lhs_ptr(), gimple_assign_rhs1(), gimple_assign_rhs_code(), gimple_assign_set_rhs1(), gimple_assign_single_p(), gimple_assign_ssa_name_copy_p(), gimple_bb(), gimple_has_volatile_ops(), gimple_phi_arg_def(), gimple_phi_result(), gimple_vdef(), gimple_vuse(), gsi_for_stmt(), gsi_remove(), i, integer_zerop(), is_gimple_assign(), is_gimple_reg_type(), NULL_TREE, phi_arg_index_from_use(), PHI_RESULT, phiprop_insert_phi(), POINTER_TYPE_P, ref_maybe_used_by_stmt_p(), single_imm_use(), SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, SSA_NAME_VERSION, SSA_OP_USE, stmt_can_throw_internal(), TREE_CODE, TREE_OPERAND, TREE_TYPE, TYPE_MODE, types_compatible_p(), ui, unlink_stmt_vdef(), update_stmt(), USE_FROM_PTR, USE_STMT, value, phiprop_d::value, and phiprop_d::vuse.