diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2007-09-01 17:18:03 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2007-09-01 17:18:03 +0000 |
commit | 755478019ac28552396592d63b2e1ffeeaa24206 (patch) | |
tree | 219b94e14e50ec61d3797a74d100f7b56eb8d994 /gcc/tree-cfg.c | |
parent | b65e51a81fd877211cacb75bc07b56dcb45444b4 (diff) | |
download | gcc-755478019ac28552396592d63b2e1ffeeaa24206.zip gcc-755478019ac28552396592d63b2e1ffeeaa24206.tar.gz gcc-755478019ac28552396592d63b2e1ffeeaa24206.tar.bz2 |
c-common.c (const_strip_array_types): Delete.
* c-common.c (const_strip_array_types): Delete.
* c-common.h (const_strip_array_types): Likewise.
* emit-rtl.c (const_next_insn, const_previous_insn,
const_next_nonnote_insn, const_prev_nonnote_insn,
const_next_real_insn, const_prev_real_insn,
const_next_active_insn, const_prev_active_insn, const_next_label,
const_prev_label): Delete.
* gimple-low.c (block_may_fallthru): Use expr_last.
* jump.c (reversed_comparison_code_parts): Use prev_nonnote_insn.
* rtl.h (const_previous_insn, const_next_insn,
const_prev_nonnote_insn, const_next_nonnote_insn,
const_prev_real_insn, const_next_real_insn,
const_prev_active_insn, const_next_active_insn, const_prev_label,
const_next_label): Delete.
* rtlanal.c (keep_with_call_p): Use next_nonnote_insn.
* system.h (CONST_CAST): Update comment.
* tree-cfg.c (tree_can_merge_blocks_p): Use last_stmt.
(const_first_stmt, const_last_stmt): Delete.
(tree_block_ends_with_condjump_p): Use last_stmt.
* tree-flow.h (const_first_stmt, const_last_stmt): Delete.
* tree-iterator.c (const_expr_first, const_expr_last,
const_expr_only): Delete.
* tree.c (const_lookup_attribute): Likewise.
(attribute_list_contained): Use lookup_attribute.
* tree.h (const_lookup_attribute, const_expr_first,
const_expr_last, const_expr_only): Delete.
cp:
* tree.c (pod_type_p, zero_init_p): Use strip_array_types.
* typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
Likewise.
From-SVN: r128014
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r-- | gcc/tree-cfg.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index e70b440..947b8de 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -1158,7 +1158,9 @@ tree_can_merge_blocks_p (const_basic_block a, const_basic_block b) /* If A ends by a statement causing exceptions or something similar, we cannot merge the blocks. */ - stmt = const_last_stmt (a); + /* This CONST_CAST is okay because last_stmt doesn't modify its + argument and the return value is assign to a const_tree. */ + stmt = last_stmt ((basic_block)CONST_CAST(a)); if (stmt && stmt_ends_bb_p (stmt)) return false; @@ -2592,13 +2594,6 @@ first_stmt (basic_block bb) return !bsi_end_p (i) ? bsi_stmt (i) : NULL_TREE; } -const_tree -const_first_stmt (const_basic_block bb) -{ - const_block_stmt_iterator i = cbsi_start (bb); - return !cbsi_end_p (i) ? cbsi_stmt (i) : NULL_TREE; -} - /* Return the last statement in basic block BB. */ tree @@ -2608,13 +2603,6 @@ last_stmt (basic_block bb) return !bsi_end_p (b) ? bsi_stmt (b) : NULL_TREE; } -const_tree -const_last_stmt (const_basic_block bb) -{ - const_block_stmt_iterator b = cbsi_last (bb); - return !cbsi_end_p (b) ? cbsi_stmt (b) : NULL_TREE; -} - /* Return the last statement of an otherwise empty block. Return NULL if the block is totally empty, or if it contains more than one statement. */ @@ -5932,7 +5920,9 @@ tree_block_ends_with_call_p (const_basic_block bb) static bool tree_block_ends_with_condjump_p (const_basic_block bb) { - const_tree stmt = const_last_stmt (bb); + /* This CONST_CAST is okay because last_stmt doesn't modify its + argument and the return value is not modified. */ + const_tree stmt = last_stmt ((basic_block)CONST_CAST(bb)); return (stmt && TREE_CODE (stmt) == COND_EXPR); } |