summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2006-03-05 05:58:50 +0000
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2006-03-05 05:58:50 +0000
commit03dd3bfbea6218fb4807ab62bf18a5fe4b49dd31 (patch)
treebc710a30da5d58d25c6f160e5eba55970fe6712d /gcc
parent07dce66b827448300e90e076c9929b42d6603a51 (diff)
downloadgcc-03dd3bfbea6218fb4807ab62bf18a5fe4b49dd31.tar.gz
* regclass.c (reg_scan_update): Remove.
(reg_scan_mark_refs): Remove the last argument. * rtl.h: Remove the prototype for reg_scan_update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111729 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/regclass.c72
-rw-r--r--gcc/rtl.h1
3 files changed, 23 insertions, 56 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e6fa6830c32..5491d5b2861 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2006-03-05 Kazu Hirata <kazu@codesourcery.com>
+
+ * regclass.c (reg_scan_update): Remove.
+ (reg_scan_mark_refs): Remove the last argument.
+ * rtl.h: Remove the prototype for reg_scan_update.
+
2006-03-04 Kazu Hirata <kazu@codesourcery.com>
* builtins.c, c-pragma.h, c-typeck.c, cgraph.c, cgraphunit.c,
diff --git a/gcc/regclass.c b/gcc/regclass.c
index e12e1ac85bd..0b9fd321f21 100644
--- a/gcc/regclass.c
+++ b/gcc/regclass.c
@@ -856,7 +856,7 @@ static void record_address_regs (rtx, enum reg_class, int);
#ifdef FORBIDDEN_INC_DEC_CLASSES
static int auto_inc_dec_reg_p (rtx, enum machine_mode);
#endif
-static void reg_scan_mark_refs (rtx, rtx, int, unsigned int);
+static void reg_scan_mark_refs (rtx, rtx, int);
/* Return the reg_class in which pseudo reg number REGNO is best allocated.
This function is sometimes called before the info has been computed.
@@ -2277,10 +2277,10 @@ reg_scan (rtx f, unsigned int nregs)
if (GET_CODE (pat) == PARALLEL
&& XVECLEN (pat, 0) > max_parallel)
max_parallel = XVECLEN (pat, 0);
- reg_scan_mark_refs (pat, insn, 0, 0);
+ reg_scan_mark_refs (pat, insn, 0);
if (REG_NOTES (insn))
- reg_scan_mark_refs (REG_NOTES (insn), insn, 1, 0);
+ reg_scan_mark_refs (REG_NOTES (insn), insn, 1);
}
max_parallel += max_set_parallel;
@@ -2288,39 +2288,11 @@ reg_scan (rtx f, unsigned int nregs)
timevar_pop (TV_REG_SCAN);
}
-/* Update 'regscan' information by looking at the insns
- from FIRST to LAST. Some new REGs have been created,
- and any REG with number greater than OLD_MAX_REGNO is
- such a REG. We only update information for those. */
-
-void
-reg_scan_update (rtx first, rtx last, unsigned int old_max_regno)
-{
- rtx insn;
-
- allocate_reg_info (max_reg_num (), FALSE, FALSE);
-
- for (insn = first; insn != last; insn = NEXT_INSN (insn))
- if (INSN_P (insn))
- {
- rtx pat = PATTERN (insn);
- if (GET_CODE (pat) == PARALLEL
- && XVECLEN (pat, 0) > max_parallel)
- max_parallel = XVECLEN (pat, 0);
- reg_scan_mark_refs (pat, insn, 0, old_max_regno);
-
- if (REG_NOTES (insn))
- reg_scan_mark_refs (REG_NOTES (insn), insn, 1, old_max_regno);
- }
-}
-
/* X is the expression to scan. INSN is the insn it appears in.
- NOTE_FLAG is nonzero if X is from INSN's notes rather than its body.
- We should only record information for REGs with numbers
- greater than or equal to MIN_REGNO. */
+ NOTE_FLAG is nonzero if X is from INSN's notes rather than its body. */
static void
-reg_scan_mark_refs (rtx x, rtx insn, int note_flag, unsigned int min_regno)
+reg_scan_mark_refs (rtx x, rtx insn, int note_flag)
{
enum rtx_code code;
rtx dest;
@@ -2347,43 +2319,35 @@ reg_scan_mark_refs (rtx x, rtx insn, int note_flag, unsigned int min_regno)
{
unsigned int regno = REGNO (x);
- if (regno >= min_regno)
- {
- if (!note_flag)
- REGNO_LAST_UID (regno) = INSN_UID (insn);
- if (REGNO_FIRST_UID (regno) == 0)
- REGNO_FIRST_UID (regno) = INSN_UID (insn);
- /* If we are called by reg_scan_update() (indicated by min_regno
- being set), we also need to update the reference count. */
- if (min_regno)
- REG_N_REFS (regno)++;
- }
+ if (!note_flag)
+ REGNO_LAST_UID (regno) = INSN_UID (insn);
+ if (REGNO_FIRST_UID (regno) == 0)
+ REGNO_FIRST_UID (regno) = INSN_UID (insn);
}
break;
case EXPR_LIST:
if (XEXP (x, 0))
- reg_scan_mark_refs (XEXP (x, 0), insn, note_flag, min_regno);
+ reg_scan_mark_refs (XEXP (x, 0), insn, note_flag);
if (XEXP (x, 1))
- reg_scan_mark_refs (XEXP (x, 1), insn, note_flag, min_regno);
+ reg_scan_mark_refs (XEXP (x, 1), insn, note_flag);
break;
case INSN_LIST:
if (XEXP (x, 1))
- reg_scan_mark_refs (XEXP (x, 1), insn, note_flag, min_regno);
+ reg_scan_mark_refs (XEXP (x, 1), insn, note_flag);
break;
case CLOBBER:
{
rtx reg = XEXP (x, 0);
- if (REG_P (reg)
- && REGNO (reg) >= min_regno)
+ if (REG_P (reg))
{
REG_N_SETS (REGNO (reg))++;
REG_N_REFS (REGNO (reg))++;
}
else if (MEM_P (reg))
- reg_scan_mark_refs (XEXP (reg, 0), insn, note_flag, min_regno);
+ reg_scan_mark_refs (XEXP (reg, 0), insn, note_flag);
}
break;
@@ -2400,8 +2364,7 @@ reg_scan_mark_refs (rtx x, rtx insn, int note_flag, unsigned int min_regno)
if (GET_CODE (dest) == PARALLEL)
max_set_parallel = MAX (max_set_parallel, XVECLEN (dest, 0) - 1);
- if (REG_P (dest)
- && REGNO (dest) >= min_regno)
+ if (REG_P (dest))
{
REG_N_SETS (REGNO (dest))++;
REG_N_REFS (REGNO (dest))++;
@@ -2421,7 +2384,6 @@ reg_scan_mark_refs (rtx x, rtx insn, int note_flag, unsigned int min_regno)
if (REG_P (SET_DEST (x))
&& REGNO (SET_DEST (x)) >= FIRST_PSEUDO_REGISTER
- && REGNO (SET_DEST (x)) >= min_regno
/* If the destination pseudo is set more than once, then other
sets might not be to a pointer value (consider access to a
union in two threads of control in the presence of global
@@ -2482,12 +2444,12 @@ reg_scan_mark_refs (rtx x, rtx insn, int note_flag, unsigned int min_regno)
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{
if (fmt[i] == 'e')
- reg_scan_mark_refs (XEXP (x, i), insn, note_flag, min_regno);
+ reg_scan_mark_refs (XEXP (x, i), insn, note_flag);
else if (fmt[i] == 'E' && XVEC (x, i) != 0)
{
int j;
for (j = XVECLEN (x, i) - 1; j >= 0; j--)
- reg_scan_mark_refs (XVECEXP (x, i, j), insn, note_flag, min_regno);
+ reg_scan_mark_refs (XVECEXP (x, i, j), insn, note_flag);
}
}
}
diff --git a/gcc/rtl.h b/gcc/rtl.h
index a6cd5808202..3d182f52917 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -2168,7 +2168,6 @@ extern void init_reg_sets (void);
extern void regclass_init (void);
extern void regclass (rtx, int);
extern void reg_scan (rtx, unsigned int);
-extern void reg_scan_update (rtx, rtx, unsigned int);
extern void fix_register (const char *, int, int);
extern void init_subregs_of_mode (void);
extern void record_subregs_of_mode (rtx);