#include "tree-inline.h"
#include "varray.h"
#include "timevar.h"
-#include "tree-alias-common.h"
#include "hashtab.h"
#include "tree-dump.h"
#include "tree-ssa-live.h"
edge e;
tree phi, var, tmp;
int x, y;
+ edge_iterator ei;
/* Code cannot be inserted on abnormal edges. Look for all abnormal
edges, and coalesce any PHI results with their arguments across
that edge. */
FOR_EACH_BB (bb)
- for (e = bb->succ; e; e = e->succ_next)
+ FOR_EACH_EDGE (e, ei, bb->succs)
if (e->dest != EXIT_BLOCK_PTR && e->flags & EDGE_ABNORMAL)
for (phi = phi_nodes (e->dest); phi; phi = PHI_CHAIN (phi))
{
internal_error ("SSA corruption");
}
#else
- gcc_assert (phi_ssa_name (tmp));
+ gcc_assert (phi_ssa_name_p (tmp));
#endif
y = var_to_partition (map, tmp);
gcc_assert (x != NO_PARTITION);
if (version_ref_count (map, def) != 1)
return false;
- /* Assignments to variables assigned to hard registers are not
- replaceable. */
- if (DECL_HARD_REGISTER (SSA_NAME_VAR (def)))
- return false;
-
/* There must be no V_MAY_DEFS. */
if (NUM_V_MAY_DEFS (V_MAY_DEF_OPS (ann)) != 0)
return false;
table = new_temp_expr_table (map);
FOR_EACH_BB (bb)
{
+ bitmap_iterator bi;
+
find_replaceable_in_bb (table, bb);
- EXECUTE_IF_SET_IN_BITMAP ((table->partition_in_use), 0, i,
+ EXECUTE_IF_SET_IN_BITMAP ((table->partition_in_use), 0, i, bi)
{
kill_expr (table, i, false);
- });
+ }
}
ret = free_temp_expr_table (table);
{
tree t = *tp;
- if (TYPE_P (t) || DECL_P (t))
+ if (IS_TYPE_OR_DECL_P (t))
*walk_subtrees = 0;
else if (TREE_CODE (t) == ARRAY_REF || TREE_CODE (t) == ARRAY_RANGE_REF)
{
phi = phi_nodes (bb);
if (phi)
{
- for (e = bb->pred; e; e = e->pred_next)
+ edge_iterator ei;
+ FOR_EACH_EDGE (e, ei, bb->preds)
eliminate_phi (e, phi_arg_from_edge (phi, e), g);
}
}