This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/50905] New: Gcc4.6.x's -ftree-parallelize-loops is effective only when using "-O2/-O3 -ffast-math"
- From: "xunxun1982 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 28 Oct 2011 19:37:42 +0000
- Subject: [Bug tree-optimization/50905] New: Gcc4.6.x's -ftree-parallelize-loops is effective only when using "-O2/-O3 -ffast-math"
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50905
Bug #: 50905
Summary: Gcc4.6.x's -ftree-parallelize-loops is effective only
when using "-O2/-O3 -ffast-math"
Classification: Unclassified
Product: gcc
Version: 4.6.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: xunxun1982@gmail.com
Created attachment 25648
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25648
the test
I found that Gcc4.6.1 and Gcc4.6.2 -ftree-parallelize-loops is effective only
when using "-O2/-O3 -ffast-math" on Windows or on Ubuntu.
Is this right?
Using my test,
$gcc -ftree-parallelize-loops=2 -c main.c
$nm main.o
U clock
0000000000000000 T main
U printf
U puts
U sin
$gcc -O2 -ftree-parallelize-loops=2 -c main.c
$nm main.o
0000000000000000 r .LC4
0000000000000008 r .LC6
U __printf_chk
U clock
0000000000000000 T main
U puts
U sin
$gcc -ffast-math -ftree-parallelize-loops=2 -c main.c
$nm main.o
U clock
0000000000000000 T main
U printf
U puts
U sin
$gcc -O2 -ftree-parallelize-loops=2 -ffast-math -c main.c
$nm main.o
0000000000000000 r .LC5
U GOMP_parallel_end
U GOMP_parallel_start
U __printf_chk
U clock
0000000000000000 T main
0000000000000000 t main._loopfn.0
U omp_get_num_threads
U omp_get_thread_num
U puts
U sin
Only -O2 -ftree-parallelize-loops=2 -ffast-math achieve my desired result.
But I think it should generate the similar symbols below when using
-ftree-parallelize-loops=2 alone:
U GOMP_parallel_end
U GOMP_parallel_start
U omp_get_num_threads
U omp_get_thread_num
Am I right?
Or the -ftree-parallelize-loops is such option that should be used with
"-O2/-O3 -ffast-math"?
Thanks.