GCC Middle and Back End API Reference
tree-ssa-phiprop.c File Reference

Data Structures

struct  phiprop_d

Functions

static bool phivn_valid_p ()
static tree phiprop_insert_phi (basic_block bb, gimple phi, gimple use_stmt, struct phiprop_d *phivn, size_t n)
static bool propagate_with_phi (basic_block bb, gimple phi, struct phiprop_d *phivn, size_t n)
static unsigned int tree_ssa_phiprop ()
static bool gate_phiprop ()
gimple_opt_passmake_pass_phiprop ()

Function Documentation

static bool gate_phiprop ( )
static
gimple_opt_pass* make_pass_phiprop ( )
static bool phivn_valid_p ( )
static
Verify if the value recorded for NAME in PHIVN is still valid at
   the start of basic block BB.   

References CDI_DOMINATORS, dominated_by_p(), gimple_vdef(), and phiprop_d::vuse.

Referenced by propagate_with_phi().

static bool propagate_with_phi ( basic_block  bb,
gimple  phi,
struct phiprop_d phivn,
size_t  n 
)
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.  We need to be especially careful here
   with aliasing issues as we are moving memory reads.   

References CDI_DOMINATORS, dominated_by_p(), gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_rhs_code(), gimple_assign_set_rhs1(), gimple_assign_single_p(), gimple_assign_ssa_name_copy_p(), gimple_vuse(), gsi_for_stmt(), gsi_remove(), integer_zerop(), is_gimple_assign(), is_gimple_reg_type(), phiprop_insert_phi(), phivn_valid_p(), single_imm_use(), stmt_can_throw_internal(), types_compatible_p(), ui, update_stmt(), phiprop_d::value, and phiprop_d::vuse.

Referenced by tree_ssa_phiprop().