This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] reload1.c: Very minor speedup.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 06 Feb 2004 17:10:33 -0500 (EST)
- Subject: [patch] reload1.c: Very minor speedup.
Hi,
Attached is a patch to micro-optimize the reset of can_eliminate in
reload1.c.
It would be nice if the if-conversion pass could take care of this.
Bootstrapped on i686-pc-linux-gnu. Committed as obvious.
Kazu Hirata
2004-02-06 Kazu Hirata <kazu@cs.umass.edu>
* reload1.c (check_eliminable_occurrences): Optimize the reset
of can_eliminate.
(eliminate_regs_in_insn): Likewise.
Index: reload1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/reload1.c,v
retrieving revision 1.426
diff -u -p -r1.426 reload1.c
--- reload1.c 6 Feb 2004 05:58:11 -0000 1.426
+++ reload1.c 6 Feb 2004 22:06:34 -0000
@@ -2834,7 +2834,7 @@ check_eliminable_occurrences (rtx x)
struct elim_table *ep;
for (ep = reg_eliminate; ep < ®_eliminate[NUM_ELIMINABLE_REGS]; ep++)
- if (ep->from_rtx == x && ep->can_eliminate)
+ if (ep->from_rtx == x)
ep->can_eliminate = 0;
return;
}
@@ -3100,7 +3100,7 @@ eliminate_regs_in_insn (rtx insn, int re
eliminate this reg. */
for (ep = reg_eliminate; ep < ®_eliminate[NUM_ELIMINABLE_REGS];
ep++)
- if (ep->from_rtx == orig_operand[i] && ep->can_eliminate)
+ if (ep->from_rtx == orig_operand[i])
ep->can_eliminate = 0;
}