From 64012ffc72cddfd79609793eb3b280f5f8d384c6 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Wed, 8 Jan 2014 10:51:07 -0500 Subject: [PATCH 091/159] FIXME: dce.c --- gcc/dce.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/gcc/dce.c b/gcc/dce.c index 42c2c27..560d9fa 100644 --- a/gcc/dce.c +++ b/gcc/dce.c @@ -60,7 +60,7 @@ static sbitmap marked; static bitmap_obstack dce_blocks_bitmap_obstack; static bitmap_obstack dce_tmp_bitmap_obstack; -static bool find_call_stack_args (rtx, bool, bool, bitmap); +static bool find_call_stack_args (rtx_call_insn, bool, bool, bitmap); /* A subroutine for which BODY is part of the instruction being tested; either the top-level pattern, or an element of a PARALLEL. The @@ -92,7 +92,7 @@ deletable_insn_p_1 (rtx body) the DCE pass. */ static bool -deletable_insn_p (rtx insn, bool fast, bitmap arg_stores) +deletable_insn_p (rtx_base_insn insn, bool fast, bitmap arg_stores) { rtx body, x; int i; @@ -109,7 +109,8 @@ deletable_insn_p (rtx insn, bool fast, bitmap arg_stores) infinite loop. */ && (RTL_CONST_OR_PURE_CALL_P (insn) && !RTL_LOOPING_CONST_OR_PURE_CALL_P (insn))) - return find_call_stack_args (insn, false, fast, arg_stores); + return find_call_stack_args (insn->as_an_rtx_call_insn (), false, fast, + arg_stores); /* Don't delete jumps, notes and the like. */ if (!NONJUMP_INSN_P (insn)) @@ -190,7 +191,8 @@ mark_insn (rtx insn, bool fast) && !SIBLING_CALL_P (insn) && (RTL_CONST_OR_PURE_CALL_P (insn) && !RTL_LOOPING_CONST_OR_PURE_CALL_P (insn))) - find_call_stack_args (insn, true, fast, NULL); + find_call_stack_args (insn->as_an_rtx_call_insn (), true, fast, + NULL); } } @@ -220,7 +222,7 @@ mark_nonreg_stores_2 (rtx dest, const_rtx pattern, void *data) /* Mark INSN if BODY stores to a non-register destination. */ static void -mark_nonreg_stores (rtx body, rtx insn, bool fast) +mark_nonreg_stores (rtx body, rtx_base_insn insn, bool fast) { if (fast) note_stores (body, mark_nonreg_stores_1, insn); @@ -257,10 +259,11 @@ check_argument_store (rtx mem, HOST_WIDE_INT off, HOST_WIDE_INT min_sp_off, going to be marked called again with DO_MARK true. */ static bool -find_call_stack_args (rtx call_insn, bool do_mark, bool fast, +find_call_stack_args (rtx_call_insn call_insn, bool do_mark, bool fast, bitmap arg_stores) { - rtx p, insn, prev_insn; + rtx p; + rtx_base_insn insn, prev_insn; bool ret; HOST_WIDE_INT min_sp_off, max_sp_off; bitmap sp_bytes; @@ -396,7 +399,7 @@ find_call_stack_args (rtx call_insn, bool do_mark, bool fast, HOST_WIDE_INT off; if (insn == BB_HEAD (BLOCK_FOR_INSN (call_insn))) - prev_insn = NULL_RTX; + prev_insn = NULL_RTX_BASE_INSN; else prev_insn = PREV_INSN (insn); -- 1.7.11.7