* patch for update_flow_info REG_WAS_0
@ 1998-02-12 18:02 Joern Rennecke
1998-02-13 2:04 ` Jeffrey A Law
0 siblings, 1 reply; 4+ messages in thread
From: Joern Rennecke @ 1998-02-12 18:02 UTC (permalink / raw)
To: law, wilson; +Cc: egcs
update_flow_info tried in vain to find the new setter for a (mem:DI ...
value after this was split into two memory accesses...
Fri Feb 13 00:25:02 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
* sched.c (update_flow_info, REG_WAS_0): Ignore if setting insn
was deleted.
Index: sched.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/sched.c,v
retrieving revision 1.120
diff -p -r1.120 sched.c
*** sched.c 1998/02/06 08:35:42 1.120
--- sched.c 1998/02/13 00:28:12
***************
*** 1,5 ****
/* Instruction scheduling pass.
! Copyright (C) 1992, 93-96, 1997 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
Enhanced by, and currently maintained by, Jim Wilson (wilson@cygnus.com)
--- 1,5 ----
/* Instruction scheduling pass.
! Copyright (C) 1992, 93-97, 1998 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
Enhanced by, and currently maintained by, Jim Wilson (wilson@cygnus.com)
*************** update_flow_info (notes, first, last, or
*** 3854,3859 ****
--- 3854,3867 ----
break;
case REG_WAS_0:
+ /* If the insn that set the register to 0 was deleted, this
+ note cannot be relied on any longer. The destination might
+ even have been moved to memory.
+ This was observed for SH4 with execute/920501-6.c compilation,
+ -O2 -fomit-frame-pointer -finline-functions . */
+ if (GET_CODE (XEXP (note, 0)) == NOTE
+ || INSN_DELETED_P (XEXP (note, 0)))
+ break;
/* This note applies to the dest of the original insn. Find the
first new insn that now has the same dest, and move the note
there. */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: patch for update_flow_info REG_WAS_0
1998-02-12 18:02 patch for update_flow_info REG_WAS_0 Joern Rennecke
@ 1998-02-13 2:04 ` Jeffrey A Law
1998-02-13 2:16 ` Joern Rennecke
0 siblings, 1 reply; 4+ messages in thread
From: Jeffrey A Law @ 1998-02-13 2:04 UTC (permalink / raw)
To: Joern Rennecke; +Cc: wilson, egcs
In message < 199802130030.AAA24740@phal.cygnus.co.uk >you write:
> update_flow_info tried in vain to find the new setter for a (mem:DI ...
> value after this was split into two memory accesses...
>
> Fri Feb 13 00:25:02 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
>
> * sched.c (update_flow_info, REG_WAS_0): Ignore if setting insn
> was deleted.
One might argue that the note should have been removed when the
insn was deleted. Can you look into that?
jeff
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: patch for update_flow_info REG_WAS_0
1998-02-13 2:04 ` Jeffrey A Law
@ 1998-02-13 2:16 ` Joern Rennecke
1998-02-13 10:31 ` Jeffrey A Law
0 siblings, 1 reply; 4+ messages in thread
From: Joern Rennecke @ 1998-02-13 2:16 UTC (permalink / raw)
To: law; +Cc: amylaar, wilson, egcs
> One might argue that the note should have been removed when the
> insn was deleted. Can you look into that?
I first looked at the REG_WAS_0 description in rtl.texi. It appears that
is a known fact that the insn might be deleted. So I presume that that's
OK, and we have to deal with it.
@findex REG_WAS_0
@item REG_WAS_0
The single output of this insn contained zero before this insn.
@var{op} is the insn that set it to zero. You can rely on this note if
it is present and @var{op} has not been deleted or turned into a @code{note};
its absence implies nothing.
@end table
These notes describe linkages between insns. They occur in pairs: one
insn has one of a pair of notes that points to a second insn, which has
the inverse note pointing back to the first insn.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: patch for update_flow_info REG_WAS_0
1998-02-13 2:16 ` Joern Rennecke
@ 1998-02-13 10:31 ` Jeffrey A Law
0 siblings, 0 replies; 4+ messages in thread
From: Jeffrey A Law @ 1998-02-13 10:31 UTC (permalink / raw)
To: Joern Rennecke; +Cc: wilson, egcs
In message < 199802131014.KAA10625@phal.cygnus.co.uk >you write:
> > One might argue that the note should have been removed when the
> > insn was deleted. Can you look into that?
>
> I first looked at the REG_WAS_0 description in rtl.texi. It appears that
> is a known fact that the insn might be deleted. So I presume that that's
> OK, and we have to deal with it.
Ok. Thanks.
In that case your patch is the right way to go. Please install
it into sched.c and haifa-sched.c.
jeff
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1998-02-13 10:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-02-12 18:02 patch for update_flow_info REG_WAS_0 Joern Rennecke
1998-02-13 2:04 ` Jeffrey A Law
1998-02-13 2:16 ` Joern Rennecke
1998-02-13 10:31 ` Jeffrey A Law
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).