aboutsummaryrefslogtreecommitdiff
path: root/gcc/recog.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/recog.c')
-rw-r--r--gcc/recog.c217
1 files changed, 1 insertions, 216 deletions
diff --git a/gcc/recog.c b/gcc/recog.c
index 3e105d74e15..cfce0291ba0 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -49,11 +49,6 @@ along with GCC; see the file COPYING3. If not see
#endif
#endif
-#undef KELVIN_INSTRUMENTS
-#ifdef KELVIN_INSTRUMENTS
-#include "hard-reg-set.h"
-#endif
-
static void validate_replace_rtx_1 (rtx *, rtx, rtx, rtx_insn *, bool);
static void validate_replace_src_1 (rtx *, void *);
static rtx_insn *split_insn (rtx_insn *);
@@ -2314,18 +2309,6 @@ extract_insn (rtx_insn *insn)
insn_extract (insn);
-#ifdef KELVIN_INSTRUMENTS
- if (dump_file)
- {
- fprintf (dump_file, "extract_insn (");
- print_inline_rtx (dump_file, insn, 2);
- fprintf (dump_file, "), memoized as %d\n", icode);
- fprintf (dump_file, " n_operands: %d\n", recog_data.n_operands);
- fprintf (dump_file, " n_alternatives: %d\n",
- recog_data.n_alternatives);
- fprintf (dump_file, " n_dups: %d\n", recog_data.n_dups);
- }
-#endif
for (i = 0; i < noperands; i++)
{
recog_data.constraints[i] = insn_data[icode].operand[i].constraint;
@@ -2334,18 +2317,6 @@ extract_insn (rtx_insn *insn)
/* VOIDmode match_operands gets mode from their real operand. */
if (recog_data.operand_mode[i] == VOIDmode)
recog_data.operand_mode[i] = GET_MODE (recog_data.operand[i]);
-#ifdef KELVIN_INSTRUMENTS
- if (dump_file)
- {
- fprintf (dump_file, " for operand %d:\n", i);
- fprintf (dump_file,
- " constraints[i]: %s\n", recog_data.constraints[i]);
- fprintf (dump_file,
- " is_operator[i]: %d\n", recog_data.is_operator[i]);
- fprintf (dump_file,
- " operand_mode[i]: %d\n", recog_data.operand_mode[i]);
- }
-#endif
}
}
for (i = 0; i < noperands; i++)
@@ -2571,16 +2542,6 @@ constrain_operands (int strict, alternative_mask alternatives)
struct funny_match funny_match[MAX_RECOG_OPERANDS];
int funny_match_index;
-#ifdef KELVIN_INSTRUMENTS
- if (dump_file)
- {
- fprintf (dump_file, "constrain_operands(%d, %llx)\n",
- strict, (unsigned long long int) alternatives);
- fprintf (dump_file, " n_operands: %d, n_alternatives: %d\n",
- recog_data.n_operands, recog_data.n_alternatives);
- }
-#endif
-
which_alternative = 0;
if (recog_data.n_operands == 0 || recog_data.n_alternatives == 0)
return 1;
@@ -2598,10 +2559,6 @@ constrain_operands (int strict, alternative_mask alternatives)
int lose = 0;
funny_match_index = 0;
-#ifdef KELVIN_INSTRUMENTS
- if (dump_file)
- fprintf (dump_file, "trying out alternative %d\n", which_alternative);
-#endif
if (!TEST_BIT (alternatives, which_alternative))
{
int i;
@@ -2623,10 +2580,6 @@ constrain_operands (int strict, alternative_mask alternatives)
int val;
int len;
-#ifdef KELVIN_INSTRUMENTS
- if (dump_file)
- fprintf (dump_file, "examining operand %d\n", opno);
-#endif
earlyclobber[opno] = 0;
/* A unary operator may be accepted by the predicate, but it
@@ -2650,13 +2603,6 @@ constrain_operands (int strict, alternative_mask alternatives)
if (*p == 0 || *p == ',')
win = 1;
-#ifdef KELVIN_INSTRUMENTS
- if (dump_file)
- {
- fprintf (dump_file, " looking at constraint %s\n", p);
- fprintf (dump_file, " was constraint empty, win: %d\n", win);
- }
-#endif
do
switch (c = *p, len = CONSTRAINT_LEN (c, p), c)
{
@@ -2723,11 +2669,6 @@ constrain_operands (int strict, alternative_mask alternatives)
if (val != 0)
win = 1;
-#ifdef KELVIN_INSTRUMENTS
- if (dump_file)
- fprintf (dump_file,
- "digit constraint, val: %d, win: %d\n", val, win);
-#endif
/* If output is *x and input is *--x, arrange later
to change the output to *--x as well, since the
output op is the one that will be printed. */
@@ -2749,11 +2690,6 @@ constrain_operands (int strict, alternative_mask alternatives)
|| (strict_memory_address_p (recog_data.operand_mode[opno],
op)))
win = 1;
-
-#ifdef KELVIN_INSTRUMENTS
- if (dump_file)
- fprintf (dump_file, "p constraint, win: %d\n", win);
-#endif
break;
/* No need to check general_operand again;
@@ -2771,24 +2707,9 @@ constrain_operands (int strict, alternative_mask alternatives)
&& REGNO (op) >= FIRST_PSEUDO_REGISTER)
|| reg_fits_class_p (op, GENERAL_REGS, offset, mode))
win = 1;
-
-#ifdef KELVIN_INSTRUMENTS
- if (dump_file)
- fprintf (dump_file, "g constraint with REG_P, win: %d\n",
- win);
-#endif
}
else if (strict < 0 || general_operand (op, mode))
-#ifdef KELVIN_INSTRUMENTS
- {
- win = 1;
- if (dump_file)
- fprintf (dump_file,
- "g constraint with !REG_p, win: %d\n", win);
- }
-#else
win = 1;
-#endif
break;
default:
@@ -2797,21 +2718,6 @@ constrain_operands (int strict, alternative_mask alternatives)
enum reg_class cl = reg_class_for_constraint (cn);
if (cl != NO_REGS)
{
-#ifdef KELVIN_INSTRUMENTS
- if (dump_file)
- {
- fprintf (dump_file,
- "Default constraint cl != NO_REGS\n");
- fprintf (dump_file, "REG_P (op): %d\n", REG_P (op));
- fprintf (dump_file,
- "cn: %d, cl: %d, offset: %d, mode: %d\n",
- cn, cl, offset, mode);
- if (REG_P (op))
- fprintf (dump_file,
- "reg_fits_class_p () returns %d\n",
- reg_fits_class_p (op, cl, offset, mode));
- }
-#endif
if (strict < 0
|| (strict == 0
&& REG_P (op)
@@ -2820,28 +2726,11 @@ constrain_operands (int strict, alternative_mask alternatives)
|| (REG_P (op)
&& reg_fits_class_p (op, cl, offset, mode)))
win = 1;
-#ifdef KELVIN_INSTRUMENTS
- if (dump_file)
- fprintf (dump_file,
- "default constraint cl != NO_REGS, win: %d\n",
- win);
-#endif
}
else if (constraint_satisfied_p (op, cn))
-#ifdef KELVIN_INSTRUMENTS
- {
- win = 1;
- if (dump_file)
- fprintf (dump_file,
- "default constraint cl == NO_REGS "
- " and constraint_satisfied_p, win: %d\n",
- win);
- }
-#else
win = 1;
-#endif
else if (insn_extra_memory_constraint (cn)
/* Every memory operand can be reloaded to fit. */
&& ((strict < 0 && MEM_P (op))
@@ -2855,27 +2744,11 @@ constrain_operands (int strict, alternative_mask alternatives)
/* During reload, accept a pseudo */
|| (reload_in_progress && REG_P (op)
&& REGNO (op) >= FIRST_PSEUDO_REGISTER)))
-#ifdef KELVIN_INSTRUMENTS
- {
- win = 1;
- if (dump_file)
- fprintf (dump_file,
- "default constraint wins by reload\n");
- }
-#else
win = 1;
-#endif
else if (insn_extra_address_constraint (cn)
/* Every address operand can be reloaded to fit. */
&& strict < 0)
- {
- win = 1;
-#ifdef KELVIN_INSTRUMENTS
- if (dump_file)
- fprintf (dump_file,
- "default constraint wins by extra addr\n");
-#endif
- }
+ win = 1;
/* Cater to architectures like IA-64 that define extra memory
constraints without using define_memory_constraint. */
else if (reload_in_progress
@@ -2885,21 +2758,7 @@ constrain_operands (int strict, alternative_mask alternatives)
&& reg_equiv_mem (REGNO (op)) != 0
&& constraint_satisfied_p
(reg_equiv_mem (REGNO (op)), cn))
-#ifdef KELVIN_INSTRUMENTS
- {
- win = 1;
- if (dump_file)
- fprintf (dump_file,
- "default constraint wins by specialness\n");
- }
-#else
win = 1;
-#endif
- else
- {
- if (dump_file)
- fprintf (dump_file, "default constraint don't win\n");
- }
break;
}
}
@@ -2910,23 +2769,7 @@ constrain_operands (int strict, alternative_mask alternatives)
this alternative loses. */
if (! win)
lose = 1;
-
-#ifdef KELVIN_INSTRUMENTS
- if (dump_file)
- {
- fprintf (dump_file, "after examining constraints for opno %d\n",
- opno);
- fprintf (dump_file, " constraints is %s\n", p);
- fprintf (dump_file, " win is %d, lose is %d\n", win, lose);
- }
-#endif
}
-
-#ifdef KELVIN_INSTRUMENTS
- if (dump_file)
- fprintf (dump_file, "... might return true if !lose (%d)\n",
- lose);
-#endif
/* This alternative won; the operands are ok.
Change whichever operands this alternative says to change. */
if (! lose)
@@ -2958,11 +2801,6 @@ constrain_operands (int strict, alternative_mask alternatives)
recog_data.operand[eopno]))
lose = 1;
-#ifdef KELVIN_INSTRUMENTS
- if (dump_file)
- fprintf (dump_file, "... might return true if still !lose (%d)\n",
- lose);
-#endif
if (! lose)
{
while (--funny_match_index >= 0)
@@ -2987,15 +2825,7 @@ constrain_operands (int strict, alternative_mask alternatives)
if (strchr (recog_data.constraints[opno], '<') == NULL
&& strchr (recog_data.constraints[opno], '>')
== NULL)
-#ifdef KELVIN_INSTRUMENTS
- {
- if (dump_file)
- fprintf (dump_file, " ... fail with <>\n");
- return 0;
- }
-#else
return 0;
-#endif
break;
default:
break;
@@ -3010,13 +2840,6 @@ constrain_operands (int strict, alternative_mask alternatives)
}
while (which_alternative < recog_data.n_alternatives);
-#ifdef KELVIN_INSTRUMENTS
- if (dump_file)
- {
- fprintf (dump_file, "Failing from constrain_operands, strict is %d\n",
- strict);
- }
-#endif
which_alternative = -1;
/* If we are about to reject this, but we are not to test strictly,
try a very loose test. Only return failure if it fails also. */
@@ -3040,44 +2863,6 @@ reg_fits_class_p (const_rtx operand, reg_class_t cl, int offset,
if (cl == NO_REGS)
return false;
-#ifdef KELVIN_INSTRUMENTS
- if (dump_file)
- {
- fprintf (dump_file, "reg_fits_class_p, regno: %d, offset: %d\n",
- regno, offset);
- fprintf (dump_file, "HARD_REGISTER_NUM_P (regno): %d\n",
- HARD_REGISTER_NUM_P (regno));
- fprintf (dump_file, "HARD_REGISTER_NUM_P (regno + offset): %d\n",
- HARD_REGISTER_NUM_P (regno + offset));
- fprintf (dump_file, "cl: %d\n", cl);
-
- if (HARD_REGISTER_NUM_P (regno)
- && HARD_REGISTER_NUM_P (regno + offset)) {
-
- fprintf (dump_file, "in_hard_reg_set_p () returns %s because ...\n",
- (in_hard_reg_set_p (reg_class_contents[(int) cl], mode,
- regno + offset)? "true": "false"));
- fprintf (dump_file, " regno + offset is %d\n", regno + offset);
-
-
-
-
- fprintf (dump_file, " TEST_HARD_REG_BIT (regs, regno + offset) is %s\n",
- TEST_HARD_REG_BIT (reg_class_contents[(int) cl],
- regno + offset)? "true": "false");
-
- fprintf (dump_file, " end_regno is %d\n", end_hard_regno (mode, regno));
-
- fprintf (dump_file, " HARD_REGISTER_NUM_P (end_regno - 1) is %s\n",
- (HARD_REGISTER_NUM_P (end_hard_regno (mode, regno) - 1)?
- "true": "false"));
-
- instrument_reg_set (dump_file, reg_class_contents[(int) cl],
- mode, regno + offset);
- }
- }
-#endif
-
/* Regno must not be a pseudo register. Offset may be negative. */
return (HARD_REGISTER_NUM_P (regno)
&& HARD_REGISTER_NUM_P (regno + offset)