Commit 65e9fa10 by Kazu Hirata Committed by Kazu Hirata

* cse.c (delete_trivially_dead_insn): Don't iterate.

From-SVN: r94498
parent 0530bc70
2005-01-31 Kazu Hirata <kazu@cs.umass.edu>
* cse.c (delete_trivially_dead_insn): Don't iterate.
2005-01-31 Andrew Pinski <pinskia@physics.uc.edu> 2005-01-31 Andrew Pinski <pinskia@physics.uc.edu>
* config/rs6000/rs6000.md (copysignsf3): New expand. * config/rs6000/rs6000.md (copysignsf3): New expand.
......
...@@ -7268,7 +7268,7 @@ delete_trivially_dead_insns (rtx insns, int nreg) ...@@ -7268,7 +7268,7 @@ delete_trivially_dead_insns (rtx insns, int nreg)
int *counts; int *counts;
rtx insn, prev; rtx insn, prev;
int in_libcall = 0, dead_libcall = 0; int in_libcall = 0, dead_libcall = 0;
int ndead = 0, nlastdead, niterations = 0; int ndead = 0;
timevar_push (TV_DELETE_TRIVIALLY_DEAD); timevar_push (TV_DELETE_TRIVIALLY_DEAD);
/* First count the number of times each register is used. */ /* First count the number of times each register is used. */
...@@ -7276,10 +7276,6 @@ delete_trivially_dead_insns (rtx insns, int nreg) ...@@ -7276,10 +7276,6 @@ delete_trivially_dead_insns (rtx insns, int nreg)
for (insn = next_real_insn (insns); insn; insn = next_real_insn (insn)) for (insn = next_real_insn (insns); insn; insn = next_real_insn (insn))
count_reg_usage (insn, counts, 1); count_reg_usage (insn, counts, 1);
do
{
nlastdead = ndead;
niterations++;
/* Go from the last insn to the first and delete insns that only set unused /* Go from the last insn to the first and delete insns that only set unused
registers or copy a register to itself. As we delete an insn, remove registers or copy a register to itself. As we delete an insn, remove
usage counts for registers it uses. usage counts for registers it uses.
...@@ -7329,12 +7325,10 @@ delete_trivially_dead_insns (rtx insns, int nreg) ...@@ -7329,12 +7325,10 @@ delete_trivially_dead_insns (rtx insns, int nreg)
dead_libcall = 0; dead_libcall = 0;
} }
} }
}
while (ndead != nlastdead);
if (dump_file && ndead) if (dump_file && ndead)
fprintf (dump_file, "Deleted %i trivially dead insns; %i iterations\n", fprintf (dump_file, "Deleted %i trivially dead insns\n",
ndead, niterations); ndead);
/* Clean up. */ /* Clean up. */
free (counts); free (counts);
timevar_pop (TV_DELETE_TRIVIALLY_DEAD); timevar_pop (TV_DELETE_TRIVIALLY_DEAD);
......
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