aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-sccvn.c
diff options
context:
space:
mode:
authorKenneth Zadeck <zadeck@naturalbridge.com>2008-05-16 09:38:13 -0400
committerDiego Novillo <dnovillo@gcc.gnu.org>2008-05-16 09:38:13 -0400
commit908ff6a3eba98c61f299483ba60011f7bec26e34 (patch)
treec4014ffdd31e6929c2b0896e695bc7a7780f9040 /gcc/tree-ssa-sccvn.c
parent9defb1fe37d0ff78a3a8f4729e4f51a957ec902e (diff)
downloadgcc-908ff6a3eba98c61f299483ba60011f7bec26e34.zip
gcc-908ff6a3eba98c61f299483ba60011f7bec26e34.tar.gz
gcc-908ff6a3eba98c61f299483ba60011f7bec26e34.tar.bz2
tree-ssa-dse (max_stmt_uid): Removed.
2008-05-16 Kenneth Zadeck <zadeck@naturalbridge.com> * tree-ssa-dse (max_stmt_uid): Removed. (get_stmt_uid, dse_possible_dead_store_p, dse_optimize_stmt, tree_ssa_dse): Encapsulate all uses of stmt_ann->uid. * tree-ssa-sccvn.c (compare_ops, init_scc_vn): Ditto. * function.h (cfun.last_stmt_uid): New field. * tree-flow-inline.h (set_gimple_stmt_uid, gimple_stmt_uid, gimple_stmt_max_uid, set_gimple_stmt_max_uid, inc_gimple_stmt_max_uid): New functions. * tree-dfa.c (renumber_gimple_stmt_uids): New function. (create_stmt_ann): Initialize the ann->uid field. * tree-ssa-pre.c (compute_avail): Encapsulate the stmt_ann->uid with new calls. * tree-flow.h (renumber_gimple_stmt_uids): New function. From-SVN: r135419
Diffstat (limited to 'gcc/tree-ssa-sccvn.c')
-rw-r--r--gcc/tree-ssa-sccvn.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index e8eb437..0b20a4e 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -1890,7 +1890,7 @@ compare_ops (const void *pa, const void *pb)
return -1;
else if (TREE_CODE (opstmtb) == PHI_NODE)
return 1;
- return stmt_ann (opstmta)->uid - stmt_ann (opstmtb)->uid;
+ return gimple_stmt_uid (opstmta) - gimple_stmt_uid (opstmtb);
}
return rpo_numbers[bba->index] - rpo_numbers[bbb->index];
}
@@ -2089,8 +2089,6 @@ init_scc_vn (void)
size_t i;
int j;
int *rpo_numbers_temp;
- basic_block bb;
- size_t id = 0;
calculate_dominance_info (CDI_DOMINATORS);
sccstack = NULL;
@@ -2131,15 +2129,7 @@ init_scc_vn (void)
}
}
- FOR_ALL_BB (bb)
- {
- block_stmt_iterator bsi;
- for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
- {
- tree stmt = bsi_stmt (bsi);
- stmt_ann (stmt)->uid = id++;
- }
- }
+ renumber_gimple_stmt_uids ();
/* Create the valid and optimistic value numbering tables. */
valid_info = XCNEW (struct vn_tables_s);