public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* recog.c apply_change_group ret zero if num_changes is 0.
@ 2002-07-13 13:11 Graham Stott
  2002-07-17  0:07 ` Richard Henderson
  0 siblings, 1 reply; 2+ messages in thread
From: Graham Stott @ 2002-07-13 13:11 UTC (permalink / raw)
  To: gcc-patches

All,

I noticed that if apply_change_group is called and num_changes is zero
then 1 is returned. I think it makes more sense to return 0 if no
changes are outstanding.

Bootstrapped i686-pc-linux-gnu all languages including ada no regressions.

ChangeLog

	* recog.c (apply_change_group): Return zero if no changes.

Graham

-------------------------------------------------------------------
Index: gcc/recog.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/recog.c,v
retrieving revision 1.160
diff -c -p -r1.160 recog.c
*** gcc/recog.c 28 Jun 2002 15:43:53 -0000      1.160
--- gcc/recog.c 13 Jul 2002 12:19:25 -0000
*************** apply_change_group ()
*** 317,322 ****
--- 317,326 ----
     int i;
     rtx last_validated = NULL_RTX;

+   /* If no changes return zero.  */
+   if (num_changes == 0)
+     return 0;
+
     /* The changes have been applied and all INSN_CODEs have been reset to force
        rerecognition.

----------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: recog.c apply_change_group ret zero if num_changes is 0.
  2002-07-13 13:11 recog.c apply_change_group ret zero if num_changes is 0 Graham Stott
@ 2002-07-17  0:07 ` Richard Henderson
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2002-07-17  0:07 UTC (permalink / raw)
  To: Graham Stott; +Cc: gcc-patches

On Sat, Jul 13, 2002 at 07:45:18PM +0100, Graham Stott wrote:
> I noticed that if apply_change_group is called and num_changes is zero
> then 1 is returned. I think it makes more sense to return 0 if no
> changes are outstanding.

Possibly, possibly not.  It is true that all substitutions
were successful, which might be important to some pass that
may or may not remember whether or not it made changes while
determining if some (larger) change is possible.

What is this supposed to affect?


r~

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-07-17  5:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-13 13:11 recog.c apply_change_group ret zero if num_changes is 0 Graham Stott
2002-07-17  0:07 ` Richard Henderson

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).