mirror of git://gcc.gnu.org/git/gcc.git
unconditionally compile most of the delay slot code
gcc/ChangeLog: 2015-10-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * cfgrtl.c (pass_free_cfg::execute): Adjust. * final.c (dbr_sequence_length): Always define. (shorten_branches): Adjust. * genattr-common.c (main): Always define DELAY_SLOTS. * genattr.c (main): Unconditionally declare functions and define macros related to delay slots. * genattrtab.c (write_eligible_delay): Adjust. (main): Always write out delay slot functions. * opts.c (default_options_table): Adjust. * reorg.c (redirect_with_delay_slots_safe_p): Likewise. (redirect_with_delay_list_safe_p): Likewise. (fill_simple_delay_slots): Likewise. (fill_slots_from_thread): Likewise. (make_return_insns): Likewise. (dbr_schedule): Likewise. (rest_of_handle_delay_slots): Likewise. (pass_delay_slots::gate): Likewise. * toplev.c (process_options): Likewise. From-SVN: r229145
This commit is contained in:
parent
0a798c16c1
commit
e90bedf52c
|
|
@ -1,3 +1,24 @@
|
||||||
|
2015-10-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
|
||||||
|
|
||||||
|
* cfgrtl.c (pass_free_cfg::execute): Adjust.
|
||||||
|
* final.c (dbr_sequence_length): Always define.
|
||||||
|
(shorten_branches): Adjust.
|
||||||
|
* genattr-common.c (main): Always define DELAY_SLOTS.
|
||||||
|
* genattr.c (main): Unconditionally declare functions and define
|
||||||
|
macros related to delay slots.
|
||||||
|
* genattrtab.c (write_eligible_delay): Adjust.
|
||||||
|
(main): Always write out delay slot functions.
|
||||||
|
* opts.c (default_options_table): Adjust.
|
||||||
|
* reorg.c (redirect_with_delay_slots_safe_p): Likewise.
|
||||||
|
(redirect_with_delay_list_safe_p): Likewise.
|
||||||
|
(fill_simple_delay_slots): Likewise.
|
||||||
|
(fill_slots_from_thread): Likewise.
|
||||||
|
(make_return_insns): Likewise.
|
||||||
|
(dbr_schedule): Likewise.
|
||||||
|
(rest_of_handle_delay_slots): Likewise.
|
||||||
|
(pass_delay_slots::gate): Likewise.
|
||||||
|
* toplev.c (process_options): Likewise.
|
||||||
|
|
||||||
2015-10-21 Richard Henderson <rth@redhat.com>
|
2015-10-21 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
* targhooks.c (default_addr_space_pointer_mode): Remove check
|
* targhooks.c (default_addr_space_pointer_mode): Remove check
|
||||||
|
|
|
||||||
|
|
@ -483,15 +483,13 @@ public:
|
||||||
unsigned int
|
unsigned int
|
||||||
pass_free_cfg::execute (function *)
|
pass_free_cfg::execute (function *)
|
||||||
{
|
{
|
||||||
#ifdef DELAY_SLOTS
|
|
||||||
/* The resource.c machinery uses DF but the CFG isn't guaranteed to be
|
/* The resource.c machinery uses DF but the CFG isn't guaranteed to be
|
||||||
valid at that point so it would be too late to call df_analyze. */
|
valid at that point so it would be too late to call df_analyze. */
|
||||||
if (optimize > 0 && flag_delayed_branch)
|
if (DELAY_SLOTS && optimize > 0 && flag_delayed_branch)
|
||||||
{
|
{
|
||||||
df_note_add_problem ();
|
df_note_add_problem ();
|
||||||
df_analyze ();
|
df_analyze ();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (crtl->has_bb_partition)
|
if (crtl->has_bb_partition)
|
||||||
insert_section_boundary_note ();
|
insert_section_boundary_note ();
|
||||||
|
|
|
||||||
12
gcc/final.c
12
gcc/final.c
|
|
@ -297,7 +297,6 @@ app_disable (void)
|
||||||
delayed branch sequence (we don't count the insn needing the
|
delayed branch sequence (we don't count the insn needing the
|
||||||
delay slot). Zero if not in a delayed branch sequence. */
|
delay slot). Zero if not in a delayed branch sequence. */
|
||||||
|
|
||||||
#ifdef DELAY_SLOTS
|
|
||||||
int
|
int
|
||||||
dbr_sequence_length (void)
|
dbr_sequence_length (void)
|
||||||
{
|
{
|
||||||
|
|
@ -306,7 +305,6 @@ dbr_sequence_length (void)
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The next two pages contain routines used to compute the length of an insn
|
/* The next two pages contain routines used to compute the length of an insn
|
||||||
and to shorten branches. */
|
and to shorten branches. */
|
||||||
|
|
@ -1156,11 +1154,11 @@ shorten_branches (rtx_insn *first)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int const_delay_slots;
|
int const_delay_slots;
|
||||||
#ifdef DELAY_SLOTS
|
if (DELAY_SLOTS)
|
||||||
const_delay_slots = const_num_delay_slots (body_seq->insn (0));
|
const_delay_slots = const_num_delay_slots (body_seq->insn (0));
|
||||||
#else
|
else
|
||||||
const_delay_slots = 0;
|
const_delay_slots = 0;
|
||||||
#endif
|
|
||||||
int (*inner_length_fun) (rtx_insn *)
|
int (*inner_length_fun) (rtx_insn *)
|
||||||
= const_delay_slots ? length_fun : insn_default_length;
|
= const_delay_slots ? length_fun : insn_default_length;
|
||||||
/* Inside a delay slot sequence, we do not do any branch shortening
|
/* Inside a delay slot sequence, we do not do any branch shortening
|
||||||
|
|
|
||||||
|
|
@ -87,11 +87,7 @@ main (int argc, char **argv)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DEFINE_DELAY:
|
case DEFINE_DELAY:
|
||||||
if (!have_delay)
|
have_delay = true;
|
||||||
{
|
|
||||||
printf ("#define DELAY_SLOTS\n");
|
|
||||||
have_delay = true;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DEFINE_INSN_RESERVATION:
|
case DEFINE_INSN_RESERVATION:
|
||||||
|
|
@ -105,6 +101,8 @@ main (int argc, char **argv)
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printf ("#define DELAY_SLOTS %d\n", have_delay);
|
||||||
puts ("\n#endif /* GCC_INSN_ATTR_COMMON_H */");
|
puts ("\n#endif /* GCC_INSN_ATTR_COMMON_H */");
|
||||||
|
|
||||||
if (ferror (stdout) || fflush (stdout) || fclose (stdout))
|
if (ferror (stdout) || fflush (stdout) || fclose (stdout))
|
||||||
|
|
|
||||||
|
|
@ -140,9 +140,8 @@ find_tune_attr (rtx exp)
|
||||||
int
|
int
|
||||||
main (int argc, char **argv)
|
main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
int have_delay = 0;
|
bool have_annul_true = false;
|
||||||
int have_annul_true = 0;
|
bool have_annul_false = false;
|
||||||
int have_annul_false = 0;
|
|
||||||
int num_insn_reservations = 0;
|
int num_insn_reservations = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
@ -172,29 +171,13 @@ main (int argc, char **argv)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DEFINE_DELAY:
|
case DEFINE_DELAY:
|
||||||
if (! have_delay)
|
|
||||||
{
|
|
||||||
printf ("extern int num_delay_slots (rtx_insn *);\n");
|
|
||||||
printf ("extern int eligible_for_delay (rtx_insn *, int, rtx_insn *, int);\n\n");
|
|
||||||
printf ("extern int const_num_delay_slots (rtx_insn *);\n\n");
|
|
||||||
have_delay = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < XVECLEN (def, 1); i += 3)
|
for (i = 0; i < XVECLEN (def, 1); i += 3)
|
||||||
{
|
{
|
||||||
if (XVECEXP (def, 1, i + 1) && ! have_annul_true)
|
if (XVECEXP (def, 1, i + 1))
|
||||||
{
|
have_annul_true = true;
|
||||||
printf ("#define ANNUL_IFTRUE_SLOTS\n");
|
|
||||||
printf ("extern int eligible_for_annul_true (rtx_insn *, int, rtx_insn *, int);\n");
|
|
||||||
have_annul_true = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (XVECEXP (def, 1, i + 2) && ! have_annul_false)
|
if (XVECEXP (def, 1, i + 2))
|
||||||
{
|
have_annul_false = true;
|
||||||
printf ("#define ANNUL_IFFALSE_SLOTS\n");
|
|
||||||
printf ("extern int eligible_for_annul_false (rtx_insn *, int, rtx_insn *, int);\n");
|
|
||||||
have_annul_false = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -208,6 +191,14 @@ main (int argc, char **argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printf ("extern int num_delay_slots (rtx_insn *);\n");
|
||||||
|
printf ("extern int eligible_for_delay (rtx_insn *, int, rtx_insn *, int);\n\n");
|
||||||
|
printf ("extern int const_num_delay_slots (rtx_insn *);\n\n");
|
||||||
|
printf ("#define ANNUL_IFTRUE_SLOTS %d\n", have_annul_true);
|
||||||
|
printf ("extern int eligible_for_annul_true (rtx_insn *, int, rtx_insn *, int);\n");
|
||||||
|
printf ("#define ANNUL_IFFALSE_SLOTS %d\n", have_annul_false);
|
||||||
|
printf ("extern int eligible_for_annul_false (rtx_insn *, int, rtx_insn *, int);\n");
|
||||||
|
|
||||||
if (num_insn_reservations > 0)
|
if (num_insn_reservations > 0)
|
||||||
{
|
{
|
||||||
bool has_tune_attr
|
bool has_tune_attr
|
||||||
|
|
|
||||||
|
|
@ -4449,7 +4449,7 @@ write_eligible_delay (FILE *outf, const char *kind)
|
||||||
" rtx_insn *candidate_insn, int flags ATTRIBUTE_UNUSED)\n",
|
" rtx_insn *candidate_insn, int flags ATTRIBUTE_UNUSED)\n",
|
||||||
kind);
|
kind);
|
||||||
fprintf (outf, "{\n");
|
fprintf (outf, "{\n");
|
||||||
fprintf (outf, " rtx_insn *insn;\n");
|
fprintf (outf, " rtx_insn *insn ATTRIBUTE_UNUSED;\n");
|
||||||
fprintf (outf, "\n");
|
fprintf (outf, "\n");
|
||||||
fprintf (outf, " gcc_assert (slot < %d);\n", max_slots);
|
fprintf (outf, " gcc_assert (slot < %d);\n", max_slots);
|
||||||
fprintf (outf, "\n");
|
fprintf (outf, "\n");
|
||||||
|
|
@ -5240,8 +5240,7 @@ main (int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Expand DEFINE_DELAY information into new attribute. */
|
/* Expand DEFINE_DELAY information into new attribute. */
|
||||||
if (num_delays)
|
expand_delays ();
|
||||||
expand_delays ();
|
|
||||||
|
|
||||||
/* Make `insn_alternatives'. */
|
/* Make `insn_alternatives'. */
|
||||||
int num_insn_codes = get_num_insn_codes ();
|
int num_insn_codes = get_num_insn_codes ();
|
||||||
|
|
@ -5307,14 +5306,9 @@ main (int argc, char **argv)
|
||||||
/* Write out delay eligibility information, if DEFINE_DELAY present.
|
/* Write out delay eligibility information, if DEFINE_DELAY present.
|
||||||
(The function to compute the number of delay slots will be written
|
(The function to compute the number of delay slots will be written
|
||||||
below.) */
|
below.) */
|
||||||
if (num_delays)
|
write_eligible_delay (attr_file, "delay");
|
||||||
{
|
write_eligible_delay (attr_file, "annul_true");
|
||||||
write_eligible_delay (attr_file, "delay");
|
write_eligible_delay (attr_file, "annul_false");
|
||||||
if (have_annul_true)
|
|
||||||
write_eligible_delay (attr_file, "annul_true");
|
|
||||||
if (have_annul_false)
|
|
||||||
write_eligible_delay (attr_file, "annul_false");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Write out constant delay slot info. */
|
/* Write out constant delay slot info. */
|
||||||
write_const_num_delay_slots (attr_file);
|
write_const_num_delay_slots (attr_file);
|
||||||
|
|
|
||||||
|
|
@ -429,7 +429,7 @@ static const struct default_options default_options_table[] =
|
||||||
{
|
{
|
||||||
/* -O1 optimizations. */
|
/* -O1 optimizations. */
|
||||||
{ OPT_LEVELS_1_PLUS, OPT_fdefer_pop, NULL, 1 },
|
{ OPT_LEVELS_1_PLUS, OPT_fdefer_pop, NULL, 1 },
|
||||||
#ifdef DELAY_SLOTS
|
#if DELAY_SLOTS
|
||||||
{ OPT_LEVELS_1_PLUS, OPT_fdelayed_branch, NULL, 1 },
|
{ OPT_LEVELS_1_PLUS, OPT_fdelayed_branch, NULL, 1 },
|
||||||
#endif
|
#endif
|
||||||
{ OPT_LEVELS_1_PLUS, OPT_fguess_branch_probability, NULL, 1 },
|
{ OPT_LEVELS_1_PLUS, OPT_fguess_branch_probability, NULL, 1 },
|
||||||
|
|
|
||||||
82
gcc/reorg.c
82
gcc/reorg.c
|
|
@ -131,15 +131,6 @@ along with GCC; see the file COPYING3. If not see
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
#include "tree-pass.h"
|
#include "tree-pass.h"
|
||||||
|
|
||||||
#ifdef DELAY_SLOTS
|
|
||||||
|
|
||||||
#ifndef ANNUL_IFTRUE_SLOTS
|
|
||||||
#define eligible_for_annul_true(INSN, SLOTS, TRIAL, FLAGS) 0
|
|
||||||
#endif
|
|
||||||
#ifndef ANNUL_IFFALSE_SLOTS
|
|
||||||
#define eligible_for_annul_false(INSN, SLOTS, TRIAL, FLAGS) 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* First, some functions that were used before GCC got a control flow graph.
|
/* First, some functions that were used before GCC got a control flow graph.
|
||||||
These functions are now only used here in reorg.c, and have therefore
|
These functions are now only used here in reorg.c, and have therefore
|
||||||
|
|
@ -219,9 +210,6 @@ static void add_to_delay_list (rtx_insn *, vec<rtx_insn *> *);
|
||||||
static rtx_insn *delete_from_delay_slot (rtx_insn *);
|
static rtx_insn *delete_from_delay_slot (rtx_insn *);
|
||||||
static void delete_scheduled_jump (rtx_insn *);
|
static void delete_scheduled_jump (rtx_insn *);
|
||||||
static void note_delay_statistics (int, int);
|
static void note_delay_statistics (int, int);
|
||||||
#if defined(ANNUL_IFFALSE_SLOTS) || defined(ANNUL_IFTRUE_SLOTS)
|
|
||||||
static void optimize_skip (rtx_jump_insn *, vec<rtx_insn *> *);
|
|
||||||
#endif
|
|
||||||
static int get_jump_flags (const rtx_insn *, rtx);
|
static int get_jump_flags (const rtx_insn *, rtx);
|
||||||
static int mostly_true_jump (rtx);
|
static int mostly_true_jump (rtx);
|
||||||
static rtx get_branch_condition (const rtx_insn *, rtx);
|
static rtx get_branch_condition (const rtx_insn *, rtx);
|
||||||
|
|
@ -717,8 +705,6 @@ note_delay_statistics (int slots_filled, int index)
|
||||||
num_filled_delays[index][slots_filled][reorg_pass_number]++;
|
num_filled_delays[index][slots_filled][reorg_pass_number]++;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(ANNUL_IFFALSE_SLOTS) || defined(ANNUL_IFTRUE_SLOTS)
|
|
||||||
|
|
||||||
/* Optimize the following cases:
|
/* Optimize the following cases:
|
||||||
|
|
||||||
1. When a conditional branch skips over only one instruction,
|
1. When a conditional branch skips over only one instruction,
|
||||||
|
|
@ -818,7 +804,6 @@ optimize_skip (rtx_jump_insn *insn, vec<rtx_insn *> *delay_list)
|
||||||
INSN_ANNULLED_BRANCH_P (insn) = 1;
|
INSN_ANNULLED_BRANCH_P (insn) = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Encode and return branch direction and prediction information for
|
/* Encode and return branch direction and prediction information for
|
||||||
INSN assuming it will jump to LABEL.
|
INSN assuming it will jump to LABEL.
|
||||||
|
|
@ -973,12 +958,12 @@ redirect_with_delay_slots_safe_p (rtx_insn *jump, rtx newlabel, rtx seq)
|
||||||
flags = get_jump_flags (jump, newlabel);
|
flags = get_jump_flags (jump, newlabel);
|
||||||
for (i = 1; i < pat->len (); i++)
|
for (i = 1; i < pat->len (); i++)
|
||||||
if (! (
|
if (! (
|
||||||
#ifdef ANNUL_IFFALSE_SLOTS
|
#if ANNUL_IFFALSE_SLOTS
|
||||||
(INSN_ANNULLED_BRANCH_P (jump)
|
(INSN_ANNULLED_BRANCH_P (jump)
|
||||||
&& INSN_FROM_TARGET_P (pat->insn (i)))
|
&& INSN_FROM_TARGET_P (pat->insn (i)))
|
||||||
? eligible_for_annul_false (jump, i - 1, pat->insn (i), flags) :
|
? eligible_for_annul_false (jump, i - 1, pat->insn (i), flags) :
|
||||||
#endif
|
#endif
|
||||||
#ifdef ANNUL_IFTRUE_SLOTS
|
#if ANNUL_IFTRUE_SLOTS
|
||||||
(INSN_ANNULLED_BRANCH_P (jump)
|
(INSN_ANNULLED_BRANCH_P (jump)
|
||||||
&& ! INSN_FROM_TARGET_P (XVECEXP (pat, 0, i)))
|
&& ! INSN_FROM_TARGET_P (XVECEXP (pat, 0, i)))
|
||||||
? eligible_for_annul_true (jump, i - 1, pat->insn (i), flags) :
|
? eligible_for_annul_true (jump, i - 1, pat->insn (i), flags) :
|
||||||
|
|
@ -1005,12 +990,12 @@ redirect_with_delay_list_safe_p (rtx_insn *jump, rtx newlabel,
|
||||||
unsigned int i = 0;
|
unsigned int i = 0;
|
||||||
for (; i < delay_insns; i++)
|
for (; i < delay_insns; i++)
|
||||||
if (! (
|
if (! (
|
||||||
#ifdef ANNUL_IFFALSE_SLOTS
|
#if ANNUL_IFFALSE_SLOTS
|
||||||
(INSN_ANNULLED_BRANCH_P (jump)
|
(INSN_ANNULLED_BRANCH_P (jump)
|
||||||
&& INSN_FROM_TARGET_P (delay_list[i]))
|
&& INSN_FROM_TARGET_P (delay_list[i]))
|
||||||
? eligible_for_annul_false (jump, i, delay_list[i], flags) :
|
? eligible_for_annul_false (jump, i, delay_list[i], flags) :
|
||||||
#endif
|
#endif
|
||||||
#ifdef ANNUL_IFTRUE_SLOTS
|
#if ANNUL_IFTRUE_SLOTS
|
||||||
(INSN_ANNULLED_BRANCH_P (jump)
|
(INSN_ANNULLED_BRANCH_P (jump)
|
||||||
&& ! INSN_FROM_TARGET_P (delay_list[i]))
|
&& ! INSN_FROM_TARGET_P (delay_list[i]))
|
||||||
? eligible_for_annul_true (jump, i, delay_list[i], flags) :
|
? eligible_for_annul_true (jump, i, delay_list[i], flags) :
|
||||||
|
|
@ -2096,8 +2081,8 @@ fill_simple_delay_slots (int non_jumps_p)
|
||||||
/* If all needed slots haven't been filled, we come here. */
|
/* If all needed slots haven't been filled, we come here. */
|
||||||
|
|
||||||
/* Try to optimize case of jumping around a single insn. */
|
/* Try to optimize case of jumping around a single insn. */
|
||||||
#if defined(ANNUL_IFFALSE_SLOTS) || defined(ANNUL_IFTRUE_SLOTS)
|
if ((ANNUL_IFTRUE_SLOTS || ANNUL_IFFALSE_SLOTS)
|
||||||
if (slots_filled != slots_to_fill
|
&& slots_filled != slots_to_fill
|
||||||
&& delay_list.is_empty ()
|
&& delay_list.is_empty ()
|
||||||
&& JUMP_P (insn)
|
&& JUMP_P (insn)
|
||||||
&& (condjump_p (insn) || condjump_in_parallel_p (insn))
|
&& (condjump_p (insn) || condjump_in_parallel_p (insn))
|
||||||
|
|
@ -2107,7 +2092,6 @@ fill_simple_delay_slots (int non_jumps_p)
|
||||||
if (!delay_list.is_empty ())
|
if (!delay_list.is_empty ())
|
||||||
slots_filled += 1;
|
slots_filled += 1;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Try to get insns from beyond the insn needing the delay slot.
|
/* Try to get insns from beyond the insn needing the delay slot.
|
||||||
These insns can neither set or reference resources set in insns being
|
These insns can neither set or reference resources set in insns being
|
||||||
|
|
@ -2494,13 +2478,8 @@ fill_slots_from_thread (rtx_jump_insn *insn, rtx condition,
|
||||||
goto winner;
|
goto winner;
|
||||||
}
|
}
|
||||||
else if (0
|
else if (0
|
||||||
#ifdef ANNUL_IFTRUE_SLOTS
|
|| (ANNUL_IFTRUE_SLOTS && ! thread_if_true)
|
||||||
|| ! thread_if_true
|
|| (ANNUL_IFFALSE_SLOTS && thread_if_true))
|
||||||
#endif
|
|
||||||
#ifdef ANNUL_IFFALSE_SLOTS
|
|
||||||
|| thread_if_true
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
old_trial = trial;
|
old_trial = trial;
|
||||||
trial = try_split (pat, trial, 0);
|
trial = try_split (pat, trial, 0);
|
||||||
|
|
@ -3611,13 +3590,13 @@ make_return_insns (rtx_insn *first)
|
||||||
{
|
{
|
||||||
for (i = 1; i < XVECLEN (pat, 0); i++)
|
for (i = 1; i < XVECLEN (pat, 0); i++)
|
||||||
if (! (
|
if (! (
|
||||||
#ifdef ANNUL_IFFALSE_SLOTS
|
#if ANNUL_IFFALSE_SLOTS
|
||||||
(INSN_ANNULLED_BRANCH_P (jump_insn)
|
(INSN_ANNULLED_BRANCH_P (jump_insn)
|
||||||
&& INSN_FROM_TARGET_P (pat->insn (i)))
|
&& INSN_FROM_TARGET_P (pat->insn (i)))
|
||||||
? eligible_for_annul_false (jump_insn, i - 1,
|
? eligible_for_annul_false (jump_insn, i - 1,
|
||||||
pat->insn (i), flags) :
|
pat->insn (i), flags) :
|
||||||
#endif
|
#endif
|
||||||
#ifdef ANNUL_IFTRUE_SLOTS
|
#if ANNUL_IFTRUE_SLOTS
|
||||||
(INSN_ANNULLED_BRANCH_P (jump_insn)
|
(INSN_ANNULLED_BRANCH_P (jump_insn)
|
||||||
&& ! INSN_FROM_TARGET_P (pat->insn (i)))
|
&& ! INSN_FROM_TARGET_P (pat->insn (i)))
|
||||||
? eligible_for_annul_true (jump_insn, i - 1,
|
? eligible_for_annul_true (jump_insn, i - 1,
|
||||||
|
|
@ -3852,21 +3831,24 @@ dbr_schedule (rtx_insn *first)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fprintf (dump_file, "\n");
|
fprintf (dump_file, "\n");
|
||||||
#if defined (ANNUL_IFTRUE_SLOTS) || defined (ANNUL_IFFALSE_SLOTS)
|
|
||||||
fprintf (dump_file, ";; Reorg annuls: ");
|
if (ANNUL_IFTRUE_SLOTS || ANNUL_IFFALSE_SLOTS)
|
||||||
need_comma = 0;
|
|
||||||
for (j = 0; j < MAX_DELAY_HISTOGRAM + 1; j++)
|
|
||||||
{
|
{
|
||||||
if (total_annul_slots[j])
|
fprintf (dump_file, ";; Reorg annuls: ");
|
||||||
|
need_comma = 0;
|
||||||
|
for (j = 0; j < MAX_DELAY_HISTOGRAM + 1; j++)
|
||||||
{
|
{
|
||||||
if (need_comma)
|
if (total_annul_slots[j])
|
||||||
fprintf (dump_file, ", ");
|
{
|
||||||
need_comma = 1;
|
if (need_comma)
|
||||||
fprintf (dump_file, "%d got %d delays", total_annul_slots[j], j);
|
fprintf (dump_file, ", ");
|
||||||
|
need_comma = 1;
|
||||||
|
fprintf (dump_file, "%d got %d delays", total_annul_slots[j], j);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
fprintf (dump_file, "\n");
|
||||||
}
|
}
|
||||||
fprintf (dump_file, "\n");
|
|
||||||
#endif
|
|
||||||
fprintf (dump_file, "\n");
|
fprintf (dump_file, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3880,15 +3862,14 @@ dbr_schedule (rtx_insn *first)
|
||||||
free (uid_to_ruid);
|
free (uid_to_ruid);
|
||||||
crtl->dbr_scheduled_p = true;
|
crtl->dbr_scheduled_p = true;
|
||||||
}
|
}
|
||||||
#endif /* DELAY_SLOTS */
|
|
||||||
|
|
||||||
/* Run delay slot optimization. */
|
/* Run delay slot optimization. */
|
||||||
static unsigned int
|
static unsigned int
|
||||||
rest_of_handle_delay_slots (void)
|
rest_of_handle_delay_slots (void)
|
||||||
{
|
{
|
||||||
#ifdef DELAY_SLOTS
|
if (DELAY_SLOTS)
|
||||||
dbr_schedule (get_insns ());
|
dbr_schedule (get_insns ());
|
||||||
#endif
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3926,12 +3907,11 @@ public:
|
||||||
bool
|
bool
|
||||||
pass_delay_slots::gate (function *)
|
pass_delay_slots::gate (function *)
|
||||||
{
|
{
|
||||||
#ifdef DELAY_SLOTS
|
|
||||||
/* At -O0 dataflow info isn't updated after RA. */
|
/* At -O0 dataflow info isn't updated after RA. */
|
||||||
return optimize > 0 && flag_delayed_branch && !crtl->dbr_scheduled_p;
|
if (DELAY_SLOTS)
|
||||||
#else
|
return optimize > 0 && flag_delayed_branch && !crtl->dbr_scheduled_p;
|
||||||
return 0;
|
|
||||||
#endif
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // anon namespace
|
} // anon namespace
|
||||||
|
|
|
||||||
|
|
@ -1317,10 +1317,8 @@ process_options (void)
|
||||||
if (flag_schedule_insns || flag_schedule_insns_after_reload)
|
if (flag_schedule_insns || flag_schedule_insns_after_reload)
|
||||||
warning (0, "instruction scheduling not supported on this target machine");
|
warning (0, "instruction scheduling not supported on this target machine");
|
||||||
#endif
|
#endif
|
||||||
#ifndef DELAY_SLOTS
|
if (!DELAY_SLOTS && flag_delayed_branch)
|
||||||
if (flag_delayed_branch)
|
|
||||||
warning (0, "this target machine does not have delayed branches");
|
warning (0, "this target machine does not have delayed branches");
|
||||||
#endif
|
|
||||||
|
|
||||||
user_label_prefix = USER_LABEL_PREFIX;
|
user_label_prefix = USER_LABEL_PREFIX;
|
||||||
if (flag_leading_underscore != -1)
|
if (flag_leading_underscore != -1)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue