aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorTrevor Saunders <tsaunders@mozilla.com>2014-09-16 01:23:42 +0000
committerTrevor Saunders <tbsaunde@gcc.gnu.org>2014-09-16 01:23:42 +0000
commit4654c0cf4a05c0af9ff3d0969382d175f5b32e7e (patch)
treeafa1d791e1a24bd21d9981f0b69fd768831df3cd /gcc/config
parente73de8f37af47e6568c145d41f0490338b942288 (diff)
downloadgcc-4654c0cf4a05c0af9ff3d0969382d175f5b32e7e.zip
gcc-4654c0cf4a05c0af9ff3d0969382d175f5b32e7e.tar.gz
gcc-4654c0cf4a05c0af9ff3d0969382d175f5b32e7e.tar.bz2
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. From-SVN: r215282
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/arc/arc.c8
-rw-r--r--gcc/config/h8300/h8300.md2
-rw-r--r--gcc/config/mcore/mcore.c2
-rw-r--r--gcc/config/mips/mips.c4
-rw-r--r--gcc/config/rs6000/rs6000.c2
-rw-r--r--gcc/config/sh/sh.c12
-rw-r--r--gcc/config/v850/v850.c11
7 files changed, 22 insertions, 19 deletions
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index 3e808ea..bae1a05 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -2823,7 +2823,7 @@ arc_print_operand (FILE *file, rtx x, int code)
rtx_insn *delay = final_sequence->insn (1);
/* For TARGET_PAD_RETURN we might have grabbed the delay insn. */
- if (INSN_DELETED_P (delay))
+ if (delay->deleted ())
return;
if (JUMP_P (jump) && INSN_ANNULLED_BRANCH_P (jump))
fputs (INSN_FROM_TARGET_P (delay) ? ".d"
@@ -3748,7 +3748,7 @@ arc_ccfsm_record_condition (rtx cond, bool reverse, rtx_insn *jump,
{
rtx insn = XVECEXP (PATTERN (seq_insn), 0, 1);
- if (!INSN_DELETED_P (insn)
+ if (!as_a<rtx_insn *> (insn)->deleted ()
&& INSN_ANNULLED_BRANCH_P (jump)
&& (TARGET_AT_DBR_CONDEXEC || INSN_FROM_TARGET_P (insn)))
{
@@ -8627,7 +8627,7 @@ arc_unalign_branch_p (rtx branch)
return 0;
/* Do not do this if we have a filled delay slot. */
if (get_attr_delay_slot_filled (branch) == DELAY_SLOT_FILLED_YES
- && !INSN_DELETED_P (NEXT_INSN (branch)))
+ && !NEXT_INSN (branch)->deleted ())
return 0;
note = find_reg_note (branch, REG_BR_PROB, 0);
return (!note
@@ -8709,7 +8709,7 @@ arc_pad_return (void)
rtx save_pred = current_insn_predicate;
final_scan_insn (prev, asm_out_file, optimize, 1, NULL);
cfun->machine->force_short_suffix = -1;
- INSN_DELETED_P (prev) = 1;
+ prev->set_deleted ();
current_output_insn = insn;
current_insn_predicate = save_pred;
}
diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md
index cb10203..babb37b 100644
--- a/gcc/config/h8300/h8300.md
+++ b/gcc/config/h8300/h8300.md
@@ -2411,7 +2411,7 @@
final_sequence = 0;
final_scan_insn (seq->insn (1), asm_out_file, optimize, 1, & seen);
final_scan_insn (seq->insn (0), asm_out_file, optimize, 1, & seen);
- INSN_DELETED_P (seq->insn (1)) = 1;
+ seq->insn (1)->set_deleted ();
return "";
}
}
diff --git a/gcc/config/mcore/mcore.c b/gcc/config/mcore/mcore.c
index aad0f1a..e2208b7 100644
--- a/gcc/config/mcore/mcore.c
+++ b/gcc/config/mcore/mcore.c
@@ -2536,7 +2536,7 @@ conditionalize_block (rtx_insn *first)
{
rtx_insn *newinsn;
- if (INSN_DELETED_P (insn))
+ if (insn->deleted ())
continue;
/* Try to form a conditional variant of the instruction and emit it. */
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 98652f6..723057e 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -12498,7 +12498,7 @@ mips_output_conditional_branch (rtx_insn *insn, rtx *operands,
{
final_scan_insn (final_sequence->insn (1),
asm_out_file, optimize, 1, NULL);
- INSN_DELETED_P (final_sequence->insn (1)) = 1;
+ final_sequence->insn (1)->set_deleted ();
}
else
output_asm_insn ("nop", 0);
@@ -12523,7 +12523,7 @@ mips_output_conditional_branch (rtx_insn *insn, rtx *operands,
{
final_scan_insn (final_sequence->insn (1),
asm_out_file, optimize, 1, NULL);
- INSN_DELETED_P (final_sequence->insn (1)) = 1;
+ final_sequence->insn (1)->set_deleted ();
}
else
output_asm_insn ("nop", 0);
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 770aa62..7554fcc 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -34222,7 +34222,7 @@ replace_swap_with_copy (swap_web_entry *insn_entry, unsigned i)
df_insn_delete (insn);
remove_insn (insn);
- INSN_DELETED_P (insn) = 1;
+ insn->set_deleted ();
}
/* Dump the swap table to DUMP_FILE. */
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 9456d8b..c4b0260 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -2645,7 +2645,7 @@ print_slot (rtx_sequence *seq)
{
final_scan_insn (seq->insn (1), asm_out_file, optimize, 1, NULL);
- INSN_DELETED_P (seq->insn (1)) = 1;
+ seq->insn (1)->set_deleted ();
}
const char *
@@ -5572,7 +5572,7 @@ gen_block_redirect (rtx_insn *jump, int addr, int need_block)
rtx dest;
/* First, check if we already have an instruction that satisfies our need. */
- if (prev && NONJUMP_INSN_P (prev) && ! INSN_DELETED_P (prev))
+ if (prev && NONJUMP_INSN_P (prev) && ! prev->deleted ())
{
if (INSN_CODE (prev) == CODE_FOR_indirect_jump_scratch)
return prev;
@@ -5615,7 +5615,7 @@ gen_block_redirect (rtx_insn *jump, int addr, int need_block)
{
enum rtx_code code;
- if (INSN_DELETED_P (scan))
+ if (scan->deleted ())
continue;
code = GET_CODE (scan);
if (code == CODE_LABEL || code == JUMP_INSN)
@@ -5634,7 +5634,7 @@ gen_block_redirect (rtx_insn *jump, int addr, int need_block)
{
enum rtx_code code;
- if (INSN_DELETED_P (scan))
+ if (scan->deleted ())
continue;
code = GET_CODE (scan);
if (INSN_P (scan))
@@ -6495,7 +6495,7 @@ split_branches (rtx_insn *first)
for (insn = first; insn; insn = NEXT_INSN (insn))
if (! INSN_P (insn))
continue;
- else if (INSN_DELETED_P (insn))
+ else if (insn->deleted ())
{
/* Shorten_branches would split this instruction again,
so transform it into a note. */
@@ -10704,7 +10704,7 @@ mark_constant_pool_use (rtx x)
}
for (rtx insn = LABEL_REFS (lab); insn; insn = LABEL_REFS (insn))
- INSN_DELETED_P (insn) = 1;
+ as_a<rtx_insn *> (insn)->set_deleted ();
/* Mark constants in a window. */
for (insn = NEXT_INSN (as_a <rtx_insn *> (x)); insn; insn = NEXT_INSN (insn))
diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c
index dca82b9..45312fa 100644
--- a/gcc/config/v850/v850.c
+++ b/gcc/config/v850/v850.c
@@ -792,10 +792,13 @@ v850_output_addr_const_extra (FILE * file, rtx x)
nothing, since the table will not be used.
(cf gcc.c-torture/compile/990801-1.c). */
if (GET_CODE (x) == MINUS
- && GET_CODE (XEXP (x, 0)) == LABEL_REF
- && GET_CODE (XEXP (XEXP (x, 0), 0)) == CODE_LABEL
- && INSN_DELETED_P (XEXP (XEXP (x, 0), 0)))
- return true;
+ && GET_CODE (XEXP (x, 0)) == LABEL_REF)
+ {
+ rtx_code_label *label
+ = dyn_cast<rtx_code_label *> (XEXP (XEXP (x, 0), 0));
+ if (label && label->deleted ())
+ return true;
+ }
output_addr_const (file, x);
return true;