public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Some Haifa scheduler bugs
@ 1997-09-04 11:27 meissner
  0 siblings, 0 replies; 31+ messages in thread
From: meissner @ 1997-09-04 11:27 UTC (permalink / raw)
  To: burley, law; +Cc: egcs

Note if people are going to use -fsched-spec-load-dangerous, I think there are
bugs in the current Haifa code.  I originally enabled it in the AIX port when
I was first testing haifa years ago, and eventually removed setting it, since
it was assuming all loads could be done speculatively, when it should have
only optimized things like:

	p != NULL && *p

(either that or somebody changed the default until AIX so that page 0 was
no longer mapped by default -- it was quite some time ago).

^ permalink raw reply	[flat|nested] 31+ messages in thread
[parent not found: <Pine.SOL.3.90.970826141030.2901K-100000@maigret.informatik.rwth-aachen.de>]
* Re: Some Haifa scheduler bugs
@ 1997-08-26 14:34 Bernd Schmidt
  0 siblings, 0 replies; 31+ messages in thread
From: Bernd Schmidt @ 1997-08-26 14:34 UTC (permalink / raw)
  To: egcs

> 
> So, how about this:
> 
> static rtx
> move_insn (insn, last)
>      rtx insn, last;
> {
>   while (SCHED_GROUP_P (insn))
>     {
>       rtx prev = PREV_INSN (insn);
>       move_insn1 (insn, last);
>       reemit_notes (insn, insn);
>       insn = prev;
>     }
> 
>   move_insn1 (insn, last);
>   return reemit_notes (insn, insn);
> }

I think you won't get the right return value. You want to return the
last insn in a SCHED_GROUP or a note that was placed after it.
I had my reasons to use two loops ;)

The whole affair with SCHED_GROUP_P is extremely messy. How about using
extra data structures that describe which insns to schedule together,
which notes to put before them, and the dependencies between them,
instead of trying to encode it all in the RTL with the confusion that
results?
If you don't want that, changing the meaning of SCHED_GROUP_P for the
Haifa scheduler so that it is set if the _following_ insn must be
scheduled together with an insn might make the code clearer. I think it
would fit in better with the fact that Haifa schedules forward. I didn't
try it, though; maybe there are problems with that approach, too.

Bernd

^ permalink raw reply	[flat|nested] 31+ messages in thread
* Re: Building of generated parser files
@ 1997-08-22 13:53 Andreas Schwab
  1997-08-22 15:02 ` Some Haifa scheduler bugs Jeffrey A Law
  1997-08-22 15:24 ` Jeffrey A Law
  0 siblings, 2 replies; 31+ messages in thread
From: Andreas Schwab @ 1997-08-22 13:53 UTC (permalink / raw)
  To: egcs

Niklas Hallqvist <niklas@petra.appli.se> writes:

|> Ok I dived into doing the stuff I proposed some hours ago.  To me it
|> seems like a way to go generally in GNU sw.  I enclose a patch below
|> that shows the ideas.  I only handle the --with-makeinfo switch as
|> this is more of a proof of concept than anything else.  Similar
|> patches can be made for --with-bison, --with-texi2dvi, etc.

|> Comments?

|> Niklas

|> Index: configure.in
|> ===================================================================
|> RCS file: /l/cvs/egcs/configure.in,v
|> retrieving revision 1.1.1.1
|> diff -u -r1.1.1.1 configure.in
|> --- configure.in	1997/08/22 08:53:13	1.1.1.1
|> +++ configure.in	1997/08/22 09:52:09
|> @@ -44,6 +44,12 @@
|>  gas=yes,
|>  gas=no)
 
|> +# With GNU makeinfo
|> +AC_ARG_WITH(makeinfo,
|> +[  --with-makeinfo         arrange to work with GNU makeinfo.],
|> +makeinfo=yes,

This should be `makeinfo=$withval', perhaps verifying first that $withval
is one of yes|no.  Otherwise you get surprising results when you say
--without-makeinfo or --with-makeinfo=no

Andreas.

^ permalink raw reply	[flat|nested] 31+ messages in thread
* Re: Building of generated parser files
@ 1997-08-22 10:48 Niklas Hallqvist
  1997-08-22 13:28 ` Some Haifa scheduler bugs Bernd Schmidt
  0 siblings, 1 reply; 31+ messages in thread
From: Niklas Hallqvist @ 1997-08-22 10:48 UTC (permalink / raw)
  To: egcs

Ok I dived into doing the stuff I proposed some hours ago.  To me it
seems like a way to go generally in GNU sw.  I enclose a patch below
that shows the ideas.  I only handle the --with-makeinfo switch as
this is more of a proof of concept than anything else.  Similar
patches can be made for --with-bison, --with-texi2dvi, etc.

Comments?

Niklas

Index: configure.in
===================================================================
RCS file: /l/cvs/egcs/configure.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 configure.in
--- configure.in	1997/08/22 08:53:13	1.1.1.1
+++ configure.in	1997/08/22 09:52:09
@@ -44,6 +44,12 @@
 gas=yes,
 gas=no)
 
+# With GNU makeinfo
+AC_ARG_WITH(makeinfo,
+[  --with-makeinfo         arrange to work with GNU makeinfo.],
+makeinfo=yes,
+makeinfo=no)
+
 # With stabs
 AC_ARG_WITH(stabs,
 [  --with-stabs            arrange to use stabs instead of host debug format.],
@@ -3034,6 +3040,16 @@
     done
 fi
 
+# Customize depending on if we want info files generated or not.
+if [[ x$makeinfo = xyes ]]
+then
+    info_target=info
+    geninfodir=$srcdir
+else
+    info_targer=
+    geninfodir=.
+fi
+
 # Process the language and host/target makefile fragments.
 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
 
@@ -3077,6 +3093,8 @@
 AC_SUBST(maybe_use_collect2)
 AC_SUBST(cc_set_by_configure)
 AC_SUBST(stage_prefix_set_by_configure)
+AC_SUBST(geninfodir)
+AC_SUBST(info_target)
 
 AC_SUBST_FILE(target_overrides)
 AC_SUBST_FILE(host_overrides)
Index: Makefile.in
===================================================================
RCS file: /l/cvs/egcs/Makefile.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile.in
--- Makefile.in	1997/08/22 08:53:04	1.1.1.1
+++ Makefile.in	1997/08/22 10:17:26
@@ -235,6 +235,14 @@
 # Dir for temp files.
 tmpdir = /tmp
 
+# Section controlling generated files that are being shipped in releases.
+# The tools for generating these are not always available, so the building
+# of them should be optional even if they appear out-of-date.
+# Directories where generated files are to be found
+geninfodir = @geninfodir@
+# Targets controlling whether the files should be generated at all.
+info_target = @info_target@
+
 # Additional system libraries to link with.
 CLIB=
 
@@ -1971,15 +1979,17 @@
 #\f
 # Remake the info files.
 
-doc: info
-info: $(srcdir)/cpp.info $(srcdir)/gcc.info lang.info
+doc: $(info_target)
+info: $(geninfodir)/cpp.info $(geninfodir)/gcc.info lang.info
 
-$(srcdir)/cpp.info: cpp.texi
-	cd $(srcdir); $(MAKEINFO) $(MAKEINFOFLAGS) cpp.texi
+$(geninfodir)/cpp.info: cpp.texi
+	cd $(geninfodir); $(MAKEINFO) $(MAKEINFOFLAGS) -P $(srcdir) \
+		$(srcdir)/cpp.texi
 
-$(srcdir)/gcc.info: gcc.texi extend.texi install.texi invoke.texi \
+$(geninfodir)/gcc.info: gcc.texi extend.texi install.texi invoke.texi \
 		md.texi rtl.texi tm.texi gcov.texi
-	cd $(srcdir); $(MAKEINFO) $(MAKEINFOFLAGS) gcc.texi
+	cd $(geninfodir); $(MAKEINFO) $(MAKEINFOFLAGS) -P $(srcdir) \
+		$(srcdir)/gcc.texi
 
 dvi: $(srcdir)/gcc.dvi $(srcdir)/cpp.dvi lang.dvi
 
@@ -1993,8 +2003,8 @@
 	$(TEXI2DVI) $<
 
 $(srcdir)/INSTALL: install1.texi install.texi
-	$(MAKEINFO) -D INSTALLONLY --no-header --no-split \
-	  `echo $(srcdir)/install1.texi | sed 's,^\./,,'`
+	$(MAKEINFO) $(MAKEINFOFLAGS) -D INSTALLONLY --no-header \
+		--no-split `echo $(srcdir)/install1.texi | sed 's,^\./,,'`
 #\f
 # Deletion of files made during compilation.
 # There are four levels of this:
@@ -2244,7 +2254,7 @@
 # Install the info files.
 install-info: doc installdirs lang.install-info
 	-rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
-	cd $(srcdir); for f in cpp.info* gcc.info*; \
+	cd $(geninfodir); for f in cpp.info* gcc.info*; \
 	do $(INSTALL_DATA) $$f $(infodir)/$$f; done
 	-chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info*
 
Index: f/Make-lang.in
===================================================================
RCS file: /l/cvs/egcs/f/Make-lang.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Make-lang.in
--- Make-lang.in	1997/08/22 08:54:50	1.1.1.1
+++ Make-lang.in	1997/08/22 10:22:35
@@ -317,14 +317,17 @@
 f77.start.encap: g77 maybe-f2c
 f77.rest.encap: f77-runtime
 
-f77.info: $(srcdir)/f/g77.info
+f77.info: $(geninfodir)/f/g77.info
 f77.dvi: $(srcdir)/f/g77.dvi
 
 # g77 documentation.
-$(srcdir)/f/g77.info: f/g77.texi f/bugs.texi f/install.texi f/news.texi f/intdoc.texi
-	cd $(srcdir)/f; $(MAKEINFO) g77.texi
+$(geninfodir)/f/g77.info: f/g77.texi f/bugs.texi f/install.texi f/news.texi \
+  f/intdoc.texi
+	$(MAKEINFO) $(MAKEINFOFLAGS) -P $(srcdir)/f \
+		-o $(geninfodir)/f/g77.info $(srcdir)/f/g77.texi
 
-$(srcdir)/f/g77.dvi: f/g77.texi f/bugs.texi f/install.texi f/news.texi f/intdoc.texi
+$(srcdir)/f/g77.dvi: f/g77.texi f/bugs.texi f/install.texi f/news.texi \
+  f/intdoc.texi
 	cd $(srcdir)/f; $(TEXI2DVI) g77.texi
 
 $(srcdir)/f/intdoc.texi: f/intdoc.c f/intdoc.h f/intrin.def f/intrin.h
@@ -333,17 +336,20 @@
 	f/intdoc > $(srcdir)/f/intdoc.texi
 	rm f/intdoc
 
-$(srcdir)/f/BUGS: f/bugs0.texi f/bugs.texi
-	cd $(srcdir)/f; $(MAKEINFO) -D BUGSONLY --no-header --no-split \
-	  --no-validate bugs0.texi -o BUGS
-
-$(srcdir)/f/INSTALL: f/install0.texi f/install.texi
-	cd $(srcdir)/f; $(MAKEINFO) -D INSTALLONLY --no-header --no-split \
-	  --no-validate install0.texi -o INSTALL
-
-$(srcdir)/f/NEWS: f/news0.texi f/news.texi
-	cd $(srcdir)/f; $(MAKEINFO) -D NEWSONLY --no-header --no-split \
-	  --no-validate news0.texi -o NEWS
+$(geninfodir)/f/BUGS: f/bugs0.texi f/bugs.texi
+	cd $(geninfodir)/f; $(MAKEINFO) $(MAKEINFOFLAGS) -P $(srcdir)/f \
+		-D BUGSONLY --no-header --no-split --no-validate \
+		$(srcdir)/f/bugs0.texi -o BUGS
+
+$(geninfodir)/f/INSTALL: f/install0.texi f/install.texi
+	cd $(geninfodir)/f; $(MAKEINFO) $(MAKEINFOFLAGS)  -P $(srcdir)/f \
+		-D INSTALLONLY --no-header --no-split --no-validate \
+		$(srcdir)/f/install0.texi -o INSTALL
+
+$(geninfodir)/f/NEWS: f/news0.texi f/news.texi
+	cd $(geninfodir)/f; $(MAKEINFO) $(MAKEINFOFLAGS)  -P $(srcdir)/f \
+		-D NEWSONLY --no-header --no-split --no-validate \
+		$(srcdir)/f/news0.texi -o NEWS
 
 $(srcdir)/f/runtime/configure: $(srcdir)/f/runtime/configure.in 
 	cd f/runtime && $(MAKE) srcdir=../../$(srcdir)/f/runtime -f ../../$(srcdir)/f/runtime/Makefile.in rebuilt
@@ -437,7 +443,7 @@
 
 f77.install-info:
 	-rm -f $(infodir)/g77.info*
-	cd $(srcdir)/f; for f in g77.info*; \
+	cd $(geninfodir)/f; for f in g77.info*; \
 	do $(INSTALL_DATA) $$f $(infodir)/$$f; done
 	-chmod a-x $(infodir)/g77.info*
 

^ permalink raw reply	[flat|nested] 31+ messages in thread
* Re: Problems on PowerPC...
@ 1997-08-21 16:51 David Edelsohn
  1997-08-21 17:43 ` Some Haifa scheduler bugs Jeffrey A Law
  0 siblings, 1 reply; 31+ messages in thread
From: David Edelsohn @ 1997-08-21 16:51 UTC (permalink / raw)
  To: egcs

>>>>> David McWherter writes:

David> I dunno if they're C++ constructors, but a function pointer from
David> __CTOR_LIST__ is being picked off and run by __do_global_ctors_aux() when
David> I compile with egcs.  When I compile genattr with my standard gcc, it
David> doesn't do so.  The egcs-compiled genattr dies because the pointer it
David> picks out from __CTOR_LIST__ is a pointer to a block of illegal
David> instructions, and a SIGILL is generated.
 
David> I dunno.  My standard-gcc-built code seems to have empty __CTOR_LIST__'s,
David> but the egcs stuff has something there.

	All of the various Linux for PowerPC use SVR4 which has init and
fini object file sections.  Something is ending up in the __CTOR_LIST__
when using egcs that should not be present (genattr and obstack.o are pure
C, not C++: no constructors exist).  I would assume that something in the
rs6000/sysv4.h configuration distributed in the pax files on linuxppc.org
has not made it back to the FSF sources on which egcs is based.

David

^ permalink raw reply	[flat|nested] 31+ messages in thread
* Re: egcs repository
@ 1997-08-21 15:20 Joel Sherrill
  1997-08-21 15:47 ` Some Haifa scheduler bugs Bernd Schmidt
  0 siblings, 1 reply; 31+ messages in thread
From: Joel Sherrill @ 1997-08-21 15:20 UTC (permalink / raw)
  To: egcs

On 20 Aug 1997, Jason Merrill wrote:

> >>>>> Jeffrey A Law <law@hurl.cygnus.com> writes:
> 
> >   In message <199708192228.PAA28350@yorick.cygnus.com>you write:
> >> Seems to me that egcs should be one more directory down, so we can add
> >> libstdc++ et al to the toplevel directory (and eventually move libF77
> >> there, too).
> 
> > I've got no problems with that...
> 
> > Or maybe make gcc a subdir of egcs.  Who knows...
> 
> I don't feel strongly either way.  Does anyone else?  I'm figuring we can
> just use the Cygnus toplevel directory stuff as seen in gdb et al.

If this is what is referred to as the "one-tree" build in the crossgcc
world, then I am personally all for it.  This is a big step in the right
direction to address gcc support library and include file build
order problems.

--joel

^ permalink raw reply	[flat|nested] 31+ messages in thread
* Re: Some Haifa scheduler bugs
@ 1997-08-19 19:00 Jeffrey A Law
  0 siblings, 0 replies; 31+ messages in thread
From: Jeffrey A Law @ 1997-08-19 19:00 UTC (permalink / raw)
  To: egcs

  In message <Pine.SOL.3.90.970819092828.291B-100000@starsky.informatik.rwth-aa
chen.de>you write:
  > 	* haifa-sched.c (target_bb, bbset_size, dom, prob, rgn_nr_edges,
  > 	rgn_edges, edgeset_size, edge_to_bit, pot_split, ancestor_edges):
  > 	Make static.
I've already got these installed into egcs, plus some others that
you didn't make static.

  > 	(move_insn): Call reemit_notes for every insn in a SCHED_GROUP.
See my last message -- that's the code I'm running right now.  If it
doesn't work, let me know and we can iterate to a solution.

  > 	(schedule_block): When checking whether an insn is the 
  > 	basic_block_head of a different block, use the first insn in the
  > 	same SCHED_GROUP instead of the insn itself.
Done.  Slightly differently, but should be functionally equivalent
and a little clearer to someone who might read the code later.


  > 	(debug_dependencies): GET_RTX_NAME takes an rtx code, not an rtx.
Done.

Jeff

^ permalink raw reply	[flat|nested] 31+ messages in thread
* Re: Some Haifa scheduler bugs
@ 1997-08-19 17:54 Jeffrey A Law
  0 siblings, 0 replies; 31+ messages in thread
From: Jeffrey A Law @ 1997-08-19 17:54 UTC (permalink / raw)
  To: egcs

  In message <Pine.SOL.3.90.970819092828.291B-100000@starsky.informatik.rwth-aa
chen.de>you write:
  > I've run c-torture on the egcs snapshot, using the Haifa scheduler with
  > all flags turned on. My system is an i586-linux one. Here's a patch to fix
  > some of the failures.
Thanks.

Just some comments:

  * Get a copyright assignment + disclaimer signed and sent to
  the FSF as soon as possible.  Until that time we can't take any
  of your patches and include them without rewriting them first.

  * When submitting patches, send separate patches for bugs from
  random cleanups.  The cleanups are greatly appreciated, especially
  for haifa.

  * When submitting bugfix patches, please submit a testcase, or
  refer us to a c-torture testcase and the options needed to expose
  the bug.


Specific questions/comments:

In move_insn, is there some reason why you can't call reemit_notes
during the loop on SCHED_GROUP_P insns?

ie, does this work instead?  Seems cleaner than using another loop
if it works.

{
  rtx new_last = insn;

  while (SCHED_GROUP_P (insn))
    {
      rtx prev = PREV_INSN (insn);
      move_insn1 (insn, last);
      reemit_notes (insn, insn);
      insn = prev;
    }

  move_insn1 (insn, last);
  return reemit_notes (new_last, new_last);
}

[ Of course if you had referred us to a testcase, we could check
  this ourselves.... ]

Jeff

^ permalink raw reply	[flat|nested] 31+ messages in thread
* Re: egcs: A new compiler project to merge the existing GCC forks (fwd)
@ 1997-08-19  7:36 Robert Wilhelm
  1997-08-19  9:34 ` Some Haifa scheduler bugs Bernd Schmidt
  0 siblings, 1 reply; 31+ messages in thread
From: Robert Wilhelm @ 1997-08-19  7:36 UTC (permalink / raw)
  To: egcs

> 
> Can someone point me the location of mdbench?
>

http://www.sissa.it/furio/Mdbnch/info.html

Robert

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

end of thread, other threads:[~1997-09-06  5:19 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <Pine.SOL.3.90.970826140826.2901J-100000@maigret.informatik.rwth-aachen.de>
1997-09-01 20:33 ` Some Haifa scheduler bugs Jeffrey A Law
1997-09-03  9:30   ` Bernd Schmidt
1997-09-03  9:37     ` Jeffrey A Law
1997-09-03  9:44       ` Bernd Schmidt
1997-09-03 10:07         ` Jeffrey A Law
1997-09-05  7:15           ` Bernd Schmidt
1997-09-05  7:55             ` Jeffrey A Law
1997-09-05  8:33             ` Ian Lance Taylor
1997-09-03 11:58       ` Jim Wilson
1997-09-04  1:16         ` regparm & other gcc bug Martynas Kunigelis
1997-09-05  9:29           ` Kamil Iskra
1997-09-06  5:19             ` Martynas Kunigelis
1997-09-03 11:39     ` Some Haifa scheduler bugs Paul Koning
1997-09-03 11:50       ` David Edelsohn
1997-09-03 13:13       ` Richard Henderson
1997-09-03 13:19       ` Jeffrey A Law
1997-09-04  9:33         ` Craig Burley
1997-09-04 11:12           ` Jeffrey A Law
1997-09-04 11:33             ` David S. Miller
1997-09-04 14:38               ` David Edelsohn
1997-09-04 11:27 meissner
     [not found] <Pine.SOL.3.90.970826141030.2901K-100000@maigret.informatik.rwth-aachen.de>
1997-09-01 20:42 ` Jeffrey A Law
  -- strict thread matches above, loose matches on Subject: below --
1997-08-26 14:34 Bernd Schmidt
1997-08-22 13:53 Building of generated parser files Andreas Schwab
1997-08-22 15:02 ` Some Haifa scheduler bugs Jeffrey A Law
1997-08-22 15:24 ` Jeffrey A Law
1997-08-22 10:48 Building of generated parser files Niklas Hallqvist
1997-08-22 13:28 ` Some Haifa scheduler bugs Bernd Schmidt
1997-08-21 16:51 Problems on PowerPC David Edelsohn
1997-08-21 17:43 ` Some Haifa scheduler bugs Jeffrey A Law
1997-08-21 15:20 egcs repository Joel Sherrill
1997-08-21 15:47 ` Some Haifa scheduler bugs Bernd Schmidt
1997-08-19 19:00 Jeffrey A Law
1997-08-19 17:54 Jeffrey A Law
1997-08-19  7:36 egcs: A new compiler project to merge the existing GCC forks (fwd) Robert Wilhelm
1997-08-19  9:34 ` Some Haifa scheduler bugs Bernd Schmidt

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