|
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"#include "cfgloop.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, tree other_vuse) |
| static bool | chk_uses (tree, tree *idx, void *data) |
| static tree | can_handle_load (gimple *load_stmt, basic_block bb, gphi *vphi, tree up_vuse, bool aggregate) |
| 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) |
|
static |
Check if we can move the loads from LOAD_STMT. This is when the virtual use is the same as the one active at the start of BB which we know either from its virtual PHI def (VPHI) or from the common incoming VUSE (up_vuse). If neither is present make sure the def stmt of the virtual use is in a different basic block dominating BB. When the def is an edge-inserted one we know it dominates us. Returns the vuse to use for the inserting. NULL_TREE is returned when we can't do the insert.
References ao_ref_init(), CDI_DOMINATORS, dominated_by_p(), gcc_checking_assert, gimple_assign_rhs1(), gimple_bb(), gimple_clobber_p(), gimple_phi_result(), gimple_vuse(), NULL_TREE, SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, and stmt_may_clobber_ref_p_1().
Referenced by propagate_with_phi().
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. The vuse for the load will be set to OTHER_VUSE unless there is virtual op phi for BB.
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(), 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(), 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(), can_handle_load(), CDI_DOMINATORS, CDI_POST_DOMINATORS, cfun, changed, chk_uses(), dom_info_available_p(), dominated_by_p(), basic_block_def::flags, flow_loop_nested_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_vdef(), gimple_vuse(), gsi_for_stmt(), gsi_remove(), i, integer_zerop(), is_gimple_assign(), is_gimple_reg_type(), basic_block_def::loop_father, 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_could_trap_p(), TREE_OPERAND, TREE_TYPE, TYPE_MODE, types_compatible_p(), ui, unlink_stmt_vdef(), update_stmt(), USE_FROM_PTR, USE_STMT, phiprop_d::value, and phiprop_d::vuse.