Commit Graph

26 Commits

Author SHA1 Message Date
Amy Huang 1a3bf2953a [DebugInfo] Switch to using constructor homing (-debug-info-kind=constructor) by default when debug info is enabled
Constructor homing reduces the amount of class type info that is emitted
by emitting conmplete type info for a class only when a constructor for
that class is emitted.

This will mainly reduce the amount of duplicate debug info in object
files. In Chrome enabling ctor homing decreased total build directory sizes
by about 30%.

It's also expected that some class types (such as unused classes)
will no longer be emitted in the debug info. This is fine, since we wouldn't
expect to need these types when debugging.

In some cases (e.g. libc++, https://reviews.llvm.org/D98750), classes
are used without calling the constructor. Since this is technically
undefined behavior, enabling constructor homing should be fine.
However Clang now has an attribute
`__attribute__((standalone_debug))` that can be used on classes to
ignore ctor homing.

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

Differential Revision: https://reviews.llvm.org/D106084
2021-07-26 17:24:42 -07:00
Amy Huang 394db22595 Revert "Switch to using -debug-info-kind=constructor as default (from =limited)"
This reverts commit 227db86a1b.

Causing debug info errors in google3 LTO builds; also causes a
debuginfo-test failure.
2020-07-28 11:23:59 -07:00
Amy Huang 227db86a1b Switch to using -debug-info-kind=constructor as default (from =limited)
Summary:
-debug-info-kind=constructor reduces the amount of class debug info that
is emitted; this patch switches to using this as the default.

Constructor homing emits the complete type info for a class only when the
constructor is emitted, so it is expected that there will be some classes that
are not defined in the debug info anymore because they are never constructed,
and we shouldn't need debug info for these classes.

I compared the PDB files for clang, and there are 273 class types that are defined with `=limited`
but not with `=constructor` (out of ~60,000 total class types).
We've looked at a number of the types that are no longer defined with =constructor. The vast
majority of cases are something like class A is used as a parameter in a member function of
some other class B, which is emitted. But the function that uses class A is never called, and class A
is never constructed, and therefore isn't emitted in the debug info.

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

Subscribers: aprantl, cfe-commits, lldb-commits

Tags: #clang, #lldb

Differential Revision: https://reviews.llvm.org/D79147
2020-07-09 15:26:46 -07:00
Walter Lee 215284d089 [Myriad] Remove invalidated -elf flag for MoviAsm
Summary:
The flag has been deprecated, and is becoming invalid in the latest
MDK.

Reviewers: jyknight

Subscribers: cfe-commits

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

llvm-svn: 322023
2018-01-08 20:36:08 +00:00
Walter Lee 5062e6985e Rename sparc-myriad-elf triplet to sparc-myriad-rtems
Summary: This is to be consistent with latest Movidius MDK releases.
Also, don't inherit any gcc paths for shave triple.

Reviewers: jyknight

Subscribers: emaste, fedor.sergeev

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

llvm-svn: 321080
2017-12-19 16:19:11 +00:00
James Y Knight 86a8df74f5 [Myriad] Pass -Xclang and -mllvm flags to moviCompile
Patch by Walter Lee.

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

llvm-svn: 302738
2017-05-10 21:48:13 +00:00
Douglas Katzman 1e04e46c7a [Myriad] Find libc++ adjacent to libstdc++
llvm-svn: 285140
2016-10-25 23:02:30 +00:00
Jonas Hahnfeld 9fe1b80164 Fix myriad test with CLANG_DEFAULT_CXX_STDLIB
llvm-svn: 284958
2016-10-24 08:04:17 +00:00
Douglas Katzman 69d7cf0d41 [Myriad] Find libc++ headers next to clang binary
llvm-svn: 284617
2016-10-19 17:30:40 +00:00
Douglas Katzman 97833cf5ee [Myriad] Silently ignore -fno-split-dwarf-inlining
llvm-svn: 282757
2016-09-29 19:59:12 +00:00
Douglas Katzman 5eddc2395b [Myriad] Use Generic_ELF::addClangTargetOptions()
llvm-svn: 268956
2016-05-09 19:09:59 +00:00
Douglas Katzman 6871afcfca Myriad: define __myriad2 macro automatically
llvm-svn: 263596
2016-03-15 22:34:02 +00:00
Douglas Katzman 4c12508362 Myriad: Pass -mcpu to movi{Compile,Asm}
Differential Revision: http://reviews.llvm.org/D18186

llvm-svn: 263556
2016-03-15 16:41:31 +00:00
James Y Knight 51a62f15d8 Tweak myriad-toolchain test.
The test failed when run on a SPARC host, since it was finding the
native gcc installation by accident.

llvm-svn: 256191
2015-12-21 20:30:49 +00:00
Sumanth Gundapaneni c27f54822c Fix the failing windows clang unit tests. NFC
Some tests are missing the {{(.exe)?}} suffix on the exectables
which the FileCheck is grepping for. This will ensure, the lit tests
are clean on windows

Differential Revision: http://reviews.llvm.org/D15579

llvm-svn: 255804
2015-12-16 19:09:51 +00:00
Douglas Katzman 9dc4c62681 [Myriad]: handle Preprocess job action (-E)
llvm-svn: 253647
2015-11-20 04:58:12 +00:00
Douglas Katzman d617e44065 [Myriad]: fix test for Windows
llvm-svn: 253476
2015-11-18 17:19:47 +00:00
Douglas Katzman 9d40374880 [Myriad]: -nostdlib implies -nostartfiles
llvm-svn: 253390
2015-11-17 22:33:34 +00:00
Douglas Katzman 642e5f9fea [Myriad]: pass the 'std=' option to moviCompile
llvm-svn: 253213
2015-11-16 15:38:40 +00:00
James Y Knight a6c9ee777a Teach MyriadToolchain how to find its C++ header paths.
Also move the addLibStdCXXIncludePaths helper function from Linux to
Generic_GCC.

llvm-svn: 250536
2015-10-16 18:46:26 +00:00
Douglas Katzman 795f57fa7a [Myriad]: put libstdc++ and libc in the right order
llvm-svn: 249893
2015-10-09 20:26:20 +00:00
Douglas Katzman 989157a3ad [Myriad]: default the Dwarf version to 2
llvm-svn: 249692
2015-10-08 14:18:02 +00:00
Douglas Katzman 9e31cb9ea7 [Myriad]: Accept '-nostdlib' option
llvm-svn: 249166
2015-10-02 18:39:08 +00:00
NAKAMURA Takumi 097ce205b0 clang/test/Driver/myriad-toolchain.c: Tweak for DOSish path.
llvm-svn: 247959
2015-09-18 01:02:50 +00:00
Douglas Katzman b1278f3349 [Myriad]: add "<sysroot>/include" to standard search path
llvm-svn: 247948
2015-09-17 21:20:16 +00:00
Douglas Katzman cbd00723b4 [Shave]: Rename test file from 'shave-' to 'myriad-'
llvm-svn: 247926
2015-09-17 20:00:09 +00:00