public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/101064] New: long compile time in var_tracking for Go package
@ 2021-06-14 13:01 thanm at google dot com
  2021-06-29 18:01 ` [Bug debug/101064] " cvs-commit at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: thanm at google dot com @ 2021-06-14 13:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101064

            Bug ID: 101064
           Summary: long compile time in var_tracking for Go package
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: thanm at google dot com
  Target Milestone: ---

Created attachment 51008
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51008&action=edit
testcase to reproduce (Go files, some profile reports)

Building the attached Go package with gccgo results in a very long compile
time, apparently due to var_tracking. To reproduce, unpack the tar file and
build with either:

  A) go clean -cache; go build .

or

  B) gccgo  -c -O2 -g -m64 -fgo-pkgpath=xyz ./aenum.go ./avx_optabs.go


[Note: this issue is first posted on the main Go issue tracker at
https://github.com/golang/go/issues/46600; more details there].

This is a fairly modest sized Go package; building it with the main (non-gcc)
Go compiler takes about a third of a second (user + sys, reported by
/bin/time).

For gccgo, building with -O0 takes about a second, but the time taken at -O1
and -O2 are much longer:

  -O1:     450 seconds
  -O2:     257 seconds

Along with the test case, I am attaching some profiles collected using 'pprof'.

The pass consuming the extra compile time appears to be variable_tracking; from
the profiles the problem looks to be related to alias analysis / memory
disambiguation.

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

end of thread, other threads:[~2021-06-29 19:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-14 13:01 [Bug debug/101064] New: long compile time in var_tracking for Go package thanm at google dot com
2021-06-29 18:01 ` [Bug debug/101064] " cvs-commit at gcc dot gnu.org
2021-06-29 18:01 ` cvs-commit at gcc dot gnu.org
2021-06-29 18:54 ` ian at airs dot com
2021-06-29 18:56 ` ian at airs dot com
2021-06-29 19:00 ` ian at airs dot com

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