aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-flow-inline.h
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-flow-inline.h
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-flow-inline.h')
-rw-r--r--gcc/tree-flow-inline.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h
index 9e8edc6..a41ee9a 100644
--- a/gcc/tree-flow-inline.h
+++ b/gcc/tree-flow-inline.h
@@ -278,6 +278,41 @@ get_stmt_ann (tree stmt)
return (ann) ? ann : create_stmt_ann (stmt);
}
+/* Set the uid of all non phi function statements. */
+static inline void
+set_gimple_stmt_uid (tree stmt, unsigned int uid)
+{
+ get_stmt_ann (stmt)->uid = uid;
+}
+
+/* Get the uid of all non phi function statements. */
+static inline unsigned int
+gimple_stmt_uid (tree stmt)
+{
+ return get_stmt_ann (stmt)->uid;
+}
+
+/* Get the number of the next statement uid to be allocated. */
+static inline unsigned int
+gimple_stmt_max_uid (struct function *fn)
+{
+ return fn->last_stmt_uid;
+}
+
+/* Set the number of the next statement uid to be allocated. */
+static inline void
+set_gimple_stmt_max_uid (struct function *fn, unsigned int maxid)
+{
+ fn->last_stmt_uid = maxid;
+}
+
+/* Set the number of the next statement uid to be allocated. */
+static inline unsigned int
+inc_gimple_stmt_max_uid (struct function *fn)
+{
+ return fn->last_stmt_uid++;
+}
+
/* Return the annotation type for annotation ANN. */
static inline enum tree_ann_type
ann_type (tree_ann_t ann)