Bug 236313 - graphics/opencollada: excessive build time with clang 8 on i386
Summary: graphics/opencollada: excessive build time with clang 8 on i386
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-toolchain (Nobody)
URL:
Keywords: needs-qa
Depends on:
Blocks: 236062
  Show dependency treegraph
 
Reported: 2019-03-06 06:30 UTC by Jan Beich
Modified: 2019-03-20 23:29 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (sunpoet)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2019-03-06 06:30:12 UTC
When building with -O2 some files take a lot of time. Doesn't affect other 32bit architecture like armv6 or armv7. According -Rpass-analysis=.* the hang happens between "Simple Register Coalescing" and "Greedy Register Allocator". For example,

$ cd graphics/opencollada
$ make configure
$ cd `make -V WRKSRC`
c++ -m32 -DGENERATEDSAXPARSER_XMLPARSER_LIBXML -DOpenCOLLADASaxFrameworkLoader_shared_EXPORTS -DXMLPARSER_LIBXML -ICOLLADASaxFrameworkLoader/include -ICOLLADASaxFrameworkLoader/include/generated14 -ICOLLADASaxFrameworkLoader/include/generated15 -IExternals/MathMLSolver/include -IExternals/MathMLSolver/include/AST -ICOLLADABaseUtils/include -ICOLLADABaseUtils/include/Math -ICOLLADAFramework/include -IGeneratedSaxParser/include -I/usr/local/include/libxml2 -I/usr/local/include -O2 -pipe -Wno-narrowing -DLIBICONV_PLUG -fstack-protector -isystem /usr/local/include -fno-strict-aliasing  -DLIBICONV_PLUG -isystem /usr/local/include  -O2 -pipe -Wno-narrowing -DLIBICONV_PLUG -fstack-protector -isystem /usr/local/include -fno-strict-aliasing  -DLIBICONV_PLUG -isystem /usr/local/include -fPIC -c COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLColladaParserAutoGen14PrivateNameMap.cpp

http://package18.nyi.freebsd.org/data/headi386PR236062-default/2019-03-02_21h45m25s/logs/errors/opencollada-1.6.68_1.log
Comment 1 commit-hook freebsd_committer freebsd_triage 2019-03-06 06:47:28 UTC
A commit references this bug:

Author: jbeich
Date: Wed Mar  6 06:46:24 UTC 2019
New revision: 494777
URL: https://svnweb.freebsd.org/changeset/ports/494777

Log:
  graphics/opencollada: unbreak with clang 8 on i386

  PR:		236313
  Reported by:	pkg-fallout
  Approved by:	portmgr blanket

Changes:
  head/graphics/opencollada/files/patch-clang8
Comment 2 Jan Beich freebsd_committer freebsd_triage 2019-03-06 06:49:51 UTC
editors/libreoffice is unblocked. Over to compiler experts to minimize and get upstream help.
Comment 3 Dimitry Andric freebsd_committer freebsd_triage 2019-03-06 19:48:47 UTC
Regressed by https://reviews.llvm.org/rL342578, I filed an upstream bug:

https://bugs.llvm.org/show_bug.cgi?id=40986

This is going to take a while to properly reduce. :)  Btw, no such hang occurs on amd64?
Comment 4 commit-hook freebsd_committer freebsd_triage 2019-03-11 19:16:51 UTC
A commit references this bug:

Author: dim
Date: Mon Mar 11 19:15:57 UTC 2019
New revision: 345021
URL: https://svnweb.freebsd.org/changeset/base/345021

Log:
  Pull in r355854 from upstream llvm trunk (by Jonas Paulsson):

    [RegAlloc]  Avoid compile time regression with multiple copy hints.

    As a fix for https://bugs.llvm.org/show_bug.cgi?id=40986 ("excessive
    compile time building opencollada"), this patch makes sure that no
    phys reg is hinted more than once from getRegAllocationHints().

    This handles the case were many virtual registers are assigned to the
    same physreg. The previous compile time fix (r343686) in
    weightCalcHelper() only made sure that physical/virtual registers are
    passed no more than once to addRegAllocationHint().

    Review: Dimitry Andric, Quentin Colombet
    https://reviews.llvm.org/D59201

  This should fix a hang when compiling certain generated .cpp files in
  the graphics/opencollada port.

  PR:		236313
  MFC after:	1 month
  X-MFC-With:	r344779

Changes:
  head/contrib/llvm/lib/CodeGen/TargetRegisterInfo.cpp
Comment 5 commit-hook freebsd_committer freebsd_triage 2019-03-13 15:54:30 UTC
A commit references this bug:

Author: jbeich
Date: Wed Mar 13 15:54:15 UTC 2019
New revision: 495589
URL: https://svnweb.freebsd.org/changeset/ports/495589

Log:
  graphics/opencollada: back out r494777 after base r345021

  PR:		236313

Changes:
  head/graphics/opencollada/files/patch-clang8