From dd1286fb158d55badf7feee4637c8ee21123f890 Mon Sep 17 00:00:00 2001 From: tbsaunde Date: Tue, 16 Sep 2014 01:23:42 +0000 Subject: Replace INSN_DELETED_P with rtx_insn member functions gcc/ * cfgrtl.c, combine.c, config/arc/arc.c, config/mcore/mcore.c, config/rs6000/rs6000.c, config/sh/sh.c, cprop.c, dwarf2out.c, emit-rtl.c, final.c, function.c, gcse.c, jump.c, reg-stack.c, reload1.c, reorg.c, resource.c, sel-sched-ir.c: Replace INSN_DELETED_P macro with statically checked member functions. * rtl.h (rtx_insn::deleted): New method. (rtx_insn::set_deleted): Likewise. (rtx_insn::set_undeleted): Likewise. (INSN_DELETED_P): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215282 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/jump.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'gcc/jump.c') diff --git a/gcc/jump.c b/gcc/jump.c index cad44d8a043..8e85f5f191b 100644 --- a/gcc/jump.c +++ b/gcc/jump.c @@ -291,7 +291,7 @@ mark_all_labels (rtx_insn *f) handled by other optimizers using better algorithms. */ FOR_BB_INSNS (bb, insn) { - gcc_assert (! INSN_DELETED_P (insn)); + gcc_assert (! insn->deleted ()); if (NONDEBUG_INSN_P (insn)) mark_jump_label (PATTERN (insn), insn, 0); } @@ -312,7 +312,7 @@ mark_all_labels (rtx_insn *f) rtx_insn *prev_nonjump_insn = NULL; for (insn = f; insn; insn = NEXT_INSN (insn)) { - if (INSN_DELETED_P (insn)) + if (insn->deleted ()) ; else if (LABEL_P (insn)) prev_nonjump_insn = NULL; @@ -1156,7 +1156,7 @@ mark_jump_label_1 (rtx x, rtx_insn *insn, bool in_mem, bool is_target) break; LABEL_REF_LABEL (x) = label; - if (! insn || ! INSN_DELETED_P (insn)) + if (! insn || ! insn->deleted ()) ++LABEL_NUSES (label); if (insn) @@ -1187,7 +1187,7 @@ mark_jump_label_1 (rtx x, rtx_insn *insn, bool in_mem, bool is_target) ADDR_DIFF_VEC. Don't set the JUMP_LABEL of a vector. */ case ADDR_VEC: case ADDR_DIFF_VEC: - if (! INSN_DELETED_P (insn)) + if (! insn->deleted ()) { int eltnum = code == ADDR_DIFF_VEC ? 1 : 0; @@ -1254,11 +1254,11 @@ delete_related_insns (rtx uncast_insn) rtx note; rtx_insn *next = NEXT_INSN (insn), *prev = PREV_INSN (insn); - while (next && INSN_DELETED_P (next)) + while (next && next->deleted ()) next = NEXT_INSN (next); /* This insn is already deleted => return first following nondeleted. */ - if (INSN_DELETED_P (insn)) + if (insn->deleted ()) return next; delete_insn (insn); @@ -1279,7 +1279,7 @@ delete_related_insns (rtx uncast_insn) { rtx_insn *p; - for (p = next && INSN_DELETED_P (next) ? NEXT_INSN (next) : next; + for (p = next && next->deleted () ? NEXT_INSN (next) : next; p && NOTE_P (p); p = NEXT_INSN (p)) if (NOTE_KIND (p) == NOTE_INSN_CALL_ARG_LOCATION) @@ -1323,7 +1323,7 @@ delete_related_insns (rtx uncast_insn) for (i = 0; i < len; i++) if (LABEL_NUSES (XEXP (RTVEC_ELT (labels, i), 0)) == 0) delete_related_insns (XEXP (RTVEC_ELT (labels, i), 0)); - while (next && INSN_DELETED_P (next)) + while (next && next->deleted ()) next = NEXT_INSN (next); return next; } @@ -1339,7 +1339,7 @@ delete_related_insns (rtx uncast_insn) if (LABEL_NUSES (XEXP (note, 0)) == 0) delete_related_insns (XEXP (note, 0)); - while (prev && (INSN_DELETED_P (prev) || NOTE_P (prev))) + while (prev && (prev->deleted () || NOTE_P (prev))) prev = PREV_INSN (prev); /* If INSN was a label and a dispatch table follows it, @@ -1362,7 +1362,7 @@ delete_related_insns (rtx uncast_insn) if (code == NOTE) next = NEXT_INSN (next); /* Keep going past other deleted labels to delete what follows. */ - else if (code == CODE_LABEL && INSN_DELETED_P (next)) + else if (code == CODE_LABEL && next->deleted ()) next = NEXT_INSN (next); /* Keep the (use (insn))s created by dbr_schedule, which needs them in order to track liveness relative to a previous @@ -1386,7 +1386,7 @@ delete_related_insns (rtx uncast_insn) but I see no clean and sure alternative way to find the first insn after INSN that is not now deleted. I hope this works. */ - while (next && INSN_DELETED_P (next)) + while (next && next->deleted ()) next = NEXT_INSN (next); return next; } @@ -1408,7 +1408,7 @@ delete_for_peephole (rtx_insn *from, rtx_insn *to) if (!NOTE_P (insn)) { - INSN_DELETED_P (insn) = 1; + insn->set_deleted(); /* Patch this insn out of the chain. */ /* We don't do this all at once, because we -- cgit v1.2.1