summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/alpha/alpha.c1
-rw-r--r--gcc/config/arm/arm.c6
-rw-r--r--gcc/config/frv/frv.c4
-rw-r--r--gcc/config/i386/i386.c14
-rw-r--r--gcc/config/m32r/m32r.c1
-rw-r--r--gcc/config/mep/mep.c1
-rw-r--r--gcc/config/mips/mips.c7
-rw-r--r--gcc/config/pa/pa.c7
-rw-r--r--gcc/config/rs6000/rs6000.c21
-rw-r--r--gcc/config/s390/s390.c2
-rw-r--r--gcc/config/sh/sh.c15
-rw-r--r--gcc/config/spu/spu.c4
12 files changed, 18 insertions, 65 deletions
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 15cfd5ea866..9afce176bff 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -7454,7 +7454,6 @@ alpha_does_function_need_gp (void)
for (; insn; insn = NEXT_INSN (insn))
if (NONDEBUG_INSN_P (insn)
- && ! JUMP_TABLE_DATA_P (insn)
&& GET_CODE (PATTERN (insn)) != USE
&& GET_CODE (PATTERN (insn)) != CLOBBER
&& get_attr_usegp (insn))
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 17a15989c64..88165f27da4 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -22654,11 +22654,7 @@ thumb_far_jump_used_p (void)
insn with the far jump attribute set. */
for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
{
- if (JUMP_P (insn)
- /* Ignore tablejump patterns. */
- && ! JUMP_TABLE_DATA_P (insn)
- && get_attr_far_jump (insn) == FAR_JUMP_YES
- )
+ if (JUMP_P (insn) && get_attr_far_jump (insn) == FAR_JUMP_YES)
{
/* Record the fact that we have decided that
the function does use far jumps. */
diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c
index ab7502e95d9..b0e8c91c93d 100644
--- a/gcc/config/frv/frv.c
+++ b/gcc/config/frv/frv.c
@@ -1409,8 +1409,6 @@ frv_function_contains_far_jump (void)
rtx insn = get_insns ();
while (insn != NULL
&& !(JUMP_P (insn)
- /* Ignore tablejump patterns. */
- && ! JUMP_TABLE_DATA_P (insn)
&& get_attr_far_jump (insn) == FAR_JUMP_YES))
insn = NEXT_INSN (insn);
return (insn != NULL);
@@ -7480,7 +7478,7 @@ frv_for_each_packet (void (*handle_packet) (void))
frv_start_packet_block ();
}
- if (INSN_P (insn) && ! JUMP_TABLE_DATA_P (insn))
+ if (INSN_P (insn))
switch (GET_CODE (PATTERN (insn)))
{
case USE:
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 732b2a31e8a..8e9d38f8887 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -35116,8 +35116,6 @@ min_insn_size (rtx insn)
if (GET_CODE (PATTERN (insn)) == UNSPEC_VOLATILE
&& XINT (PATTERN (insn), 1) == UNSPECV_ALIGN)
return 0;
- if (JUMP_TABLE_DATA_P (insn))
- return 0;
/* Important case - calls are always 5 bytes.
It is common to have many calls in the row. */
@@ -35208,9 +35206,7 @@ ix86_avoid_jump_mispredicts (void)
while (nbytes + max_skip >= 16)
{
start = NEXT_INSN (start);
- if ((JUMP_P (start)
- && ! JUMP_TABLE_DATA_P (start))
- || CALL_P (start))
+ if (JUMP_P (start) || CALL_P (start))
njumps--, isjump = 1;
else
isjump = 0;
@@ -35225,9 +35221,7 @@ ix86_avoid_jump_mispredicts (void)
if (dump_file)
fprintf (dump_file, "Insn %i estimated to %i bytes\n",
INSN_UID (insn), min_size);
- if ((JUMP_P (insn)
- && ! JUMP_TABLE_DATA_P (insn))
- || CALL_P (insn))
+ if (JUMP_P (insn) || CALL_P (insn))
njumps++;
else
continue;
@@ -35235,9 +35229,7 @@ ix86_avoid_jump_mispredicts (void)
while (njumps > 3)
{
start = NEXT_INSN (start);
- if ((JUMP_P (start)
- && ! JUMP_TABLE_DATA_P (start))
- || CALL_P (start))
+ if (JUMP_P (start) || CALL_P (start))
njumps--, isjump = 1;
else
isjump = 0;
diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c
index 93df52f79ea..c94da538fcf 100644
--- a/gcc/config/m32r/m32r.c
+++ b/gcc/config/m32r/m32r.c
@@ -1308,7 +1308,6 @@ static int
m32r_is_insn (rtx insn)
{
return (NONDEBUG_INSN_P (insn)
- && ! JUMP_TABLE_DATA_P (insn)
&& GET_CODE (PATTERN (insn)) != USE
&& GET_CODE (PATTERN (insn)) != CLOBBER);
}
diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c
index 60054f9ae57..a5b7e6c68be 100644
--- a/gcc/config/mep/mep.c
+++ b/gcc/config/mep/mep.c
@@ -5511,7 +5511,6 @@ mep_reorg_erepeat (rtx insns)
for (insn = insns; insn; insn = NEXT_INSN (insn))
if (JUMP_P (insn)
- && ! JUMP_TABLE_DATA_P (insn)
&& mep_invertable_branch_p (insn))
{
if (dump_file)
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 7a67c45c65e..d1ba99680d3 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -99,7 +99,6 @@ along with GCC; see the file COPYING3. If not see
moved to rtl.h. */
#define USEFUL_INSN_P(INSN) \
(NONDEBUG_INSN_P (INSN) \
- && ! JUMP_TABLE_DATA_P (INSN) \
&& GET_CODE (PATTERN (INSN)) != USE \
&& GET_CODE (PATTERN (INSN)) != CLOBBER)
@@ -14654,8 +14653,10 @@ mips16_insn_length (rtx insn)
rtx body = PATTERN (insn);
if (GET_CODE (body) == ADDR_VEC)
return GET_MODE_SIZE (GET_MODE (body)) * XVECLEN (body, 0);
- if (GET_CODE (body) == ADDR_DIFF_VEC)
+ else if (GET_CODE (body) == ADDR_DIFF_VEC)
return GET_MODE_SIZE (GET_MODE (body)) * XVECLEN (body, 1);
+ else
+ gcc_unreachable ();
}
return get_attr_length (insn);
}
@@ -16184,7 +16185,6 @@ mips_has_long_branch_p (void)
for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
FOR_EACH_SUBINSN (subinsn, insn)
if (JUMP_P (subinsn)
- && USEFUL_INSN_P (subinsn)
&& get_attr_length (subinsn) > normal_length
&& (any_condjump_p (subinsn) || any_uncondjump_p (subinsn)))
return true;
@@ -16286,7 +16286,6 @@ mips16_split_long_branches (void)
something_changed = false;
for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
if (JUMP_P (insn)
- && USEFUL_INSN_P (insn)
&& get_attr_length (insn) > 8
&& (any_condjump_p (insn) || any_uncondjump_p (insn)))
{
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index b969e108b71..c06513c567d 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -9134,7 +9134,6 @@ pa_combine_instructions (void)
/* We only care about INSNs, JUMP_INSNs, and CALL_INSNs.
Also ignore any special USE insns. */
if ((! NONJUMP_INSN_P (anchor) && ! JUMP_P (anchor) && ! CALL_P (anchor))
- || JUMP_TABLE_DATA_P (anchor)
|| GET_CODE (PATTERN (anchor)) == USE
|| GET_CODE (PATTERN (anchor)) == CLOBBER)
continue;
@@ -9159,8 +9158,7 @@ pa_combine_instructions (void)
continue;
/* Anything except a regular INSN will stop our search. */
- if (! NONJUMP_INSN_P (floater)
- || JUMP_TABLE_DATA_P (floater))
+ if (! NONJUMP_INSN_P (floater))
{
floater = NULL_RTX;
break;
@@ -9220,8 +9218,7 @@ pa_combine_instructions (void)
continue;
/* Anything except a regular INSN will stop our search. */
- if (! NONJUMP_INSN_P (floater)
- || JUMP_TABLE_DATA_P (floater))
+ if (! NONJUMP_INSN_P (floater))
{
floater = NULL_RTX;
break;
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 72cf8de83ab..eda641d591e 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -1290,9 +1290,6 @@ static const struct attribute_spec rs6000_attribute_table[] =
#undef TARGET_FUNCTION_OK_FOR_SIBCALL
#define TARGET_FUNCTION_OK_FOR_SIBCALL rs6000_function_ok_for_sibcall
-#undef TARGET_INVALID_WITHIN_DOLOOP
-#define TARGET_INVALID_WITHIN_DOLOOP rs6000_invalid_within_doloop
-
#undef TARGET_REGISTER_MOVE_COST
#define TARGET_REGISTER_MOVE_COST rs6000_register_move_cost
#undef TARGET_MEMORY_MOVE_COST
@@ -18778,22 +18775,6 @@ rs6000_function_ok_for_sibcall (tree decl, tree exp)
return false;
}
-/* NULL if INSN insn is valid within a low-overhead loop.
- Otherwise return why doloop cannot be applied.
- PowerPC uses the COUNT register for branch on table instructions. */
-
-static const char *
-rs6000_invalid_within_doloop (const_rtx insn)
-{
- if (CALL_P (insn))
- return "Function call in the loop.";
-
- if (JUMP_TABLE_DATA_P (insn))
- return "Computed branch in the loop.";
-
- return NULL;
-}
-
static int
rs6000_ra_ever_killed (void)
{
@@ -23940,7 +23921,7 @@ get_next_active_insn (rtx insn, rtx tail)
return NULL_RTX;
if (CALL_P (insn)
- || JUMP_P (insn)
+ || JUMP_P (insn) || JUMP_TABLE_DATA_P (insn)
|| (NONJUMP_INSN_P (insn)
&& GET_CODE (PATTERN (insn)) != USE
&& GET_CODE (PATTERN (insn)) != CLOBBER
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index ab1e1f50b51..663cc545b8c 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -6867,7 +6867,7 @@ s390_chunkify_start (void)
}
}
- if (JUMP_P (insn) || LABEL_P (insn))
+ if (JUMP_P (insn) || JUMP_TABLE_DATA_P (insn) || LABEL_P (insn))
{
if (curr_pool)
s390_add_pool_insn (curr_pool, insn);
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index d13198b025b..ccf0ffe2108 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -5213,7 +5213,8 @@ find_barrier (int num_mova, rtx mova, rtx from)
if (found_si > count_si)
count_si = found_si;
}
- else if (JUMP_TABLE_DATA_P (from))
+ else if (JUMP_TABLE_DATA_P (from)
+ && GET_CODE (PATTERN (from)) == ADDR_DIFF_VEC)
{
if ((num_mova > 1 && GET_MODE (prev_nonnote_insn (from)) == VOIDmode)
|| (num_mova
@@ -5247,7 +5248,7 @@ find_barrier (int num_mova, rtx mova, rtx from)
/* There is a possibility that a bf is transformed into a bf/s by the
delay slot scheduler. */
- if (JUMP_P (from) && !JUMP_TABLE_DATA_P (from)
+ if (JUMP_P (from)
&& get_attr_type (from) == TYPE_CBRANCH
&& ! sequence_insn_p (from))
inc += 2;
@@ -5973,7 +5974,6 @@ sh_loop_align (rtx label)
if (! next
|| ! INSN_P (next)
- || GET_CODE (PATTERN (next)) == ADDR_DIFF_VEC
|| recog_memoized (next) == CODE_FOR_consttable_2)
return 0;
@@ -6494,9 +6494,7 @@ split_branches (rtx first)
so transform it into a note. */
SET_INSN_DELETED (insn);
}
- else if (JUMP_P (insn)
- /* Don't mess with ADDR_DIFF_VEC */
- && ! JUMP_TABLE_DATA_P (insn))
+ else if (JUMP_P (insn))
{
enum attr_type type = get_attr_type (insn);
if (type == TYPE_CBRANCH)
@@ -10122,8 +10120,7 @@ sh_insn_length_adjustment (rtx insn)
if (((NONJUMP_INSN_P (insn)
&& GET_CODE (PATTERN (insn)) != USE
&& GET_CODE (PATTERN (insn)) != CLOBBER)
- || CALL_P (insn)
- || (JUMP_P (insn) && !JUMP_TABLE_DATA_P (insn)))
+ || CALL_P (insn) || JUMP_P (insn))
&& ! sequence_insn_p (insn)
&& get_attr_needs_delay_slot (insn) == NEEDS_DELAY_SLOT_YES)
return 2;
@@ -10131,7 +10128,7 @@ sh_insn_length_adjustment (rtx insn)
/* SH2e has a bug that prevents the use of annulled branches, so if
the delay slot is not filled, we'll have to put a NOP in it. */
if (sh_cpu_attr == CPU_SH2E
- && JUMP_P (insn) && !JUMP_TABLE_DATA_P (insn)
+ && JUMP_P (insn)
&& get_attr_type (insn) == TYPE_CBRANCH
&& ! sequence_insn_p (insn))
return 2;
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c
index ec5a9873421..31d31f928a6 100644
--- a/gcc/config/spu/spu.c
+++ b/gcc/config/spu/spu.c
@@ -2171,10 +2171,6 @@ get_branch_target (rtx branch)
if (GET_CODE (PATTERN (branch)) == RETURN)
return gen_rtx_REG (SImode, LINK_REGISTER_REGNUM);
- /* jump table */
- if (JUMP_TABLE_DATA_P (branch))
- return 0;
-
/* ASM GOTOs. */
if (extract_asm_operands (PATTERN (branch)) != NULL)
return NULL;