summaryrefslogtreecommitdiff
path: root/gcc/tree-flow-inline.h
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-02 20:58:39 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-02 20:58:39 +0000
commit5d93b6ec3e3b11d61a7e92ed06ef480032f6ba60 (patch)
tree8186ca6684edf68798355acd2929c8c432d3b55b /gcc/tree-flow-inline.h
parentcdcf74519bb47571b6a3e7fb8f1482d12f76961a (diff)
downloadgcc-5d93b6ec3e3b11d61a7e92ed06ef480032f6ba60.tar.gz
PR tree-optimization/19578
* tree-flow.h (modified_noreturn_calls): Declare. (noreturn_call_p): Declare. * tree-flow-inline.h (noreturn_call_p): New function. (modify_stmt): Add modified noreturn calls to modified_noreturn_calls. * tree-cfg.c (modified_noreturn_calls): New variable. (cleanup_control_flow): Use noreturn_call_p. Split basic blocks that contain a mid-block noreturn call. * tree-ssa.c (delete_tree_ssa): Clear modified_noreturn_calls. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94610 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-flow-inline.h')
-rw-r--r--gcc/tree-flow-inline.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h
index ef6888882d1..70450537698 100644
--- a/gcc/tree-flow-inline.h
+++ b/gcc/tree-flow-inline.h
@@ -131,6 +131,14 @@ get_filename (tree expr)
return "???";
}
+/* Return true if T is a noreturn call. */
+static inline bool
+noreturn_call_p (tree t)
+{
+ tree call = get_call_expr_in (t);
+ return call != 0 && (call_expr_flags (call) & ECF_NORETURN) != 0;
+}
+
/* Mark statement T as modified. */
static inline void
modify_stmt (tree t)
@@ -138,6 +146,8 @@ modify_stmt (tree t)
stmt_ann_t ann = stmt_ann (t);
if (ann == NULL)
ann = create_stmt_ann (t);
+ else if (noreturn_call_p (t))
+ VEC_safe_push (tree, modified_noreturn_calls, t);
ann->modified = 1;
}