Commit 0021de69 by Daniel Berlin Committed by Richard Henderson

cse.c (set_live_p): Take INSN argument for cc0; update callers.

        * cse.c (set_live_p): Take INSN argument for cc0; update callers.
        (insn_live_p): Fix fall off end of function.
        (dead_libcall_p): Remove COUNTS argument; update callers.
        (delete_trivially_dead_insns): Remove unused variables.

Co-Authored-By: Richard Henderson <rth@redhat.com>

From-SVN: r44064
parent 51589632
2001-07-16 Daniel Berlin <dan@cgsoftware.com>
Richard Henderson <rth@redhat.com>
* cse.c (set_live_p): Take INSN argument for cc0; update callers.
(insn_live_p): Fix fall off end of function.
(dead_libcall_p): Remove COUNTS argument; update callers.
(delete_trivially_dead_insns): Remove unused variables.
2001-07-17 Andreas Jaeger <aj@suse.de> 2001-07-17 Andreas Jaeger <aj@suse.de>
* config/i386/unix.h (ASM_OUTPUT_MI_THUNK): Fix output format for * config/i386/unix.h (ASM_OUTPUT_MI_THUNK): Fix output format for
......
...@@ -690,8 +690,8 @@ static int check_dependence PARAMS ((rtx *, void *)); ...@@ -690,8 +690,8 @@ static int check_dependence PARAMS ((rtx *, void *));
static void flush_hash_table PARAMS ((void)); static void flush_hash_table PARAMS ((void));
static bool insn_live_p PARAMS ((rtx, int *)); static bool insn_live_p PARAMS ((rtx, int *));
static bool set_live_p PARAMS ((rtx, int *)); static bool set_live_p PARAMS ((rtx, rtx, int *));
static bool dead_libcall_p PARAMS ((rtx, int *)); static bool dead_libcall_p PARAMS ((rtx));
/* Dump the expressions in the equivalence class indicated by CLASSP. /* Dump the expressions in the equivalence class indicated by CLASSP.
This function is used only for debugging. */ This function is used only for debugging. */
...@@ -7486,8 +7486,9 @@ count_reg_usage (x, counts, dest, incr) ...@@ -7486,8 +7486,9 @@ count_reg_usage (x, counts, dest, incr)
/* Return true if set is live. */ /* Return true if set is live. */
static bool static bool
set_live_p (set, counts) set_live_p (set, insn, counts)
rtx set; rtx set;
rtx insn;
int *counts; int *counts;
{ {
#ifdef HAVE_cc0 #ifdef HAVE_cc0
...@@ -7527,20 +7528,23 @@ insn_live_p (insn, counts) ...@@ -7527,20 +7528,23 @@ insn_live_p (insn, counts)
{ {
int i; int i;
if (GET_CODE (PATTERN (insn)) == SET) if (GET_CODE (PATTERN (insn)) == SET)
return set_live_p (PATTERN (insn), counts); return set_live_p (PATTERN (insn), insn, counts);
else if (GET_CODE (PATTERN (insn)) == PARALLEL) else if (GET_CODE (PATTERN (insn)) == PARALLEL)
for (i = XVECLEN (PATTERN (insn), 0) - 1; i >= 0; i--) {
{ for (i = XVECLEN (PATTERN (insn), 0) - 1; i >= 0; i--)
rtx elt = XVECEXP (PATTERN (insn), 0, i); {
rtx elt = XVECEXP (PATTERN (insn), 0, i);
if (GET_CODE (elt) == SET) if (GET_CODE (elt) == SET)
{ {
if (set_live_p (elt, counts)) if (set_live_p (elt, insn, counts))
return true; return true;
} }
else if (GET_CODE (elt) != CLOBBER && GET_CODE (elt) != USE) else if (GET_CODE (elt) != CLOBBER && GET_CODE (elt) != USE)
return true; return true;
} }
return false;
}
else else
return true; return true;
} }
...@@ -7548,9 +7552,8 @@ insn_live_p (insn, counts) ...@@ -7548,9 +7552,8 @@ insn_live_p (insn, counts)
/* Return true if libcall is dead as a whole. */ /* Return true if libcall is dead as a whole. */
static bool static bool
dead_libcall_p (insn, counts) dead_libcall_p (insn)
rtx insn; rtx insn;
int *counts;
{ {
rtx note; rtx note;
/* See if there's a REG_EQUAL note on this insn and try to /* See if there's a REG_EQUAL note on this insn and try to
...@@ -7616,7 +7619,6 @@ delete_trivially_dead_insns (insns, nreg, preserve_basic_blocks) ...@@ -7616,7 +7619,6 @@ delete_trivially_dead_insns (insns, nreg, preserve_basic_blocks)
for (; insn; insn = prev) for (; insn; insn = prev)
{ {
int live_insn = 0; int live_insn = 0;
rtx note;
prev = prev_real_insn (insn); prev = prev_real_insn (insn);
...@@ -7629,7 +7631,7 @@ delete_trivially_dead_insns (insns, nreg, preserve_basic_blocks) ...@@ -7629,7 +7631,7 @@ delete_trivially_dead_insns (insns, nreg, preserve_basic_blocks)
{ {
in_libcall = 1; in_libcall = 1;
live_insn = 1; live_insn = 1;
dead_libcall = dead_libcall_p (insn, counts); dead_libcall = dead_libcall_p (insn);
} }
else if (in_libcall) else if (in_libcall)
live_insn = ! dead_libcall; live_insn = ! dead_libcall;
...@@ -7656,7 +7658,6 @@ delete_trivially_dead_insns (insns, nreg, preserve_basic_blocks) ...@@ -7656,7 +7658,6 @@ delete_trivially_dead_insns (insns, nreg, preserve_basic_blocks)
for (bb = BASIC_BLOCK (i), insn = bb->end; insn != bb->head; insn = prev) for (bb = BASIC_BLOCK (i), insn = bb->end; insn != bb->head; insn = prev)
{ {
int live_insn = 0; int live_insn = 0;
rtx note;
prev = PREV_INSN (insn); prev = PREV_INSN (insn);
if (!INSN_P (insn)) if (!INSN_P (insn))
...@@ -7671,7 +7672,7 @@ delete_trivially_dead_insns (insns, nreg, preserve_basic_blocks) ...@@ -7671,7 +7672,7 @@ delete_trivially_dead_insns (insns, nreg, preserve_basic_blocks)
{ {
in_libcall = 1; in_libcall = 1;
live_insn = 1; live_insn = 1;
dead_libcall = dead_libcall_p (insn, counts); dead_libcall = dead_libcall_p (insn);
} }
else if (in_libcall) else if (in_libcall)
live_insn = ! dead_libcall; live_insn = ! dead_libcall;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment