public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Fails for SPEC2006 using -O3 -ftree-parallelize-loops
@ 2007-12-15  4:17 Sebastian Pop
  2007-12-15  4:45 ` Sebastian Pop
  2007-12-15 10:46 ` Jakub Jelinek
  0 siblings, 2 replies; 3+ messages in thread
From: Sebastian Pop @ 2007-12-15  4:17 UTC (permalink / raw)
  To: gcc. gcc. gnu. org

Hi,

I've run a build for spec cpu2006 with -O3 -ftree-parallelize-loops=16
and interestingly there were some fails that I will investigate later.
So I'm just reporting these, and asking for somebody who could fix
the link options for autopar.  I'm attaching a patch, not sure it will build.
Before going in the depths of the build machinery, I'm asking if
somebody could help with this.

Benchmarks ICEing:
400.perlbench
401.bzip2
403.gcc
445.gobmk
456.hmmer
458.sjeng
462.libquantum
464.h264ref
471.omnetpp
473.astar
483.xalancbmk
416.gamess
434.zeusmp
435.gromacs
436.cactusADM
437.leslie3d
444.namd
447.dealII
453.povray
454.calculix
459.GemsFDTD
465.tonto
470.lbm
481.wrf
482.sphinx3

Not ICEing, but failing on the link step, can't find the libgomp functions:
429.mcf
433.milc
450.soplex

For these a patch like this would be needed to automatically link the
gomp and pthread libs.

Index: gcc.c
===================================================================
--- gcc.c	(revision 130927)
+++ gcc.c	(working copy)
@@ -721,6 +721,7 @@ proper position among the other output f
     %(linker) %l " LINK_PIE_SPEC "%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\
     %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
     %{static:} %{L*} %(mfwrap) %(link_libgcc) %o\
+    %{ftree-parallelize-loops=:%:include(libgomp.spec)%(link_gomp)}\
     %{fopenmp:%:include(libgomp.spec)%(link_gomp)} %(mflib)\
     %{fprofile-arcs|fprofile-generate|coverage:-lgcov}\
     %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\
@@ -873,8 +874,13 @@ static const char *const multilib_defaul
 #define GOMP_SELF_SPECS "%{fopenmp: -pthread}"
 #endif

+#ifndef PARLOOPS_SELF_SPECS
+#define PARLOOPS_SELF_SPECS "%{ftree-parallelize-loops=: -pthread}"
+#endif
+
+
 static const char *const driver_self_specs[] = {
-  DRIVER_SELF_SPECS, GOMP_SELF_SPECS
+  DRIVER_SELF_SPECS, GOMP_SELF_SPECS, PARLOOPS_SELF_SPECS
 };

 #ifndef OPTION_DEFAULT_SPECS


-- 
Sebastian
AMD - GNU Tools

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

* Re: Fails for SPEC2006 using -O3 -ftree-parallelize-loops
  2007-12-15  4:17 Fails for SPEC2006 using -O3 -ftree-parallelize-loops Sebastian Pop
@ 2007-12-15  4:45 ` Sebastian Pop
  2007-12-15 10:46 ` Jakub Jelinek
  1 sibling, 0 replies; 3+ messages in thread
From: Sebastian Pop @ 2007-12-15  4:45 UTC (permalink / raw)
  To: gcc. gcc. gnu. org

> I've run a build for spec cpu2006 with -O3 -ftree-parallelize-loops=16

This is on amd64-linux.

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

* Re: Fails for SPEC2006 using -O3 -ftree-parallelize-loops
  2007-12-15  4:17 Fails for SPEC2006 using -O3 -ftree-parallelize-loops Sebastian Pop
  2007-12-15  4:45 ` Sebastian Pop
@ 2007-12-15 10:46 ` Jakub Jelinek
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Jelinek @ 2007-12-15 10:46 UTC (permalink / raw)
  To: Sebastian Pop; +Cc: gcc

On Fri, Dec 14, 2007 at 10:12:11PM -0600, Sebastian Pop wrote:
> I've run a build for spec cpu2006 with -O3 -ftree-parallelize-loops=16
> and interestingly there were some fails that I will investigate later.
> So I'm just reporting these, and asking for somebody who could fix
> the link options for autopar.  I'm attaching a patch, not sure it will build.
> Before going in the depths of the build machinery, I'm asking if
> somebody could help with this.

There is a bunch of -ftree-parallelize-loops ICEs in gcc bugzilla already.

> For these a patch like this would be needed to automatically link the
> gomp and pthread libs.
> 
> Index: gcc.c
> ===================================================================
> --- gcc.c	(revision 130927)
> +++ gcc.c	(working copy)
> @@ -721,6 +721,7 @@ proper position among the other output f
>      %(linker) %l " LINK_PIE_SPEC "%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\
>      %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
>      %{static:} %{L*} %(mfwrap) %(link_libgcc) %o\
> +    %{ftree-parallelize-loops=:%:include(libgomp.spec)%(link_gomp)}\
>      %{fopenmp:%:include(libgomp.spec)%(link_gomp)} %(mflib)\
>      %{fprofile-arcs|fprofile-generate|coverage:-lgcov}\
>      %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\

This should be:
-    %{fopenmp:%:include(libgomp.spec)%(link_gomp)} %(mflib)\
+    %{fopenmp|ftree-parallelize-loops=:%:include(libgomp.spec)%(link_gomp)} %(mflib)\

instead, so that for -fopenmp -ftree-parallelize-loops=4 you don't get it
duplicated on the link line.

> @@ -873,8 +874,13 @@ static const char *const multilib_defaul
>  #define GOMP_SELF_SPECS "%{fopenmp: -pthread}"
>  #endif
> 
> +#ifndef PARLOOPS_SELF_SPECS
> +#define PARLOOPS_SELF_SPECS "%{ftree-parallelize-loops=: -pthread}"
> +#endif
> +
> +
>  static const char *const driver_self_specs[] = {
> -  DRIVER_SELF_SPECS, GOMP_SELF_SPECS
> +  DRIVER_SELF_SPECS, GOMP_SELF_SPECS, PARLOOPS_SELF_SPECS
>  };

The same, just add |ftree-parallelize-loops= into GOMP_SELF_SPECS.

	Jakub

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

end of thread, other threads:[~2007-12-15  9:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-15  4:17 Fails for SPEC2006 using -O3 -ftree-parallelize-loops Sebastian Pop
2007-12-15  4:45 ` Sebastian Pop
2007-12-15 10:46 ` Jakub Jelinek

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