warn_uninit (enum opt_code wc, tree t, tree expr, tree var,
const char *gmsgid, void *data, location_t phiarg_loc)
{
- gimple context = (gimple) data;
+ gimple *context = (gimple *) data;
location_t location, cfun_loc;
expanded_location xloc, floc;
single_succ (ENTRY_BLOCK_PTR_FOR_FN (cfun)), bb);
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
{
- gimple stmt = gsi_stmt (gsi);
+ gimple *stmt = gsi_stmt (gsi);
use_operand_p use_p;
ssa_op_iter op_iter;
tree use;
redundant. Can be enhanced to be more general. */
static bool
-can_skip_redundant_opnd (tree opnd, gimple phi)
+can_skip_redundant_opnd (tree opnd, gimple *phi)
{
- gimple op_def;
+ gimple *op_def;
tree phi_def;
int i, n;
pred_chain t_chain = vNULL;
for (j = 0; j < one_cd_chain.length (); j++)
{
- gimple cond_stmt;
+ gimple *cond_stmt;
gimple_stmt_iterator gsi;
basic_block guard_bb;
pred_info one_pred;
static void
collect_phi_def_edges (gphi *phi, basic_block cd_root,
vec<edge> *edges,
- hash_set<gimple> *visited_phis)
+ hash_set<gimple *> *visited_phis)
{
size_t i, n;
edge opnd_edge;
}
else
{
- gimple def = SSA_NAME_DEF_STMT (opnd);
+ gimple *def = SSA_NAME_DEF_STMT (opnd);
if (gimple_code (def) == GIMPLE_PHI
&& dominated_by_p (CDI_DOMINATORS,
if (!cd_root)
return false;
- hash_set<gimple> visited_phis;
+ hash_set<gimple *> visited_phis;
collect_phi_def_edges (phi, cd_root, &def_edges, &visited_phis);
n = def_edges.length ();
/* Dumps the predicates (PREDS) for USESTMT. */
static void
-dump_predicates (gimple usestmt, pred_chain_union preds,
+dump_predicates (gimple *usestmt, pred_chain_union preds,
const char* msg)
{
size_t i, j;
/* Forward declaration. */
static bool
-is_use_properly_guarded (gimple use_stmt,
+is_use_properly_guarded (gimple *use_stmt,
basic_block use_bb,
gphi *phi,
unsigned uninit_opnds,
if (is_value_included_in (flag_arg, boundary_cst, cmp_code))
{
tree opnd;
- gimple opnd_def;
+ gimple *opnd_def;
/* Now that we know that this undefined edge is not
pruned. If the operand is defined by another phi,
hash_set<gphi *> *visited_phis)
{
unsigned int i, n;
- gimple flag_def = 0;
+ gimple *flag_def = 0;
tree boundary_cst = 0;
enum tree_code cmp_code;
bool swap_cond = false;
if (!is_neq_zero_form_p (*a_pred))
continue;
- gimple def_stmt = SSA_NAME_DEF_STMT (a_pred->pred_lhs);
+ gimple *def_stmt = SSA_NAME_DEF_STMT (a_pred->pred_lhs);
if (gimple_code (def_stmt) != GIMPLE_ASSIGN)
continue;
if (gimple_assign_rhs_code (def_stmt) == BIT_IOR_EXPR)
size_t i, j, n;
bool simplified = false;
pred_chain_union s_preds = vNULL;
- gimple def_stmt;
+ gimple *def_stmt;
n = preds->length ();
for (i = 0; i < n; i++)
/* This function simplifies predicates in PREDS. */
static void
-simplify_preds (pred_chain_union *preds, gimple use_or_def, bool is_use)
+simplify_preds (pred_chain_union *preds, gimple *use_or_def, bool is_use)
{
size_t i, n;
bool changed = false;
CMP_ASSIGN with comparison rhs. */
static pred_info
-get_pred_info_from_cmp (gimple cmp_assign)
+get_pred_info_from_cmp (gimple *cmp_assign)
{
pred_info n_pred;
n_pred.pred_lhs = gimple_assign_rhs1 (cmp_assign);
will be updated to that value. */
static bool
-is_degenerated_phi (gimple phi, pred_info *pred_p)
+is_degenerated_phi (gimple *phi, pred_info *pred_p)
{
int i, n;
tree op0;
- gimple def0;
+ gimple *def0;
pred_info pred0;
n = gimple_phi_num_args (phi);
for (i = 1; i < n; ++i)
{
- gimple def;
+ gimple *def;
pred_info pred;
tree op = gimple_phi_arg_def (phi, i);
return;
}
- gimple def_stmt = SSA_NAME_DEF_STMT (pred.pred_lhs);
+ gimple *def_stmt = SSA_NAME_DEF_STMT (pred.pred_lhs);
if (gimple_code (def_stmt) == GIMPLE_PHI
&& is_degenerated_phi (def_stmt, &pred))
return;
}
- gimple def_stmt = SSA_NAME_DEF_STMT (pred.pred_lhs);
+ gimple *def_stmt = SSA_NAME_DEF_STMT (pred.pred_lhs);
if (gimple_code (def_stmt) == GIMPLE_ASSIGN)
and_or_code = gimple_assign_rhs_code (def_stmt);
if (and_or_code != BIT_IOR_EXPR
/* Normalize predicate chains PREDS and returns the normalized one. */
static pred_chain_union
-normalize_preds (pred_chain_union preds, gimple use_or_def, bool is_use)
+normalize_preds (pred_chain_union preds, gimple *use_or_def, bool is_use)
{
pred_chain_union norm_preds = vNULL;
size_t n = preds.length ();
VISITED_PHIS is a pointer set of phis being visited. */
static bool
-is_use_properly_guarded (gimple use_stmt,
+is_use_properly_guarded (gimple *use_stmt,
basic_block use_bb,
gphi *phi,
unsigned uninit_opnds,
function. ADDED_TO_WORKLIST is the pointer set tracking
if the new phi is already in the worklist. */
-static gimple
+static gimple *
find_uninit_use (gphi *phi, unsigned uninit_opnds,
vec<gphi *> *worklist,
hash_set<gphi *> *added_to_worklist)
{
tree phi_result;
use_operand_p use_p;
- gimple use_stmt;
+ gimple *use_stmt;
imm_use_iterator iter;
pred_chain_union def_preds = vNULL;
- gimple ret = NULL;
+ gimple *ret = NULL;
phi_result = gimple_phi_result (phi);
hash_set<gphi *> *added_to_worklist)
{
unsigned uninit_opnds;
- gimple uninit_use_stmt = 0;
+ gimple *uninit_use_stmt = 0;
tree uninit_op;
int phiarg_index;
location_t loc;