aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-flow-inline.h
diff options
context:
space:
mode:
authorSebastian Pop <pop@cri.ensmp.fr>2004-07-12 21:31:16 +0200
committerSebastian Pop <spop@gcc.gnu.org>2004-07-12 19:31:16 +0000
commit9baba81be56e46677dbe5c558368fd023d45c2a9 (patch)
tree3c802a37a69533f1e5eac9a5138ce105450e9411 /gcc/tree-flow-inline.h
parent98ca843cfb0e860bf72ad2eafc34e255f633f26c (diff)
downloadgcc-9baba81be56e46677dbe5c558368fd023d45c2a9.zip
gcc-9baba81be56e46677dbe5c558368fd023d45c2a9.tar.gz
gcc-9baba81be56e46677dbe5c558368fd023d45c2a9.tar.bz2
cfgloop.h (struct loop): Add nb_iterations field.
* cfgloop.h (struct loop): Add nb_iterations field. (current_loops): Declare. * tree-chrec.c (chrec_not_analyzed_yet, chrec_dont_know, chrec_known, count_ev_in_wider_type, chrec_contains_symbols_defined_in_loop): Remove the temporary hooks. * tree-flow-inline.h (loop_containing_stmt): New function. * tree-scalar-evolution.c: Add implementation. * tree-scalar-evolution.h: Add declarations. From-SVN: r84573
Diffstat (limited to 'gcc/tree-flow-inline.h')
-rw-r--r--gcc/tree-flow-inline.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h
index e68e63e..b6f81bc 100644
--- a/gcc/tree-flow-inline.h
+++ b/gcc/tree-flow-inline.h
@@ -633,6 +633,18 @@ bsi_stmt_ptr (block_stmt_iterator i)
return tsi_stmt_ptr (i.tsi);
}
+/* Returns the loop of the statement STMT. */
+
+static inline struct loop *
+loop_containing_stmt (tree stmt)
+{
+ basic_block bb = bb_for_stmt (stmt);
+ if (!bb)
+ return NULL;
+
+ return bb->loop_father;
+}
+
/* Return true if VAR may be aliased. */
static inline bool
may_be_aliased (tree var)