??? We should be able to re-use this when we insert the statement
to compute it. */
name = make_temp_ssa_name (get_expr_type (e), gimple_build_nop (), "pretmp");
- VN_INFO (name)->value_id = value_id;
- VN_INFO (name)->valnum = valnum ? valnum : name;
+ vn_ssa_aux_t vn_info = VN_INFO (name);
+ vn_info->value_id = value_id;
+ vn_info->valnum = valnum ? valnum : name;
/* ??? For now mark this SSA name for release by VN. */
- VN_INFO (name)->needs_insertion = true;
+ vn_info->needs_insertion = true;
add_to_value (value_id, get_or_alloc_expr_for_name (name));
if (dump_file && (dump_flags & TDF_DETAILS))
{
if (forcedname != folded)
{
- VN_INFO (forcedname)->valnum = forcedname;
- VN_INFO (forcedname)->value_id = get_next_value_id ();
+ vn_ssa_aux_t vn_info = VN_INFO (forcedname);
+ vn_info->valnum = forcedname;
+ vn_info->value_id = get_next_value_id ();
nameexpr = get_or_alloc_expr_for_name (forcedname);
- add_to_value (VN_INFO (forcedname)->value_id, nameexpr);
+ add_to_value (vn_info->value_id, nameexpr);
bitmap_value_replace_in_set (NEW_SETS (block), nameexpr);
bitmap_value_replace_in_set (AVAIL_OUT (block), nameexpr);
}
the expression may have been represented. There is no harm in replacing
here. */
value_id = get_expr_value_id (expr);
- VN_INFO (name)->value_id = value_id;
- VN_INFO (name)->valnum = vn_valnum_from_value_id (value_id);
- if (VN_INFO (name)->valnum == NULL_TREE)
- VN_INFO (name)->valnum = name;
- gcc_assert (VN_INFO (name)->valnum != NULL_TREE);
+ vn_ssa_aux_t vn_info = VN_INFO (name);
+ vn_info->value_id = value_id;
+ vn_info->valnum = vn_valnum_from_value_id (value_id);
+ if (vn_info->valnum == NULL_TREE)
+ vn_info->valnum = name;
+ gcc_assert (vn_info->valnum != NULL_TREE);
nameexpr = get_or_alloc_expr_for_name (name);
add_to_value (value_id, nameexpr);
if (NEW_SETS (block))
temp = make_temp_ssa_name (type, NULL, "prephitmp");
phi = create_phi_node (temp, block);
- VN_INFO (temp)->value_id = val;
- VN_INFO (temp)->valnum = vn_valnum_from_value_id (val);
- if (VN_INFO (temp)->valnum == NULL_TREE)
- VN_INFO (temp)->valnum = temp;
+ vn_ssa_aux_t vn_info = VN_INFO (temp);
+ vn_info->value_id = val;
+ vn_info->valnum = vn_valnum_from_value_id (val);
+ if (vn_info->valnum == NULL_TREE)
+ vn_info->valnum = temp;
bitmap_set_bit (inserted_exprs, SSA_NAME_VERSION (temp));
FOR_EACH_EDGE (pred, ei, block->preds)
{
gimple_stmt_iterator gsi = gsi_after_labels (block);
gsi_insert_before (&gsi, assign, GSI_NEW_STMT);
- VN_INFO (temp)->value_id = val;
- VN_INFO (temp)->valnum = vn_valnum_from_value_id (val);
- if (VN_INFO (temp)->valnum == NULL_TREE)
- VN_INFO (temp)->valnum = temp;
+ vn_ssa_aux_t vn_info = VN_INFO (temp);
+ vn_info->value_id = val;
+ vn_info->valnum = vn_valnum_from_value_id (val);
+ if (vn_info->valnum == NULL_TREE)
+ vn_info->valnum = temp;
bitmap_set_bit (inserted_exprs, SSA_NAME_VERSION (temp));
pre_expr newe = get_or_alloc_expr_for_name (temp);
add_to_value (val, newe);
else
{
gsi_insert_seq_before (gsi, stmts, GSI_SAME_STMT);
- VN_INFO (res)->valnum = val;
- VN_INFO (res)->visited = true;
+ vn_ssa_aux_t vn_info = VN_INFO (res);
+ vn_info->valnum = val;
+ vn_info->visited = true;
}
insertions++;
it has an expression it wants to use as replacement,
insert that. */
tree val = VN_INFO (lhs)->valnum;
+ vn_ssa_aux_t vn_info;
if (val != VN_TOP
&& TREE_CODE (val) == SSA_NAME
- && VN_INFO (val)->needs_insertion
- && VN_INFO (val)->expr != NULL
+ && (vn_info = VN_INFO (val), true)
+ && vn_info->needs_insertion
+ && vn_info->expr != NULL
&& (sprime = eliminate_insert (b, gsi, val)) != NULL_TREE)
eliminate_push_avail (b, sprime);
}
only process new ones. */
if (! has_VN_INFO (def))
{
- VN_INFO (def)->valnum = def;
- VN_INFO (def)->visited = true;
+ vn_ssa_aux_t vn_info = VN_INFO (def);
+ vn_info->valnum = def;
+ vn_info->visited = true;
}
if (gsi_stmt (prev) == gsi_stmt (*gsi))
break;