Commit 229cc11f by Kazu Hirata Committed by Kazu Hirata

tree-cfg.c (stmt_starts_bb_p): Clean up by replacing code with LABEL_EXPR.

	* tree-cfg.c (stmt_starts_bb_p): Clean up by replacing code
	with LABEL_EXPR.

From-SVN: r95831
parent 9550206b
2005-03-03 Kazu Hirata <kazu@cs.umass.edu>
* tree-cfg.c (stmt_starts_bb_p): Clean up by replacing code
with LABEL_EXPR.
2005-03-03 Roger Sayle <roger@eyesopen.com> 2005-03-03 Roger Sayle <roger@eyesopen.com>
Andrew Pinski <pinskia@physics.uc.edu> Andrew Pinski <pinskia@physics.uc.edu>
......
...@@ -2650,8 +2650,6 @@ simple_goto_p (tree expr) ...@@ -2650,8 +2650,6 @@ simple_goto_p (tree expr)
static inline bool static inline bool
stmt_starts_bb_p (tree t, tree prev_t) stmt_starts_bb_p (tree t, tree prev_t)
{ {
enum tree_code code;
if (t == NULL_TREE) if (t == NULL_TREE)
return false; return false;
...@@ -2659,16 +2657,14 @@ stmt_starts_bb_p (tree t, tree prev_t) ...@@ -2659,16 +2657,14 @@ stmt_starts_bb_p (tree t, tree prev_t)
statement wasn't a label of the same type. This prevents the statement wasn't a label of the same type. This prevents the
creation of consecutive blocks that have nothing but a single creation of consecutive blocks that have nothing but a single
label. */ label. */
code = TREE_CODE (t); if (TREE_CODE (t) == LABEL_EXPR)
if (code == LABEL_EXPR)
{ {
/* Nonlocal and computed GOTO targets always start a new block. */ /* Nonlocal and computed GOTO targets always start a new block. */
if (code == LABEL_EXPR if (DECL_NONLOCAL (LABEL_EXPR_LABEL (t))
&& (DECL_NONLOCAL (LABEL_EXPR_LABEL (t)) || FORCED_LABEL (LABEL_EXPR_LABEL (t)))
|| FORCED_LABEL (LABEL_EXPR_LABEL (t))))
return true; return true;
if (prev_t && TREE_CODE (prev_t) == code) if (prev_t && TREE_CODE (prev_t) == LABEL_EXPR)
{ {
if (DECL_NONLOCAL (LABEL_EXPR_LABEL (prev_t))) if (DECL_NONLOCAL (LABEL_EXPR_LABEL (prev_t)))
return true; return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment