From 41e53bcd0eccc940a742997f8c7cde0c44138021 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Sun, 5 Jan 2014 00:38:52 -0500 Subject: [PATCH 069/159] FIXME: combine-stack-adj.c --- gcc/combine-stack-adj.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/gcc/combine-stack-adj.c b/gcc/combine-stack-adj.c index 386f2af..3424972 100644 --- a/gcc/combine-stack-adj.c +++ b/gcc/combine-stack-adj.c @@ -79,11 +79,11 @@ struct csa_reflist }; static int stack_memref_p (rtx); -static rtx single_set_for_csa (rtx); +static rtx single_set_for_csa (rtx_base_insn); static void free_csa_reflist (struct csa_reflist *); static struct csa_reflist *record_one_stack_ref (rtx_base_insn, rtx *, struct csa_reflist *); -static int try_apply_stack_adjustment (rtx, struct csa_reflist *, +static int try_apply_stack_adjustment (rtx_base_insn, struct csa_reflist *, HOST_WIDE_INT, HOST_WIDE_INT); static void combine_stack_adjustments_for_block (basic_block); static int record_stack_refs (rtx *, void *); @@ -123,7 +123,7 @@ stack_memref_p (rtx x) tying fp and sp adjustments. */ static rtx -single_set_for_csa (rtx insn) +single_set_for_csa (rtx_base_insn insn) { int i; rtx tmp = single_set (insn); @@ -196,7 +196,7 @@ record_one_stack_ref (rtx_base_insn insn, rtx *ref, on success. */ static int -try_apply_stack_adjustment (rtx insn, struct csa_reflist *reflist, +try_apply_stack_adjustment (rtx_base_insn insn, struct csa_reflist *reflist, HOST_WIDE_INT new_adjust, HOST_WIDE_INT delta) { struct csa_reflist *ml; @@ -299,7 +299,7 @@ record_stack_refs (rtx *xp, void *data) AFTER is true iff LAST follows INSN in the instruction stream. */ static void -maybe_move_args_size_note (rtx last, rtx insn, bool after) +maybe_move_args_size_note (rtx_base_insn last, rtx_base_insn insn, bool after) { rtx note, last_note; @@ -321,35 +321,37 @@ maybe_move_args_size_note (rtx last, rtx insn, bool after) /* Return the next (or previous) active insn within BB. */ -static rtx -prev_active_insn_bb (basic_block bb, rtx insn) +static rtx_base_insn +prev_active_insn_bb (basic_block bb, rtx_base_insn insn) { for (insn = PREV_INSN (insn); insn != PREV_INSN (BB_HEAD (bb)); insn = PREV_INSN (insn)) if (active_insn_p (insn)) return insn; - return NULL_RTX; + return NULL_RTX_BASE_INSN; } -static rtx -next_active_insn_bb (basic_block bb, rtx insn) +static rtx_base_insn +next_active_insn_bb (basic_block bb, rtx_base_insn insn) { for (insn = NEXT_INSN (insn); insn != NEXT_INSN (BB_END (bb)); insn = NEXT_INSN (insn)) if (active_insn_p (insn)) return insn; - return NULL_RTX; + return NULL_RTX_BASE_INSN; } /* If INSN has a REG_ARGS_SIZE note, if possible move it to PREV. Otherwise search for a nearby candidate within BB where we can stick the note. */ static void -force_move_args_size_note (basic_block bb, rtx prev, rtx_base_insn insn) +force_move_args_size_note (basic_block bb, rtx_base_insn prev, + rtx_base_insn insn) { - rtx note, test, next_candidate, prev_candidate; + rtx note; + rtx_base_insn test, next_candidate, prev_candidate; /* If PREV exists, tail-call to the logic in the other function. */ if (prev) @@ -428,7 +430,7 @@ combine_stack_adjustments_for_block (basic_block bb) { HOST_WIDE_INT last_sp_adjust = 0; rtx_base_insn last_sp_set = NULL_RTX_BASE_INSN; - rtx last2_sp_set = NULL_RTX; + rtx_base_insn last2_sp_set = NULL_RTX_BASE_INSN; struct csa_reflist *reflist = NULL; rtx_base_insn insn, next; rtx set; @@ -606,7 +608,7 @@ combine_stack_adjustments_for_block (basic_block bb) } free_csa_reflist (reflist); reflist = NULL; - last2_sp_set = NULL_RTX; + last2_sp_set = NULL_RTX_BASE_INSN; last_sp_set = NULL_RTX_BASE_INSN; last_sp_adjust = 0; } -- 1.7.11.7