Bug 215136 - graphics/colmap: clang -O2 runs out of memory on i386 then aborts (i.e. not killed)
Summary: graphics/colmap: clang -O2 runs out of memory on i386 then aborts (i.e. not k...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: i386 Any
: --- Affects Only Me
Assignee: Dimitry Andric
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-08 03:31 UTC by Jan Beich
Modified: 2016-12-11 19:59 UTC (History)
1 user (show)

See Also:


Attachments
src/util/camera_specs.cc (preprocessed, compressed) (177.72 KB, application/x-xz)
2016-12-08 03:31 UTC, Jan Beich
no flags Details
command line args (for clang 3.8+) (4.32 KB, text/plain)
2016-12-08 03:32 UTC, Jan Beich
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2016-12-08 03:31:56 UTC
Created attachment 177777 [details]
src/util/camera_specs.cc (preprocessed, compressed)

$ cd /usr/ports/graphics/colmap
$ rm files/patch-src_util_CMakeLists.txt
$ make
[...]
1.	<eof> parser at end of file
2.	Per-module optimization passes
3.	Running pass 'CallGraph Pass Manager' on module 'src/util/camera_specs.cc'.
4.	Running pass 'Value Propagation' on function '@_ZN6colmap21InitializeCameraSpecsEv'
c++: error: unable to execute command: Abort trap
c++: error: clang frontend command failed due to signal (use -v to see invocation)
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
Target: i386-unknown-freebsd10.1
Thread model: posix
Comment 1 Jan Beich freebsd_committer freebsd_triage 2016-12-08 03:32:50 UTC
Created attachment 177778 [details]
command line args (for clang 3.8+)
Comment 2 commit-hook freebsd_committer freebsd_triage 2016-12-08 21:03:03 UTC
A commit references this bug:

Author: dim
Date: Thu Dec  8 21:02:34 UTC 2016
New revision: 309722
URL: https://svnweb.freebsd.org/changeset/base/309722

Log:
  Pull in r281586 from upstream llvm trunk (by Wei Mi):

    Add some shortcuts in LazyValueInfo to reduce compile time of
    Correlated Value Propagation.

    The patch is to partially fix PR10584. Correlated Value Propagation
    queries LVI to check non-null for pointer params of each callsite. If
    we know the def of param is an alloca instruction, we know it is
    non-null and can return early from LVI. Similarly, CVP queries LVI to
    check whether pointer for each mem access is constant. If the def of
    the pointer is an alloca instruction, we know it is not a constant
    pointer. These shortcuts can reduce the cost of CVP significantly.

    Differential Revision: https://reviews.llvm.org/D18066

  This significantly reduces memory usage and compilation time when
  compiling a particular C++ source file of the graphics/colmap port.

  PR:		215136
  MFC after:	3 days

Changes:
  head/contrib/llvm/lib/Analysis/LazyValueInfo.cpp
Comment 3 commit-hook freebsd_committer freebsd_triage 2016-12-11 19:58:57 UTC
A commit references this bug:

Author: dim
Date: Sun Dec 11 19:58:14 UTC 2016
New revision: 309857
URL: https://svnweb.freebsd.org/changeset/base/309857

Log:
  MFC r309722:

  Pull in r281586 from upstream llvm trunk (by Wei Mi):

    Add some shortcuts in LazyValueInfo to reduce compile time of
    Correlated Value Propagation.

    The patch is to partially fix PR10584. Correlated Value Propagation
    queries LVI to check non-null for pointer params of each callsite. If
    we know the def of param is an alloca instruction, we know it is
    non-null and can return early from LVI. Similarly, CVP queries LVI to
    check whether pointer for each mem access is constant. If the def of
    the pointer is an alloca instruction, we know it is not a constant
    pointer. These shortcuts can reduce the cost of CVP significantly.

    Differential Revision: https://reviews.llvm.org/D18066

  This significantly reduces memory usage and compilation time when
  compiling a particular C++ source file of the graphics/colmap port.

  PR:		215136

Changes:
_U  stable/10/
  stable/10/contrib/llvm/lib/Analysis/LazyValueInfo.cpp
_U  stable/11/
  stable/11/contrib/llvm/lib/Analysis/LazyValueInfo.cpp
_U  stable/9/contrib/llvm/
  stable/9/contrib/llvm/lib/Analysis/LazyValueInfo.cpp