public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/64928] [8/9/10/11 Regression] Inordinate cpu time and memory usage in "phase opt and generate" with -ftest-coverage -fprofile-arcs Date: Wed, 10 Mar 2021 09:47:18 +0000 [thread overview] Message-ID: <bug-64928-4-EQI0JQs3YB@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-64928-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64928 --- Comment #36 from Richard Biener <rguenth at gcc dot gnu.org> --- So the issue is still the same - one thing I noticed is that store-motion also adds a flag for each counter update to avoid introducing store-data-races. -fallow-store-data-races mitigates that part and speeds up the compilation quite a bit. In case there are threads involved you'd want -fprofile-update=atomic which then causes store-motion to give up and the compile-time is great overall. The original trigger of the regression is likely the marking of the profile counters as to not be aliased - we might want to introduce another flag to tell that store-data-races for the particular decl are not a consideration (maybe even have some user-visible attribute for this). Otherwise re-confirmed (I stripped options down to -O -fPIC -fprofile-arcs -ftest-coverage): rguenther@ryzen:/tmp> /usr/bin/time ~/install/gcc-11.0/usr/local/bin/gcc -S -O -fPIC -fprofile-arcs -ftest-coverage fib-2.o1-fib-2.i 1.84user 0.05system 0:01.90elapsed 99%CPU (0avgtext+0avgdata 160764maxresident)k 0inputs+0outputs (0major+58129minor)pagefaults 0swaps rguenther@ryzen:/tmp> /usr/bin/time ~/install/gcc-11.0/usr/local/bin/gcc -S -O -fPIC -fprofile-arcs -ftest-coverage fib-3.o1-fib-3.i 10.15user 0.17system 0:10.32elapsed 99%CPU (0avgtext+0avgdata 726688maxresident)k 0inputs+0outputs (0major+265008minor)pagefaults 0swaps rguenther@ryzen:/tmp> /usr/bin/time ~/install/gcc-11.0/usr/local/bin/gcc -S -O -fPIC -fprofile-arcs -ftest-coverage fib-4.o1-fib-4.i 43.60user 1.06system 0:44.68elapsed 99%CPU (0avgtext+0avgdata 6107260maxresident)k 0inputs+0outputs (0major+1765217minor)pagefaults 0swaps rguenther@ryzen:/tmp> /usr/bin/time ~/install/gcc-11.0/usr/local/bin/gcc -S -O -fPIC -fprofile-arcs -ftest-coverage fib-5.o1-fib-5.i gcc: fatal error: Killed signal terminated program cc1 compilation terminated. Command exited with non-zero status 1 143.09user 3.93system 2:28.29elapsed 99%CPU (0avgtext+0avgdata 24636148maxresident)k 37504inputs+0outputs (31major+6133278minor)pagefaults 0swaps on the last which runs OOM adding -fallow-store-data-races does rguenther@ryzen:/tmp> /usr/bin/time ~/install/gcc-11.0/usr/local/bin/gcc -S -O -fPIC -fprofile-arcs -ftest-coverage fib-5.o1-fib-5.i -fallow-store-data-races 123.06user 0.45system 2:03.59elapsed 99%CPU (0avgtext+0avgdata 1777700maxresident)k 57304inputs+0outputs (68major+535127minor)pagefaults 0swaps and -fprofile-update=atomic rguenther@ryzen:/tmp> /usr/bin/time ~/install/gcc-11.0/usr/local/bin/gcc -S -O -fPIC -fprofile-arcs -ftest-coverage fib-5.o1-fib-5.i -fprofile-update=atomic 0.61user 0.02system 0:00.63elapsed 100%CPU (0avgtext+0avgdata 73236maxresident)k 72inputs+0outputs (0major+18284minor)pagefaults 0swaps and -fno-tree-loop-im rguenther@ryzen:/tmp> /usr/bin/time ~/install/gcc-11.0/usr/local/bin/gcc -S -O -fPIC -fprofile-arcs -ftest-coverage fib-5.o1-fib-5.i -fno-tree-loop-im 1.06user 0.01system 0:01.07elapsed 99%CPU (0avgtext+0avgdata 90672maxresident)k 0inputs+0outputs (0major+24331minor)pagefaults 0swaps I still wonder if you can produce an even smaller testcase where visualizing the CFG is possible. Unfortunately the source is mechanically generated and following it is hard. Like a testcase that retains the basic structure but ends up with just a few (2, less than 10) computed gotos?
next prev parent reply other threads:[~2021-03-10 9:47 UTC|newest] Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-02-03 21:09 [Bug other/64928] New: unreasonable " lucier at math dot purdue.edu 2015-02-03 21:11 ` [Bug other/64928] Inordinate " lucier at math dot purdue.edu 2015-02-03 21:33 ` pinskia at gcc dot gnu.org 2015-02-03 21:35 ` pinskia at gcc dot gnu.org 2015-02-03 21:49 ` lucier at math dot purdue.edu 2015-02-06 5:07 ` lucier at math dot purdue.edu 2015-02-06 5:08 ` lucier at math dot purdue.edu 2015-02-09 14:31 ` [Bug middle-end/64928] [4.8/4.9/5 Regression] " rguenth at gcc dot gnu.org 2015-02-09 15:07 ` rguenth at gcc dot gnu.org 2015-02-16 19:57 ` law at redhat dot com 2015-03-05 17:22 ` rguenth at gcc dot gnu.org 2015-03-05 23:07 ` steven at gcc dot gnu.org 2015-03-06 0:45 ` law at redhat dot com 2015-03-06 10:53 ` rguenth at gcc dot gnu.org 2015-03-06 12:35 ` rguenth at gcc dot gnu.org 2015-03-06 12:47 ` rguenth at gcc dot gnu.org 2015-03-06 12:53 ` rguenth at gcc dot gnu.org 2015-03-06 13:01 ` rguenth at gcc dot gnu.org 2015-03-18 12:54 ` rguenth at gcc dot gnu.org 2015-05-20 14:49 ` [Bug middle-end/64928] [4.8/4.9/5/6 " wellnhofer at aevum dot de 2015-05-20 14:49 ` wellnhofer at aevum dot de 2015-06-23 8:19 ` rguenth at gcc dot gnu.org 2015-06-26 19:56 ` [Bug middle-end/64928] [4.9/5/6 " jakub at gcc dot gnu.org 2015-06-26 20:28 ` jakub at gcc dot gnu.org 2020-09-29 0:14 ` [Bug middle-end/64928] [8/9/10/11 " lucier at math dot purdue.edu 2020-09-29 7:09 ` rguenth at gcc dot gnu.org 2020-09-29 12:17 ` lucier at math dot purdue.edu 2020-09-29 13:06 ` rguenther at suse dot de 2021-03-10 2:10 ` lucier at math dot purdue.edu 2021-03-10 2:13 ` lucier at math dot purdue.edu 2021-03-10 9:47 ` rguenth at gcc dot gnu.org [this message] 2021-03-10 14:16 ` lucier at math dot purdue.edu 2021-03-10 15:06 ` rguenth at gcc dot gnu.org 2021-05-14 9:47 ` [Bug middle-end/64928] [9/10/11/12 " jakub at gcc dot gnu.org 2021-06-01 8:06 ` rguenth at gcc dot gnu.org 2022-05-27 9:35 ` [Bug middle-end/64928] [10/11/12/13 " rguenth at gcc dot gnu.org 2022-06-28 10:31 ` jakub at gcc dot gnu.org 2023-07-07 10:30 ` [Bug middle-end/64928] [11/12/13/14 " rguenth at gcc dot gnu.org 2023-09-28 7:06 ` [Bug middle-end/64928] [11 " rguenth at gcc dot gnu.org 2023-10-02 0:26 ` lucier at math dot purdue.edu 2023-10-04 6:39 ` rguenth at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-64928-4-EQI0JQs3YB@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).