Go to file
Duncan P. N. Exon Smith b2df64721c DI: Make Subprogram definitions 'distinct'
Change `DIBuilder` always to produce 'distinct' nodes when creating
`DISubprogram` definitions.  I measured a ~5% memory improvement in the
link step (of ld64) when using `-flto -g`.

`DISubprogram`s are used in two ways in the debug info graph.

Some are definitions, point at actual functions, and can't really be
shared between compile units.  With full debug info, these point down at
their variables, forming uniquing cycles.  These uniquing cycles are
expensive to link between modules, since all unique nodes that reference
them transitively need to be duplicated (see commit message for r244181
for more details).

Others are declarations, primarily used for member functions in the type
hierarchy.  Definitions never show up there; instead, a definition
points at its corresponding declaration node.

I started by making all subprograms 'distinct'.  However, that was too
big a hammer: memory usage *increased* ~5% (net increase vs. this patch
of ~10%) because the 'distinct' declarations undermine LTO type
uniquing.  This is a targeted fix for the definitions (where uniquing is
an observable problem).

A couple of notes:

  - There's an accompanying commit to update IRGen testcases in clang.
  - ^ That's what I'm using to test this commit.
  - In a follow-up, I'll change the verifier to require 'distinct' on
    definitions and add an upgrade to `BitcodeReader`.

llvm-svn: 246098
2015-08-26 22:50:16 +00:00
clang DI: Clarify meaning of createTempFunctionFwdDecl() arg, NFC 2015-08-26 22:21:09 +00:00
clang-tools-extra Fix another LoopConvert fail. 2015-08-26 17:08:24 +00:00
compiler-rt [CMake] Cleaning up ubsan to use OBJECT_LIBS and to not loop when calling add_compiler_rt_runtime. 2015-08-26 22:36:31 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Update mailing list reference. 2015-08-24 22:43:24 +00:00
libcxx [libcxx] Remove installation rules on Darwin when it would overwrite the system installation. 2015-08-26 20:18:21 +00:00
libcxxabi Fix or disable C++11 tests in C++03 mode 2015-08-20 01:22:17 +00:00
libunwind unwind: fix invalid memory access 2015-08-21 03:21:31 +00:00
lld Set the symbol size in the symbol table. 2015-08-26 21:46:24 +00:00
lldb http://reviews.llvm.org/D12380: remove DWARFCompileUnit printf spam. 2015-08-26 22:08:26 +00:00
llgo Update to new lists.llvm.org 2015-08-05 04:03:05 +00:00
llvm DI: Make Subprogram definitions 'distinct' 2015-08-26 22:50:16 +00:00
openmp Put taskdata variables under KMP_DEBUG guards. 2015-08-26 20:02:21 +00:00
polly [Vectorizer] Detect strides in multi-dimensional arrays 2015-08-24 22:20:46 +00:00