iteration), returns the phi node. Otherwise, NULL_TREE is returned. ROOT
is the root of the current chain. */
-static gimple
+static gphi *
find_looparound_phi (struct loop *loop, dref ref, dref root)
{
tree name, init, init_ref;
- gimple phi = NULL, init_stmt;
+ gphi *phi = NULL;
+ gimple init_stmt;
edge latch = loop_latch_edge (loop);
struct data_reference init_dr;
- gimple_stmt_iterator psi;
+ gphi_iterator psi;
if (is_gimple_assign (ref->stmt))
{
for (psi = gsi_start_phis (loop->header); !gsi_end_p (psi); gsi_next (&psi))
{
- phi = gsi_stmt (psi);
+ phi = psi.phi ();
if (PHI_ARG_DEF_FROM_EDGE (phi, latch) == name)
break;
}
/* Adds a reference for the looparound copy of REF in PHI to CHAIN. */
static void
-insert_looparound_copy (chain_p chain, dref ref, gimple phi)
+insert_looparound_copy (chain_p chain, dref ref, gphi *phi)
{
dref nw = XCNEW (struct dref_d), aref;
unsigned i;
{
unsigned i;
dref ref, root = get_chain_root (chain);
- gimple phi;
+ gphi *phi;
FOR_EACH_VEC_ELT (chain->refs, i, ref)
{
replace_ref_with (gimple stmt, tree new_tree, bool set, bool in_lhs)
{
tree val;
- gimple new_stmt;
+ gassign *new_stmt;
gimple_stmt_iterator bsi, psi;
if (gimple_code (stmt) == GIMPLE_PHI)
dref root = get_chain_root (chain);
bool reuse_first = !chain->has_max_use_after;
tree ref, init, var, next;
- gimple phi;
+ gphi *phi;
gimple_seq stmts;
edge entry = loop_preheader_edge (loop), latch = loop_latch_edge (loop);
unsigned i;
tree ref = DR_REF (root->ref), init, var, next;
gimple_seq stmts;
- gimple phi;
+ gphi *phi;
edge entry = loop_preheader_edge (loop), latch = loop_latch_edge (loop);
/* Find the initializer for the variable, and check that it cannot
}
else
{
- gimple init_stmt = gimple_build_assign (var, init);
+ gassign *init_stmt = gimple_build_assign (var, init);
gsi_insert_on_edge_immediate (entry, init_stmt);
}
}
eliminate_temp_copies (struct loop *loop, bitmap tmp_vars)
{
edge e;
- gimple phi, stmt;
+ gphi *phi;
+ gimple stmt;
tree name, use, var;
- gimple_stmt_iterator psi;
+ gphi_iterator psi;
e = loop_latch_edge (loop);
for (psi = gsi_start_phis (loop->header); !gsi_end_p (psi); gsi_next (&psi))
{
- phi = gsi_stmt (psi);
+ phi = psi.phi ();
name = PHI_RESULT (phi);
var = SSA_NAME_VAR (name);
if (!var || !bitmap_bit_p (tmp_vars, DECL_UID (var)))
reassociate_to_the_same_stmt (tree name1, tree name2)
{
gimple stmt1, stmt2, root1, root2, s1, s2;
- gimple new_stmt, tmp_stmt;
+ gassign *new_stmt, *tmp_stmt;
tree new_name, tmp_name, var, r1, r2;
unsigned dist1, dist2;
enum tree_code code;