public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* PR 7409/Loop optimization bug patch
@ 2002-07-25 11:18 Hartmut Penner
  0 siblings, 0 replies; only message in thread
From: Hartmut Penner @ 2002-07-25 11:18 UTC (permalink / raw)
  To: mark, gcc-patches; +Cc: uweigand

A proposed patch for problem described in PR7409 is appended here.
The problem was, that the usage of a register as a parameter was not taken
into acount in the function find_single_use_in_loop.

Index: loop.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/loop.c,v
retrieving revision 1.389.2.7
diff -u -r1.389.2.7 loop.c
--- loop.c      15 Jun 2002 01:12:04 -0000      1.389.2.7
+++ loop.c      25 Jul 2002 17:41:28 -0000
@@ -3448,6 +3448,19 @@
   const char *fmt = GET_RTX_FORMAT (code);
   int i, j;

+  if (x == PATTERN (insn) && GET_CODE (insn) == CALL_INSN)
+    {
+      rtx link;
+      for (link = CALL_INSN_FUNCTION_USAGE (insn); link; link = XEXP (link, 1))
+       {
+         rtx op, reg;
+
+         if (GET_CODE (op = XEXP (link, 0)) == USE
+             && GET_CODE (reg = XEXP (op, 0)) == REG)
+           regs->array[REGNO (reg)].single_usage = const0_rtx;
+       }
+    }
+
   if (code == REG)
     regs->array[REGNO (x)].single_usage
       = (regs->array[REGNO (x)].single_usage != 0



Mit freundlichem Gruß / Best regards,

Hartmut Penner
GCC for S/390 Development


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-07-25 17:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-25 11:18 PR 7409/Loop optimization bug patch Hartmut Penner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).