1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
Commit Graph

8455 Commits

Author SHA1 Message Date
Nico Weber
d2e05a881f [gn build] make 'clang' target depend on libcxx/include on mac
On macOS, libc++ headers are distributed with the compiler, not
the sysroot. Without this, compiling a file that includes something
like <string> won't compile with gn-built clang without manual tweaks.

I used to do the manual tweaks, but now that other people are starting
to use this on mac, let's make it Just Work.

(This is marginally nicer than the cmake build now in that you can
just build 'clang' and it'll do the right thing.)

Differential Revision: https://reviews.llvm.org/D74247
2020-02-10 07:43:42 -05:00
LLVM GN Syncbot
286adde9cb [gn build] Port a17f03bd939 2020-02-09 15:41:05 +00:00
Nico Weber
2d6e96ab96 [gn build] (manually) port 72277ecd62e and the LLVMBuild bit of 9548b74a83 2020-02-08 19:01:55 -05:00
Fangrui Song
c6af7f4d3a [gn build] Add OpenMPOpt.cpp to LLVMipo after D69930/9548b74a831e 2020-02-08 14:18:43 -08:00
LLVM GN Syncbot
c00ad4cd9e [gn build] Port 446268a2234 2020-02-07 13:35:48 +00:00
LLVM GN Syncbot
9d6725a8d3 [gn build] Port b12176d2aaf 2020-02-05 19:16:15 +00:00
LLVM GN Syncbot
8c3a57058a [gn build] Port fc62b36a000 2020-02-05 18:06:25 +00:00
LLVM GN Syncbot
9d09a8e119 [gn build] Port b198f16e1e1 2020-02-05 17:03:12 +00:00
LLVM GN Syncbot
225e5a5e85 [gn build] Port b8a847c0a3e 2020-02-05 01:27:20 +00:00
LLVM GN Syncbot
a0537a10f2 [gn build] Port 7531a5039fd 2020-02-05 01:27:19 +00:00
David Bozier
3e5a3b434c Improve error message of FileCheck when stdin is empty
Summary: Replace '-' in the error message with <stdin>. This is also consistent with another error message in the code.

Reviewers: jhenderson, probinson, jdenny, grimar, arichardson

Reviewed By: jhenderson

Subscribers: thopre, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73793
2020-02-04 11:14:55 +00:00
Alex Richardson
13b3bdf322 [update_cc_test_checks] Don't attach CHECK lines to function declarations
Previously we were adding the CHECK lines to both definitions and
declarations. Update the JSON AST dump parsing code to skip all
FunctionDecls without an "inner" node (i.e. no body).

Reviewed By: MaskRay, greened
Differential Revision: https://reviews.llvm.org/D73708
2020-02-04 08:41:26 +00:00
Hans Wennborg
238f3b0462 build_llvm_package.bat: Use a short form of the git revision 2020-02-03 16:40:10 +01:00
LLVM GN Syncbot
5e45b1bf87 [gn build] Port c953409ff89 2020-02-03 05:24:55 +00:00
LLVM GN Syncbot
86f737007d [gn build] Port a7bbe45a3e2 2020-02-02 18:45:50 +00:00
Fangrui Song
4a2b5d3873 [gn build] Delete stale AttributesCompatFunc after D72455/cfe87a4a16b73652dc06f9fa334137656991f13f 2020-02-02 10:07:05 -08:00
Tyker
9f4841260d [NFC] Refactor TableGen for attributes
Summary:
this patch makes tablegen generate llvm attributes in a more generic and simpler (at least to me).

changes:  make tablegen generate
...
ATTRIBUTE_ENUM(Alignment,align)
ATTRIBUTE_ENUM(AllocSize,allocsize)
...
which can be used to generate most of what was previously used and more.

Tablegen was also generating attributes from 2 identical files leading to identical output. so I removed one of them and made user use the other.

Reviewers: jdoerfert, thakis, aaron.ballman

Reviewed By: aaron.ballman

Subscribers: mgorny, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72455
2020-02-02 15:12:20 +01:00
Tyker
50e7408a18 Revert "[NFC] Refactor TableGen for attributes"
This reverts commit 4dba14cf37abda16ab33cb748a5c762dae2e95e9.
2020-02-02 15:05:33 +01:00
Tyker
fb839b7175 [NFC] Refactor TableGen for attributes
Summary:
this patch makes tablegen generate llvm attributes in a more generic and simpler (at least to me).

changes:  make tablegen generate
...
ATTRIBUTE_ENUM(Alignment,align)
ATTRIBUTE_ENUM(AllocSize,allocsize)
...
which can be used to generate most of what was previously used and more.

Tablegen was also generating attributes from 2 identical files leading to identical output. so I removed one of them and made user use the other.

Reviewers: jdoerfert, thakis, aaron.ballman

Reviewed By: aaron.ballman

Subscribers: mgorny, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72455
2020-02-02 14:50:31 +01:00
Nico Weber
0858f1491b [gn build] unbreak mac build after 133a31cef61c 2020-01-31 21:25:56 -05:00
Nico Weber
fa01d382f6 [gn build] add asan runtime on linux and mac
This produces a seemingly-working dynamic (x64-only) asan dylib on macOS
and static libraries on Linux.

I've had this sitting in a branch for a long time and wanted to get
check-asan working before landing it, but smaller patches and fewer
local branches is probably better.
2020-01-31 21:23:43 -05:00
LLVM GN Syncbot
b23f6c533d [gn build] Port 16a0313ee32 2020-01-31 09:18:27 +00:00
LLVM GN Syncbot
0ef9aaaf35 [gn build] Port 601687bf731 2020-01-30 15:06:10 +00:00
Hans Wennborg
b86d89bef2 test-release.sh: Add MLIR to the projects list 2020-01-30 14:31:02 +01:00
LLVM GN Syncbot
66655979b5 [gn build] Port f00be8da62b 2020-01-30 12:56:31 +00:00
Christian Sigg
b84ab96dc9 Add GDB pretty printers for llvm::ilist, llvm::simple_ilist, and llvm::ilist_node.
Reviewers: dblaikie

Reviewed By: dblaikie

Subscribers: merge_guards_bot, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72589
2020-01-30 09:35:49 +01:00
LLVM GN Syncbot
22bd378211 [gn build] Port f2af0607000 2020-01-30 01:35:57 +00:00
Nico Weber
94398225a4 [gn build] add a FIXME about using /Gw on win 2020-01-29 19:12:08 -05:00
LLVM GN Syncbot
f1f059b66f [gn build] Port 5ea83eef4d6 2020-01-29 21:19:26 +00:00
LLVM GN Syncbot
519cacf3d2 [gn build] Port 24962ced814 2020-01-29 21:06:15 +00:00
LLVM GN Syncbot
b357126bee [gn build] Port 9a08a3fab99 2020-01-29 15:15:45 +00:00
Benjamin Kramer
633cdf3dc1 Address implicit conversions detected by g++ 5 only. 2020-01-29 01:01:09 +01:00
Benjamin Kramer
8d50d8820b Fix a couple more implicit conversions that Clang doesn't diagnose. 2020-01-29 00:42:56 +01:00
Benjamin Kramer
87d13166c7 Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with
std::string_view. There should be no functional change here.

This is mostly mechanical from a custom clang-tidy check, with a lot of
manual fixups. It uncovers a lot of minor inefficiencies.

This doesn't actually modify StringRef yet, I'll do that in a follow-up.
2020-01-28 23:25:25 +01:00
Nico Weber
0a628dd70c [gn build] (manually) port 90a10f00ff8 2020-01-28 16:00:54 -05:00
LLVM GN Syncbot
7a0c456a46 [gn build] Port 2c03c899d50 2020-01-28 18:59:31 +00:00
LLVM GN Syncbot
4e41d24fc8 [gn build] Port a928d127a52 2020-01-28 18:39:09 +00:00
LLVM GN Syncbot
6ffae95289 [gn build] Port a32f894f17b 2020-01-28 15:50:50 +00:00
Matt Arsenault
e2876f478f TableGen: Try to fix expensive checks failures 2020-01-27 14:42:04 -05:00
Luke Drummond
a097bd08a1 [tablegen] Emit string literals instead of char arrays
This changes the generated (Instr|Asm|Reg|Regclass)Name tables from this
form:
    extern const char HexagonInstrNameData[] = {
      /* 0 */ 'G', '_', 'F', 'L', 'O', 'G', '1', '0', 0,
      /* 9 */ 'E', 'N', 'D', 'L', 'O', 'O', 'P', '0', 0,
      /* 18 */ 'V', '6', '_', 'v', 'd', 'd', '0', 0,
      /* 26 */ 'P', 'S', '_', 'v', 'd', 'd', '0', 0,
      [...]
    };

...to this:

    extern const char HexagonInstrNameData[] = {
      /* 0 */ "G_FLOG10\0"
      /* 9 */ "ENDLOOP0\0"
      /* 18 */ "V6_vdd0\0"
      /* 26 */ "PS_vdd0\0"
      [...]
    };

This should make debugging and exploration a lot easier for mortals,
while providing a significant compile-time reduction for common compilers.

To avoid issues with low implementation limits, this is disabled by
default for visual studio.

To force output one way or the other, pass
`--long-string-literals=<bool>` to `tablegen`

Reviewers: mstorsjo, rnk

Subscribers: llvm-commits

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

A variation of this patch was originally committed in ce23515f5ab011 and
then reverted in e464b31c due to build failures.
2020-01-27 18:22:25 +00:00
Christian Sigg
4789f36750 Add pretty printers for llvm::PointerIntPair and llvm::PointerUnion.
Reviewers: aprantl, dblaikie, jdoerfert, nicolasvasilache

Reviewed By: dblaikie

Subscribers: jpienaar, dexonsmith, merge_guards_bot, llvm-commits

Tags: #llvm, #clang, #lldb, #openmp

Differential Revision: https://reviews.llvm.org/D72557
2020-01-27 17:23:59 +01:00
LLVM GN Syncbot
b191b5e878 [gn build] Port dd8e0a0a23b 2020-01-25 02:40:48 +00:00
Nico Weber
9a83eff740 [gn build] (manually) merge 81b700e302b1 2020-01-24 21:40:26 -05:00
LLVM GN Syncbot
1c66965881 [gn build] Port 8a81daaa8b5 2020-01-24 21:42:43 +00:00
LLVM GN Syncbot
54ede9be55 [gn build] Port 3f8b100e94b 2020-01-24 21:02:26 +00:00
Matt Arsenault
653b9c5a80 TableGen/GlobalISel: Handle non-leaf EXTRACT_SUBREG
This previously only handled EXTRACT_SUBREGs from leafs, such as
operands directly in the original output. Handle extracting from a
result instruction.
2020-01-24 12:15:10 -08:00
Matt Arsenault
a3296c73e9 TableGen: Work around assert on Mips register definitions
This would hit the "Biggest class wasn't first" assert in
getMatchingSubClassWithSubRegs in a future patch for EXTRACT_SUBREG
handling.

Mips defines 4 identical register classes (MSA128B, MSA128H, MSA128BW,
MSA128D). These have the same set of registers, and only differ by the
isel type. I believe this is an ill formed way of defining registers,
that probably is just to work around the inconvenience of mixing
different types in a single register class in DAG patterns.

Since these all have the same size, they would all sort to the
beginning, but you would not necessarily get the same super register
at the front as the assert enforces. Breaking the ambiguity by also
sorting by name doesn't work, since each of these register classes all
want to be first. Force sorting of the original register class if the
size is the same.
2020-01-24 12:15:10 -08:00
LLVM GN Syncbot
42180df7df [gn build] Port 555d8f4ef5e 2020-01-24 19:37:54 +00:00
Sergej Jaskiewicz
22b60a6c62 Revert "[tablegen] Emit string literals instead of char arrays"
This reverts commit ce23515f5ab01161c98449d833b3ae013b553aa8.

That commit broke some builds on Windows:
http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/13870
2020-01-23 18:22:22 +03:00
Luke Drummond
93befba229 [tablegen] Emit string literals instead of char arrays
This changes the generated (Instr|Asm|Reg|Regclass)Name tables from this
form:
    extern const char HexagonInstrNameData[] = {
      /* 0 */ 'G', '_', 'F', 'L', 'O', 'G', '1', '0', 0,
      /* 9 */ 'E', 'N', 'D', 'L', 'O', 'O', 'P', '0', 0,
      /* 18 */ 'V', '6', '_', 'v', 'd', 'd', '0', 0,
      /* 26 */ 'P', 'S', '_', 'v', 'd', 'd', '0', 0,
      [...]
    };

...to this:

    extern const char HexagonInstrNameData[] = {
      /* 0 */ "G_FLOG10\0"
      /* 9 */ "ENDLOOP0\0"
      /* 18 */ "V6_vdd0\0"
      /* 26 */ "PS_vdd0\0"
      [...]
    };

This should make debugging and exploration a lot easier for mortals,
while providing a significant compile-time reduction for common compilers.

To avoid issues with low implementation limits, this is disabled by
default for visual studio or when cross-compiling.

To force output one way or the other, pass
`--long-string-literals=<bool>` to `tablegen`

Reviewers: mstorsjo, rnk

Subscribers: llvm-commit

Differential Revision: https://reviews.llvm.org/D73044
2020-01-23 13:57:20 +00:00
LLVM GN Syncbot
41ea30c256 [gn build] Port 2f6987ba61c 2020-01-23 13:34:12 +00:00
LLVM GN Syncbot
0bce65f3ee [gn build] Port dcff3961c2d 2020-01-23 05:43:56 +00:00
Nico Weber
068346b51e [gn build] reformat all build files again
Run `git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format`
after recent fixes to formatting of comments after single-element
lists.
2020-01-22 14:04:20 -05:00
Nico Weber
9a5d53ffb2 Revert "[gn build] [win] produce symbolized stack frames in release builds too"
This reverts commit fd98eccf984f203e39452da238a142f83f61d368.
Seems to have no effect, need to try it locally for a bit first.
2020-01-22 12:54:19 -05:00
Nico Weber
aa258c1b77 [gn build] [win] produce symbolized stack frames in release builds too 2020-01-22 12:36:38 -05:00
Nico Weber
7de08a66c5 [gn build] (manually) port a174f0da62f 2020-01-22 11:08:34 -05:00
LLVM GN Syncbot
7bf9ea1c7a [gn build] Port e53a9d96e6a 2020-01-22 04:19:38 +00:00
LLVM GN Syncbot
f3ae931f0a [gn build] Port fccd0da5ee6 2020-01-21 13:36:16 +00:00
LLVM GN Syncbot
7c3aa098d6 [gn build] Port a80291ce10b 2020-01-21 08:19:25 +00:00
LLVM GN Syncbot
c0e209358d [gn build] Port a42c3eb599c 2020-01-20 17:09:12 +00:00
LLVM GN Syncbot
71d2effead [gn build] Port 24b7b99b7d6 2020-01-20 15:32:54 +00:00
Eric Astor
dea61577e1 Fix build - removing legacy target reference. 2020-01-20 09:54:59 -05:00
Eric Astor
f5ab9140ce [ms] [llvm-ml] Add placeholder for llvm-ml, based on llvm-mc
As discussed on the mailing list, I plan to introduce an ml-compatible MASM assembler as part of providing more of the Windows build tools. This will be similar to llvm-mc, but with different command-line parameters.

This placeholder is purely a stripped-down version of llvm-mc; we'll eventually add support for the Microsoft-style command-line flags, and back it with a MASM parser.

Relanding this revision after fixing ARM-compatibility issues.

Reviewers: rnk, thakis, RKSimon

Reviewed By: thakis, RKSimon

Differential Revision: https://reviews.llvm.org/D72679
2020-01-20 09:19:10 -05:00
LLVM GN Syncbot
554716c6ed [gn build] Port a0f50d73163 2020-01-19 14:54:02 +00:00
Eric Astor
538f1d9b3f Revert "[ms] [llvm-ml] Add placeholder for llvm-ml, based on llvm-mc"
This reverts commit 22af2cbefc86dbef6e11ddaa96a08956e0baf22b, due to breakages on ARM platforms.
2020-01-18 09:51:40 -05:00
LLVM GN Syncbot
2be916404f [gn build] Port d3db13af7e5 2020-01-17 23:26:29 +00:00
Nico Weber
b68ba95e0b [gn build] fix build after 22af2cbefc 2020-01-17 18:26:02 -05:00
Eric Astor
ed7261e778 [ms] [llvm-ml] Add placeholder for llvm-ml, based on llvm-mc
Summary:
As discussed on the mailing list, I plan to introduce an ml-compatible MASM assembler as part of providing more of the Windows build tools. This will be similar to llvm-mc, but with different command-line parameters.

This placeholder is purely a stripped-down version of llvm-mc; we'll eventually add support for the Microsoft-style command-line flags, and back it with a MASM parser.

Reviewers: rnk, thakis

Reviewed By: thakis

Subscribers: merge_guards_bot, mgorny, jfb, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72679
2020-01-17 16:14:08 -05:00
LLVM GN Syncbot
75dedac3a0 [gn build] Port 42a0355816d 2020-01-17 13:44:44 +00:00
Dmitri Gribenko
bac0121a4b Revert "Avoid creating an immutable map in the Automaton class."
This reverts commit 051d330314cb1f175025ca37da8e5e1d851e1790. It broke
buildbots, for example,
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/21908.
2020-01-17 10:20:36 +01:00
Hans Wennborg
269a6bd0b2 Remove old Suversion release scripts 2020-01-17 09:35:34 +01:00
Marcello Maggioni
8c76dbff6b Avoid creating an immutable map in the Automaton class.
Summary:
In the DFAPacketizer we copy the Transitions array
into a map in order to later access the transitions
based on a "Current State/Action" pair as a key.
This map lives in the Automaton object used by the DFAPacketizer.
It is never changed during the life of the object after
having been created during the creation of the Automaton
itself.

This map creation can make the creation of a DFAPacketizer
quite expensive if the target contains a considerable
amount of transition states.

Considering that TableGen already generates a
sorted list of transitions by State/Action pairs
we could just use that directly in our Automaton
and search entries with std::lower_bound instead of copying
it in a map and paying the execution time and memory cost.

Reviewers: jmolloy, ThomasRaoux

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72682
2020-01-16 18:44:20 -08:00
Nico Weber
02bc480b15 [gn build] replace llvm_allow_tardy_revision with llvm_append_vc_rev
Previously, the gn build would create VCSRevision.h / VCSVersion.h
files with some LLD_REVISION / LLVM_REVISION / CLANG_REVISION but
by default wouldn't add a dependency on .git/logs/HEAD so that
the step doesn't rerun after every branch switch or every pull.

That's bad for deterministic builds, and having --version print
some arbitrarily old revision isn't great either.

Instead, move to the model that the cmake build (now) uses fairly
consistently: If llvm_append_vc_rev is set, include the revision,
else don't.

Since the GN build is focused on developers, set llvm_append_vc_rev
to false instead of true by default (different from the cmake build),
so that things don't rebuild after every branch switch and every
pull.

While here, also remove some pre-monorepo code.

Differential Revision: https://reviews.llvm.org/D72859
2020-01-16 19:05:07 -05:00
LLVM GN Syncbot
3c615417b5 [gn build] Port d5c6b8407c1 2020-01-16 21:35:08 +00:00
Matt Arsenault
0e42d09951 TableGen/GlobalISel: Fix srcvalue inputs
Allow using srcvalue for discarding pattern inputs.
2020-01-16 13:49:43 -05:00
Nico Weber
851ce920c9 [gn build] (manually) port bed7626f04f7 2020-01-16 13:19:39 -05:00
Nico Weber
9a71e6cdaf [gn build] include revision information in lld --version output 2020-01-16 13:10:41 -05:00
LLVM GN Syncbot
bbf89c711e [gn build] Port 6b357866496 2020-01-16 16:56:26 +00:00
Nico Weber
6bab3f4983 Make lld cmake not compute commit revision twice
r354605 moved LLD to the unified revision handling introduced in
rL353268 / r352729 and removed uses of LLD_REPOSITORY_STRING and
LLD_REVISION_STRING.

After this change, we no longer compute the (now-unused) values
of these two variables.

Since this removes the only use of llvm/utils/GetRepositoryPath,
remove that too (it's redundant with the system added in r354605).

While here, also remove LLD_VERSION_MAJOR and LLD_VERSION_MINOR.
Their uses were removed in r285163.

Also remove LLD_VERSION from Version.inc which as far as I can
tell has been unused since the file was added in r219277.

No behavior change.

Differential Revision: https://reviews.llvm.org/D72803
2020-01-16 09:55:36 -05:00
LLVM GN Syncbot
24c5598549 [gn build] Port ed181efa175 2020-01-16 09:55:55 +00:00
LLVM GN Syncbot
e4adbf252b [gn build] Port 8fdafb7dced 2020-01-16 04:13:31 +00:00
Nico Weber
31a3e4d169 [gn build] re-run "gn format" with trunk gn 2020-01-15 13:37:38 -05:00
Nico Weber
d9e1114f21 [gn build] add multi-line forcing comments in more places 2020-01-15 13:36:42 -05:00
Nico Weber
800e88dfdc [gn build] make "gn format" comment slightly more concise 2020-01-15 13:36:42 -05:00
Nico Weber
fbe5badf52 [gn build] Reformat all build files
Ran `git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format`.
The motivation is to reformat them with trunk gn again right after.
Trunk gn changed formatting of some single-element lists.
2020-01-15 12:59:45 -05:00
Nico Weber
8b477b93ee [gn build] find mistakes like the one fixed in 72b5989e0d1 at build time 2020-01-15 10:05:41 -05:00
Nico Weber
cfae8b7809 [gn build] (manually) port b4a99a061f51 better 2020-01-15 09:49:56 -05:00
Matt Arsenault
222988e058 TableGen: Delete some copy constuctors
Some register related machinery relies on uniqued, static pointers for
register classes and subregisters, so try to make sure these are never
copied.
2020-01-15 08:58:57 -05:00
Matt Arsenault
6f8d4d409e TableGen/GlobalISel: Don't take reference to temporary values
These return temporary Optional<> values which are immediately
destroyed. I'm not sure why no sanitizers seem to have caught this,
but I encountered crashes on these in a future patch.
2020-01-15 08:58:57 -05:00
Matt Arsenault
79b7d20721 TableGen/GlobalISel: Don't reconstruct CodeGenRegBank
The maps for dealing with the relationships between different register
classes and subregister indexes rely on unique pointers for every
class/index. By constructing a second copy of CodeGenRegBank, two
different pointer values existed for a given subregister depending on
where you were querying.

Use the existing CodeGenRegBank owned by the CodeGenTarget instead of
constructing a second copy. This avoids incorrectly failing map
lookups in a future change.
2020-01-15 08:58:57 -05:00
Djordje Todorovic
82df06c202 [llvm-locstats] Add the --compare option
Draw a plot showing the difference in debug loc coverage on two
files provided.

Differential Revision: https://reviews.llvm.org/D71870
2020-01-15 14:35:29 +01:00
Hans Wennborg
54ef354524 Bump the trunk major version to 11
and clear the release notes.
2020-01-15 13:38:01 +01:00
Djordje Todorovic
260af8e320 [llvm-locstats] Add the --draw-plot option
When using the option, draw the histogram representing the debug
location buckets. The resulting histogram will be saved in a png
file.

Differential Revision: https://reviews.llvm.org/D71869
2020-01-15 12:00:43 +01:00
Djordje Todorovic
ada36eafbb [llvm-locstats][NFC] Support OOP concept
Making these changes, the code becomes more robust and easier for
adding the new features.

  -Introduce the LocationStats class representing the statistics
  -Add the pretty_print() method in the LocationStats class
  -Add additional '-' for the program options
  -Add the verify_program_inputs() function
  -Add the parse_locstats() function
  -Rename 'results' => 'opts'
  -Add more comments

Differential Revision: https://reviews.llvm.org/D71868
2020-01-15 11:41:09 +01:00
LLVM GN Syncbot
19664201dc [gn build] Port 0dc6c249bff 2020-01-15 09:58:27 +00:00
Tom Stellard
fb33bc86b6 CMake: Make most target symbols hidden by default
Summary:
For builds with LLVM_BUILD_LLVM_DYLIB=ON and BUILD_SHARED_LIBS=OFF
this change makes all symbols in the target specific libraries hidden
by default.

A new macro called LLVM_EXTERNAL_VISIBILITY has been added to mark symbols in these
libraries public, which is mainly needed for the definitions of the
LLVMInitialize* functions.

This patch reduces the number of public symbols in libLLVM.so by about
25%.  This should improve load times for the dynamic library and also
make abi checker tools, like abidiff require less memory when analyzing
libLLVM.so

One side-effect of this change is that for builds with
LLVM_BUILD_LLVM_DYLIB=ON and LLVM_LINK_LLVM_DYLIB=ON some unittests that
access symbols that are no longer public will need to be statically linked.

Before and after public symbol counts (using gcc 8.2.1, ld.bfd 2.31.1):
nm before/libLLVM-9svn.so | grep ' [A-Zuvw] ' | wc -l
36221
nm after/libLLVM-9svn.so | grep ' [A-Zuvw] ' | wc -l
26278

Reviewers: chandlerc, beanz, mgorny, rnk, hans

Reviewed By: rnk, hans

Subscribers: merge_guards_bot, luismarques, smeenai, ldionne, lenary, s.egerton, pzheng, sameer.abuasal, MaskRay, wuzish, echristo, Jim, hiraditya, michaelplatings, chapuni, jholewinski, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, javed.absar, sbc100, jgravelle-google, aheejin, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, zzheng, edward-jones, mgrang, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, kristina, jsji, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D54439
2020-01-14 19:46:52 -08:00
LLVM GN Syncbot
ae62b71111 [gn build] Port 36fcbb838c8 2020-01-14 19:06:58 +00:00
Simon Tatham
87e348953e [TableGen] Update editor modes for new keywords.
Summary:
D71407 and D71474 added new keywords to the Tablegen language:
`defvar`, `if`, `then` and `else`. This commit updates the various
editor modes to highlight them appropriately.

Some of the modes also didn't include `defset`, so I've added that too
while I was there.

Reviewers: MaskRay, lebedev.ri, plotfi

Reviewed By: lebedev.ri

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72693
2020-01-14 13:39:00 +00:00
Nico Weber
52ac79df7d [gn build] (manually) port b4a99a061f51 2020-01-13 14:13:35 -05:00
Fangrui Song
f9acff790a [X86][Disassembler] Merge X86DisassemblerDecoder.cpp into X86Disassembler.cpp and refactor 2020-01-12 00:53:36 -08:00