Commit Graph

11173 Commits

Author SHA1 Message Date
Nico Weber e32d061abe [gn build] (manually) port af98b0af67 2022-03-10 07:14:47 -05:00
LLVM GN Syncbot 9066a88f04 [gn build] Port c31014322c 2022-03-10 01:35:38 +00:00
Nico Weber c0700d3228 [gn build] (manually) port ffb9429b6f 2022-03-09 11:43:21 -05:00
LLVM GN Syncbot 741d64af28 [gn build] Port 2dc4a80ec0 2022-03-09 10:05:09 +00:00
LLVM GN Syncbot 7cc85f4d7e [gn build] Port c2cd15a665 2022-03-08 22:21:17 +00:00
Nico Weber 30b6b6a624 Revert "[gn build] (manually) port 0c2b43ab8c (X86MCTests)"
This reverts commit 336e3677ea.
0c2b43ab8c was reverted in cf9b3ef941.
2022-03-07 13:43:29 -05:00
Nico Weber 336e3677ea [gn build] (manually) port 0c2b43ab8c (X86MCTests) 2022-03-07 13:37:14 -05:00
Roman Lebedev 2b5a16420f
UpdateTestChecks: fix handling of UTC with spaces
We can't just split by space, that's not going to give us the same
argv we'd have gotten from the shell, it could be in a string,
we must actually parse that as argv.
2022-03-07 20:25:23 +03:00
LLVM GN Syncbot d229765e61 [gn build] Port 54d6b5b67f 2022-03-07 16:44:43 +00:00
LLVM GN Syncbot 20c4664552 [gn build] Port 205557c908 2022-03-07 16:17:21 +00:00
Roman Lebedev eadd1668d0
update_analyze_test_checks.py: fix UTC_ARGS handling
They should be both used if provided in the input test
and manifested in the updated test.
2022-03-07 18:22:19 +03:00
LLVM GN Syncbot 109d6e9dec [gn build] Port 311ff39178 2022-03-07 13:49:22 +00:00
Roman Lebedev df6c26fd34
update_analyze_test_checks.py: fix --filter handling
In particular, after filtering the check lines can't necessarily
use `-NEXT`, they may not be one directly after another.
2022-03-07 15:41:13 +03:00
LLVM GN Syncbot d7480d065d [gn build] Port 5f62156762 2022-03-07 09:08:13 +00:00
Stella Laurenzo 38151a08c2 Reapply "[cmake] Prefix gtest and gtest_main with "llvm_"."
This reverts commit 7cdda6b8ce.

Differential Revision: https://reviews.llvm.org/D121020
2022-03-04 13:45:43 -08:00
LLVM GN Syncbot fa8293bbc7 [gn build] Port c88deef0a7 2022-03-04 17:22:23 +00:00
LLVM GN Syncbot a1e91b53f6 [gn build] Port 7ee97c24ef 2022-03-04 17:22:23 +00:00
LLVM GN Syncbot 2954f5b3f1 [gn build] Port e865fa7530 2022-03-04 00:22:21 +00:00
Sebastian Neubauer 473efae3a1 [UpdateTestChecks] Don't skip first line with --filter
body_start was never used, resulting in the first filtered line to be
skipped.
Fixes the --filter option introduced in D117694.

Differential Revision: https://reviews.llvm.org/D119704
2022-03-03 17:27:14 +01:00
LLVM GN Syncbot d48aee6991 [gn build] Port 8de8731591 2022-03-03 12:36:38 +00:00
Martin Storsjö 9e2236fb7b Reapply [lit] Read command stdout/stderr as text on Windows
This takes care of normalizing newlines back to single LF instead
of CRLF.

Fix up a couple tests that accidentally pass binary data to stdout.

Differential Revision: https://reviews.llvm.org/D120623
2022-03-03 13:31:31 +02:00
LLVM GN Syncbot 926f77dc22 [gn build] Port 8bcbfb50e8 2022-03-03 10:33:40 +00:00
Stella Laurenzo 7cdda6b8ce Revert "[cmake] Prefix gtest and gtest_main with "llvm_"."
lldb buildbot failure. will investigate and roll forward.

This reverts commit 9f37775472.
2022-03-02 11:13:46 -08:00
Stella Laurenzo 9f37775472 [cmake] Prefix gtest and gtest_main with "llvm_".
The upstream project ships CMake rules for building vanilla gtest/gmock which conflict with the names chosen by LLVM. Since LLVM's build rules here are quite specific to LLVM, prefixing them to avoid collision is the right thing (i.e. there does not appear to be a path to letting someone *replace* LLVM's googletest with one they bring, so co-existence should be the goal).

This allows LLVM to be included with testing enabled within projects that themselves have a dependency on an official gtest release.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D120789
2022-03-02 10:53:32 -08:00
LLVM GN Syncbot 91e9af32fc [gn build] Port ae60884dfe 2022-03-02 08:58:54 +00:00
LLVM GN Syncbot e1fd5a86c7 [gn build] Port 65588a0776 2022-03-02 06:10:52 +00:00
LLVM GN Syncbot c007a17af6 [gn build] Port 30e612ebdf 2022-03-02 02:38:00 +00:00
Arthur Eubanks 81291b636d [gn build] Add -fsanitize=fuzzer to link flags in fuzzer targets when llvm_use_sanitize_coverage 2022-03-01 16:10:51 -08:00
Nico Weber 015cbd7218 [gn build] (manually) port 15ab7bc3af (TestingSupportTests) 2022-03-01 18:50:22 -05:00
Tong Zhang 17ce89fa80 [SanitizerBounds] Add support for NoSanitizeBounds function
Currently adding attribute no_sanitize("bounds") isn't disabling
-fsanitize=local-bounds (also enabled in -fsanitize=bounds). The Clang
frontend handles fsanitize=array-bounds which can already be disabled by
no_sanitize("bounds"). However, instrumentation added by the
BoundsChecking pass in the middle-end cannot be disabled by the
attribute.

The fix is very similar to D102772 that added the ability to selectively
disable sanitizer pass on certain functions.

In this patch, if no_sanitize("bounds") is provided, an additional
function attribute (NoSanitizeBounds) is attached to IR to let the
BoundsChecking pass know we want to disable local-bounds checking. In
order to support this feature, the IR is extended (similar to D102772)
to make Clang able to preserve the information and let BoundsChecking
pass know bounds checking is disabled for certain function.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D119816
2022-03-01 18:47:02 +01:00
Martin Storsjö f570da28e6 Revert "[lit] Read command stdout/stderr as text on Windows"
This reverts commit 640e45b9b2.

That commit seemed to quite conclusively break a number of buildbots.
2022-03-01 14:43:55 +02:00
Martin Storsjö 640e45b9b2 [lit] Read command stdout/stderr as text on Windows
This takes care of normalizing newlines back to single LF instead
of CRLF.

This on itself breaks on a couple tests that accidentally seem to
be writing binary data to stdout; make sure those cases are piped
to /dev/null instead of actually written to a terminal.

Differential Revision: https://reviews.llvm.org/D120623
2022-03-01 14:24:02 +02:00
Yatao Wang 8565b6f9f2 [UpdateLLCTestChecks] Add support for isel debug output in update_llc_test_checks.py
Add a check on run lines to pick up isel options in llc commands and allow
generating check lines of isel final output other than assembly. If llc command
line contains -debug-only=isel, update_llc_test_checks.py will try to scrub isel
output, otherwise, the script will fall back on default behaviour, which is try to
scrub assembly output instead.

The motivation of this change is to allow usage of update_llc_test_checks.py to
autogenerate checks of instruction selection results. In this way, we can detect
errors at an earlier stage before the compilation goes all the way to assembly.
It is an example of having some transparency for the stages between IR and
assembly. These generated tests are almost like "unit tests" of isel stage.

This patch only implements the initial change to differentiate isel output from
assembly output for Lanai. Other targets will not be supported for isel check
generation at the moment. Although adding support for it will only require
implementing the function regex and scrubber for corresponding targets.

The Lanai implementation was chosen mainly for the simplicity of demonstrating
the difference between isel checks and asm checks.

This patch also do not include the implementation of function prefix, which is
required for the generated isel checks to pass. I will put up a follow up revision
for the function prefix change to complete isel support.

Reviewed By: Flakebi

Differential Revision: https://reviews.llvm.org/D119368
2022-03-01 10:55:53 +01:00
LLVM GN Syncbot 7a5394938a [gn build] Port d8a2afb244 2022-03-01 07:28:51 +00:00
LLVM GN Syncbot 215f996424 [gn build] Port 2022-02-28 22:24:55 +00:00
LLVM GN Syncbot b6a6ddf134 [gn build] Port a3255f219a 2022-02-28 20:01:32 +00:00
LLVM GN Syncbot a44c984d94 [gn build] Port 61835d19a8 2022-02-28 10:06:58 +00:00
Zi Xuan Wu 21bce9007a [Support] Add CSKY target parser and attributes parser
Construct LLVM Support module about CSKY target parser and attribute parser.
It refers CSKY ABIv2 and implementation of GNU binutils and GCC.

https://github.com/c-sky/csky-doc/blob/master/C-SKY_V2_CPU_Applications_Binary_Interface_Standards_Manual.pdf

Now we only support CSKY 800 series cpus and newer cpus in the future undering CSKYv2 ABI specification.
There are 11 archs including ck801, ck802, ck803, ck803s, ck804, ck805, ck807, ck810, ck810v, ck860, ck860v.

Every arch has base extensions, the cpus of that arch family have more extended extensions than base extensions.
We need specify extended extensions for every cpu. Every extension has its enum value, name and related llvm feature string with +/-.
Every enum value represents a bit of uint64_t integer.

Differential Revision: https://reviews.llvm.org/D119917
2022-02-28 11:35:07 +08:00
Nico Weber a524a12231 [gn build] (manually) port 2e6ae1d3f2 more
b85f97bc00 missed one file.

With this, all files listed in libcxx/include/CMakeLists.txt are
listed in this BUILD.gn file again.
2022-02-26 10:46:35 -05:00
Nico Weber eab54b5a9d [gn build] (manually) port 01ace074fc more
410d4492e3 only hit half the added files.
2022-02-26 10:43:21 -05:00
Nico Weber 505e1cda57 [gn build] Define _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER when building libcxx
Ports 87a82490fc in a way. Has the effect of enabling warnings
when building libcxx itself, but more importantly this is required
after 5aaefa510e to not get build errors when building libcxx itself.
2022-02-26 10:25:01 -05:00
Nikita Popov 8dcb5e6bf5 Revert "[Driver] Default CLANG_DEFAULT_PIE_ON_LINUX to ON"
See post-commit discussion on https://reviews.llvm.org/D120305.
This change breaks the clang-ppc64le-rhel buildbot, though
there is suspicion that it's an issue with the bot. The change
also had a larger than expected impact on compile-time and
code-size.

This reverts commit 3c4ed02698
and some followup changes.
2022-02-26 15:32:49 +01:00
Christopher Di Bella 5aaefa510e [libcxx][modules] protects users from relying on detail headers
libc++ has started splicing standard library headers into much more
fine-grained content for maintainability. It's very likely that outdated
and naive tooling (some of which is outside of LLVM's scope) will
suggest users include things such as <__ranges/access.h> instead of
<ranges>, and Hyrum's law suggests that users will eventually begin to
rely on this without the help of tooling. As such, this commit
intends to protect users from themselves, by making it a hard error for
anyone outside of the standard library to include libc++ detail headers.

Differential Revision: https://reviews.llvm.org/D106124
2022-02-26 09:00:25 +00:00
Aakanksha bf60a1c546 Avoid comparisons between types of different widths in a loop condition to prevent the loop from behaving unexpectedly
This change fixes the code violations flagged in AMD compute CodeQL scan -
Query Description: "Comparisons between types of different widths in a loop condition can cause the loop to behave unexpectedly."

Differential Revision: https://reviews.llvm.org/D120355
2022-02-25 17:30:12 +00:00
LLVM GN Syncbot f23e5c0322 [gn build] Port 53dcd9efd1 2022-02-25 14:48:36 +00:00
LLVM GN Syncbot b7fba5325e [gn build] Port f9e8e92cf5 2022-02-25 12:21:23 +00:00
LLVM GN Syncbot 94ed8d48e3 [gn build] Port 29b512ba32 2022-02-25 11:47:20 +00:00
Fangrui Song 3c4ed02698 [Driver] Default CLANG_DEFAULT_PIE_ON_LINUX to ON
Default the option introduced in D113372 to ON to match all(?) major Linux
distros. This matches GCC and improves consistency with Android and linux-musl
which always default to PIE.
Note: CLANG_DEFAULT_PIE_ON_LINUX will be removed in the future.

Reviewed By: thesamesam

Differential Revision: https://reviews.llvm.org/D120305
2022-02-25 00:22:12 +00:00
Benjamin Kramer dc7a624e38 [tblgen] Compress CompositeSequences to 1/8th of its size. NFCI. 2022-02-24 19:31:33 +01:00
LLVM GN Syncbot dc19c70c81 [gn build] Port 7c1ee5e95f 2022-02-23 17:12:13 +00:00
LLVM GN Syncbot 7021b5a2fa [gn build] Port 25d7b4fb44 2022-02-23 10:12:15 +00:00
LLVM GN Syncbot ef9a659631 [gn build] Port a2fab82f33 2022-02-23 08:21:48 +00:00
Nico Weber 2df019ab5a [gn build] bump fmsc-version to 1926
This is needed to pick up the workaround in fb1aa286c1
when building with a modern MSVC (like LLVM now requires).
2022-02-22 17:47:27 -05:00
Simon Pilgrim 0b90007345 [GISel] Silence 'sideeffect in assertion' coverity warnings. NFCI.
Use llvm::enumerate to keep track of index.
2022-02-22 12:09:07 +00:00
LLVM GN Syncbot 7f019317b6 [gn build] Port 68f4131c94 2022-02-21 22:08:44 +00:00
LLVM GN Syncbot b6ca853b32 [gn build] Port 807766be3a 2022-02-21 21:52:37 +00:00
LLVM GN Syncbot c234b2793b [gn build] Port 85f4023e73 2022-02-21 11:51:36 +00:00
Simon Pilgrim dfa9716dd7 [GISel] Fix dead code warning in getRuleRangeForIdentifier emitted method. NFC.
Break the if-else chain as every block returns, and remove the return at the end of the function as the else block means this was never hit
2022-02-19 19:43:53 +00:00
LLVM GN Syncbot 3c84e68ddc [gn build] Port 57baa14d74 2022-02-18 15:11:13 +00:00
Nico Weber 0b13c6b88e [gn build] (manually) port 6c99a3469d 2022-02-18 06:56:32 -05:00
LLVM GN Syncbot b1d9136da1 [gn build] Port 0a4184909a 2022-02-18 06:12:10 +00:00
LLVM GN Syncbot 06f346cb72 [gn build] Port 8e979460bb 2022-02-18 04:18:16 +00:00
LLVM GN Syncbot d40b46e96d [gn build] Port eea3d90af1 2022-02-18 04:12:48 +00:00
LLVM GN Syncbot d7895c5914 [gn build] Port 19bdf44d85 2022-02-17 23:56:17 +00:00
LLVM GN Syncbot 7debcad0d0 [gn build] Port 807ba7aace 2022-02-17 21:41:09 +00:00
Nico Weber a569d6060d [gn build] (manually) port f75da0c8e6 (ObjCopy lib) 2022-02-17 08:56:35 -05:00
Michał Górny 2c5c243bb5 [llvm] [bindings/OCaml] Remove unused dep on ounit2
Remove the dependency on ounit2 and the relevant lit code.  It seems
that ounit2 is not used at all and all OCaml binding tests pass without
it installed.

Thanks for Shiwei Weng and Josh Berdine for bringing this to
my attention.

Differential Revision: https://reviews.llvm.org/D119884
2022-02-16 19:30:25 +01:00
Nico Weber 7d5edfaa57 [gn build] (semi-manually) port f87aa19be6 2022-02-16 12:56:02 -05:00
Peter Kasting c5fb05f663 Reland: Make lld-link work in a non-MSVC shell, add /winsysroot:
This relands 73e585e44d (and 0574b5fc65), with a fix for
the failing test (by using Optional<StringRef>s instead of
making StringRef::empty() mean absence of value).

Differential Revision: https://reviews.llvm.org/D118070
2022-02-16 09:22:39 -05:00
Sheng 314155eb8f [TableGen][VarLenCodeEmitterGen] Improve the error message
This gives a approximate error location. Although not very
accurate, it suffices to debug.

Reviewed By: myhsu

Differential Revision: https://reviews.llvm.org/D119684
2022-02-16 12:56:18 +08:00
LLVM GN Syncbot 6822d89e77 [gn build] Port c62eefb886 2022-02-15 19:28:46 +00:00
LLVM GN Syncbot 8cff26d290 [gn build] Port 987c7f407d 2022-02-15 18:33:42 +00:00
Nico Weber 22af2a482e [gn build] (manually) port 9c30bafd59
This is needed after b432eb5c84 to keep std::unexpected_handler
around (which libcxxabi uses from libcxx).
2022-02-15 13:33:19 -05:00
Nico Weber b432eb5c84 [gn build] (manually) port 3b625060fc (-std=c++20) more
8c54583b2e ported this only for libcxx, not libcxxabi.
As of 05337a756c, it's needed for libcxxabi too.
2022-02-15 12:35:36 -05:00
Min-Yih Hsu b99365a7f4 [TableGen] Add a new `encoder` directive into VarLenCodeEmitterGen
The new encoder directive can be used to specify custom encoder for a
single operand or slice. This is different from the EncoderMethod field
within an Operand, which affects every operands in the target.

In addition, this patch also changes the function signature of the
encoder method -- a new argument, InsertPost, is added to both the
default one (i.e. getMachineValue) and the custom one. This argument
provides the bit position where the operand will eventually be inserted.

Differential Revision: https://reviews.llvm.org/D119100
2022-02-14 20:41:15 -08:00
LLVM GN Syncbot 9e8a72babc [gn build] Port 5d1c1a243c 2022-02-14 21:39:38 +00:00
Louis Dionne f34f7dfe3a [release] Use a supported way of building libc++ when building the documentation
Instead of using the deprecated LLVM_ENABLE_PROJECTS build, use the
default runtimes build. This is just as fast, but it's supported.

Differential Revision: https://reviews.llvm.org/D119275
2022-02-14 16:01:11 -05:00
LLVM GN Syncbot 4aaa8e4e00 [gn build] Port 85355a560a 2022-02-14 19:57:49 +00:00
LLVM GN Syncbot f849a3adce [gn build] Port 2a8f9a5e95 2022-02-14 19:57:48 +00:00
LLVM GN Syncbot aa15274389 [gn build] Port de54e4ab78 2022-02-14 19:21:47 +00:00
LLVM GN Syncbot dd20a459d6 [gn build] Port 0f73fb18ca 2022-02-14 18:25:45 +00:00
LLVM GN Syncbot 16fcc2fd42 [gn build] Port 43c2348c5b 2022-02-14 17:55:08 +00:00
LLVM GN Syncbot 3efdfe722d [gn build] Port 00cd6c0420 2022-02-14 17:28:29 +00:00
LLVM GN Syncbot 31d992299c [gn build] Port 55bd22f853 2022-02-14 11:30:41 +00:00
Peter Waller 7f41643ef0 [gn build] Add host_cpu=arm64 & current_os=linux => aarch64-unknown-linux-gnu
I've been using this triple in development for a while without issues,
it's passing check-llvm and check-clang.

(The above is the commit message, but the build is currently broken since
D114639, I intend to submit this once it's passing again and it's accepted in
review)

Differential Revision: https://reviews.llvm.org/D119331
2022-02-14 10:49:37 +00:00
Joe Loser 861386dbd6
[libc++] Remove <experimental/filesystem> header
`<filesystem>` header has been around for a while now, so we can safely remove
`<experimental/filesystem>` header. `_LIBCPP_DEPRECATED_EXPERIMENTAL_FILESYSTEM`
suggests we were going to remove `<experimental/filesystem>` in llvm 11 release,
but we never did. So, remove the experimental header now, its associated tests,
and the `_LIBCPP_DEPRECATED_EXPERIMENTAL_FILESYSTEM` macro.

Differential Revision: https://reviews.llvm.org/D119603
2022-02-12 19:43:57 -05:00
Douglas Yung 437d4e01fe Revert "try to fix windows build after 73e585e44d" and
Revert "Reland "[lld/coff] Make lld-link work in a non-MSVC shell, add /winsysroot:""

This reverts commit 0574b5fc65 and 73e585e44d.

This change is causing the test Driver/cl-options.c to fail on Windows buildbots.
https://lab.llvm.org/staging/#/builders/204/builds/1343
2022-02-11 23:47:53 -08:00
Nico Weber 73e585e44d Reland "[lld/coff] Make lld-link work in a non-MSVC shell, add /winsysroot:"
This relands commit b3b2538df1, except that the new files in Support
are instead in a new library WindowsDriver.
2022-02-11 17:07:33 -05:00
Adrian Prantl baac665adf Revert "[lld/coff] Make lld-link work in a non-MSVC shell, add /winsysroot:"
This reverts commit b3b2538df1,
it introduced a cycklic module depenency that broke the -DLLVM_ENABLE_MODULES=1 build.
2022-02-11 13:07:23 -08:00
Peter Kasting b3b2538df1 [lld/coff] Make lld-link work in a non-MSVC shell, add /winsysroot:
Makes lld-link work in a non-MSVC shell by autodetecting MSVC toolchain. Also
adds support for /winsysroot and a few other switches.

All this is done by refactoring to share code with clang-cl's existing support
for the same.

Differential Revision: https://reviews.llvm.org/D118070
2022-02-11 13:55:18 -05:00
Arthur Eubanks d408abf403 [gn build] Manually port c7eb846345
Since the bot is broken due to hwasan issues, it's not auto updating the file lists.
2022-02-11 10:54:43 -08:00
Nikolas Klauser 169a66eac8 [libc++] Remove __functional_base
Reviewed By: ldionne, Quuxplusone, #libc

Spies: Mordante, mgorny, libcxx-commits, arichardson, llvm-commits, arphaman

Differential Revision: https://reviews.llvm.org/D119439
2022-02-11 19:16:01 +01:00
LLVM GN Syncbot ae0d861cb3 [gn build] Port 31f9519d48 2022-02-11 17:36:54 +00:00
Min-Yih Hsu 31f9519d48 [TableGen][CodeEmitter] Introducing the VarLenCodeEmitterGen infrastructure
Full write up:
https://gist.github.com/mshockwave/66e98d099256deefc062633909bb7b5b

The existing CodeEmitterGen infrastructure is unable to generate encoder
function for ISAs with variable-length instructions. This patch
introduces a new infrastructure to support variable-length instruction
encoding, including a new TableGen syntax for writing instruction
encoding directives and a new TableGen backend component,
VarLenCodeEmitterGen, built on top of CodeEmitterGen.

Differential Revision: https://reviews.llvm.org/D115128
2022-02-11 09:31:11 -08:00
Jay Foad b59ad64ead [TableGen][AMDGPU] Allow empty register classes
Remove ARTIFICIAL_VGPR which only existed to make VReg_1 not empty.

Differential Revision: https://reviews.llvm.org/D119552
2022-02-11 17:30:04 +00:00
LLVM GN Syncbot 67c02e07c0 [gn build] Port 3b470d1ce9 2022-02-11 16:20:57 +00:00
LLVM GN Syncbot 0498f92ac7 [gn build] Port 1e77b396ff 2022-02-11 16:11:07 +00:00
Jay Foad 9fe8a74c43 [TableGen] Dump RC.Allocatable with -register-info-debug 2022-02-11 14:07:19 +00:00
Amy Kwan db691903d2 [test-release.sh] Add option to disable building clang-tools-extra during release testing.
This patch adds an option (no-clang-tools) to disable building clang-tools-extra when
performing release testing. Prior to this patch, clang-tools-extra was built by default,
but on some platforms (such as AIX), clang-tools-extra is not supported, and so we do
not normally build it. Furthermore, this change should not change the invocation for
targets that build clang-tools-extra normally.

Differential Revision: https://reviews.llvm.org/D119520
2022-02-11 07:50:03 -06:00
Konrad Kleine 32a0482a65 Add cmake to source release tarballs
I've split the git archive generation into three steps:

1. generate pure tarball
2. append top-level cmake directory to all tarballs
3. compress the archive

This was inspired by D118252 and can be considered an alternative
approach for all projects to have access to the shared cmake
directory when building in standalone mode.

When generating source tarballs on my local laptop it takes 9 minutes and 45 seconds WITH this patch applied. When this patch is not applied, it takes 9minutes and 38 seconds. That means, this patch introduces a slowdown of 7 seconds, which seems fair.

Reviewed By: tstellar

Differential Revision: https://reviews.llvm.org/D118481
2022-02-11 11:54:44 +01:00
Arthur Eubanks 2fa87ab524 [docs] Replace `opt -analyze` with better alternatives.
`opt -analyze` is legacy PM-specific. Show better ways of doing the same
thing, generally with some sort of `-passes=print<foo>`.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D119486
2022-02-10 15:38:31 -08:00
LLVM GN Syncbot d2a4f813e4 [gn build] Port f927021410 2022-02-10 23:27:43 +00:00
LLVM GN Syncbot 37c02c14a4 [gn build] Port 290e5722e8 2022-02-10 22:52:25 +00:00
LLVM GN Syncbot 6dbae1f7d9 [gn build] Port b380a31de0 2022-02-10 22:24:30 +00:00
Douglas Yung 98504fbb3d Make shtest-format.py CHECK lines more flexible
The test sometimes fails on Windows due to a warning emitted by bash about not
being able to find the /tmp directory causing this test to randomly fail. This
update makes the test more flexible to account for this possibility and should
hopefully make it more reliable.

Reviewed By: probinson

Differential Revision: https://reviews.llvm.org/D118691
2022-02-10 13:50:10 -08:00
Simon Pilgrim 1211c41805 [FileCheck] Fix initialized but never used static analyzer warning. NFC.
Remove superfluous variable initialization, the variable is assigned by both paths immediately afterward.
2022-02-10 21:03:45 +00:00
LLVM GN Syncbot 8df4766eea [gn build] Port bd3a1de683 2022-02-10 18:38:23 +00:00
LLVM GN Syncbot 1e421108c4 [gn build] Port 9d90531904 2022-02-10 15:02:15 +00:00
Lu Weining 6caee48909 [Utils][LoongArch](5/6) Add a --bits-endian option to extract-section.py
This is a split patch of D115862 which adds a --bits-endian option to
extract-section to make it possible to print bits in specified endianness.
It means that we can print instruction encoding of some targets like LoongArch
as bits[0] to bits[31] from right to left by specifing --bits-endian little.

Differential revision: https://reviews.llvm.org/D116100
2022-02-10 10:23:34 +00:00
Roman Lebedev 09d20761eb
[llvm] Fix update_analyze_test_checks and add a test to prevent further breakage 2022-02-10 12:33:33 +03:00
Diana Picus e931f92550 test-release.sh: Remove test-suite from LLVM_ENABLE_PROJECTS
I think this was just being ignored before, but now it crashes because
we're checking if the projects that we're trying to enable are valid.
There is no test-suite project (it's a separate repo with separate
handling), so we should never try to enable it.

Differential Revision: https://reviews.llvm.org/D119322
2022-02-10 09:29:15 +01:00
LLVM GN Syncbot 942b9652bc [gn build] Port 8f1d8785df 2022-02-10 04:36:06 +00:00
Arthur Eubanks 27e0c6670a [gn build] Port 76cad51b 2022-02-09 15:16:05 -08:00
LLVM GN Syncbot e92ff1b4fa [gn build] Port f1984b1433 2022-02-09 17:34:07 +00:00
LLVM GN Syncbot 990996bf8b [gn build] Port 46a6f5ae14 2022-02-09 17:34:06 +00:00
Arthur Eubanks 022baf71ed [gn build] Port a1862d78eb 2022-02-09 09:11:06 -08:00
serge-sans-paille 33986970a4 Prepare for LLVMMC headers cleanup
Be more explicit about which headers should be included in MC files generated by
tblgen.

See also: https://reviews.llvm.org/D119244
2022-02-09 11:09:16 +01:00
Kirill Bobyrev 76b855d845 [llvm] Add IWYU pragmas to GTest
This will allow using tools like Include-What-You-Use and clangd
IncludeCleaner. The tools will correctly identify the public headers
responsible for importing symbols in the testing code.

This is a backport of 100f6fbf5f

The only untouched file from that patch is
googletest/include/gtest/gtest_prod.h because the change is unrelated.

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D119320
2022-02-09 11:05:59 +01:00
Jonas Devlieghere 43d3d886a0 [llvm] Recognize arm64 as target-aarch64 in lit
Recognize arm64 triples as AArch64 so we can XFAIL/skip tests using
target-aarch64.

Differential revision: https://reviews.llvm.org/D119169
2022-02-08 21:29:21 -08:00
Bill Wendling deaf22bc0e [X86] Implement -fzero-call-used-regs option
The "-fzero-call-used-regs" option tells the compiler to zero out
certain registers before the function returns. It's also available as a
function attribute: zero_call_used_regs.

The two upper categories are:

  - "used": Zero out used registers.
  - "all": Zero out all registers, whether used or not.

The individual options are:

  - "skip": Don't zero out any registers. This is the default.
  - "used": Zero out all used registers.
  - "used-arg": Zero out used registers that are used for arguments.
  - "used-gpr": Zero out used registers that are GPRs.
  - "used-gpr-arg": Zero out used GPRs that are used as arguments.
  - "all": Zero out all registers.
  - "all-arg": Zero out all registers used for arguments.
  - "all-gpr": Zero out all GPRs.
  - "all-gpr-arg": Zero out all GPRs used for arguments.

This is used to help mitigate Return-Oriented Programming exploits.

Reviewed By: nickdesaulniers

Differential Revision: https://reviews.llvm.org/D110869
2022-02-08 17:42:54 -08:00
LLVM GN Syncbot f556743434 [gn build] Port 216575e581 2022-02-09 01:18:18 +00:00
Nico Weber 5167f3a73a [gn build] (manually) port 216575e581 2022-02-08 20:17:40 -05:00
Nico Weber 94064aaeb1 [gn build] (manually) port 4a6553f4c2 some more 2022-02-08 20:17:40 -05:00
Nico Weber ae92365397 [gn build] (manually) port 817d897b57 (LIBCXX_ABI_UNSTABLE) 2022-02-08 19:55:18 -05:00
Sylvestre Ledru f2c2e924e7 Fix a typo (occured => occurred)
Reported:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1005195
2022-02-08 21:35:26 +01:00
LLVM GN Syncbot 34d557f38a [gn build] Port 4a6553f4c2 2022-02-08 19:21:13 +00:00
Andy Yankovsky 3df88ec335 [Support] Don't print stacktrace if DbgHelp.dll hasn't been loaded yet
On Windows certain function from `Signals.h` require that `DbgHelp.dll` is loaded. This typically happens when the main program calls `llvm::InitLLVM`, however in some cases main program doesn't do that (e.g. when the application is using LLDB via `liblldb.dll`). This patch adds a safe guard to prevent crashes. More discussion in
https://reviews.llvm.org/D119009.

Reviewed By: aganea

Differential Revision: https://reviews.llvm.org/D119181
2022-02-08 16:37:36 +00:00
Nico Weber 74e90900e3 [gn build] (manually) port 157bbe6aea 2022-02-07 18:45:04 -05:00
Arthur Eubanks ed402291ae [gn build] Port D119058 2022-02-07 09:29:27 -08:00
LLVM GN Syncbot 05a374fa69 [gn build] Port c63522e6ba 2022-02-07 11:59:15 +00:00
LLVM GN Syncbot b9d4fe87e1 [gn build] Port 679f8a885b 2022-02-05 01:52:05 +00:00
Arthur Eubanks 69873633bd [gn build] Port dbed14d 2022-02-04 12:52:33 -08:00
LLVM GN Syncbot e55ace6c37 [gn build] Port 1d8bbe3d25 2022-02-04 18:44:32 +00:00
LLVM GN Syncbot 6dbba770a8 [gn build] Port 4a02562275 2022-02-04 17:43:11 +00:00
LLVM GN Syncbot 8b84ed23d9 [gn build] Port 44cdca37c0 2022-02-04 17:43:10 +00:00
Nico Weber 466c0d0dc7 [gn build] (manually) port e1db505b42 (clang-pseudo) 2022-02-04 10:17:02 -05:00
Haojian Wu 2189960e65 [pseudo] Rename Tests.cpp => Test.cpp
To be consistent with other files in clang unittest directory.
2022-02-04 09:48:14 +01:00
Amy Kwan 413b35cd74 [test-release.sh] Set TEST_SUITE_HOST_CC to the release testing build compiler when compiling test-suite tools.
The tools used by test-suite are originally configured to compile with cc by
default, and this is dictated by TEST_SUITE_HOST_CC.
However, it is possible that on some systems that the version of cc may either
not be present or it may not be able to compile the tools as it may be too old,
which could be an issue seen during release testing.

This patch updates the compiler to be the default build compiler that is used
for release testing. If no such compiler it specified, then cc will be set as
the test-suite tools build compiler by default (as it already is set under
TEST_SUITE_HOST_CC).

Differential Revision: https://reviews.llvm.org/D118357
2022-02-03 21:31:44 -06:00
Arthur Eubanks aaf2a47b1b [gn build] Set -fmsc-version=1920 on Windows
Now that the minimum version version of MSVC required to build LLVM has
been bumped, we see

  ../../llvm/include\llvm/Support/Compiler.h(94,2): error: LLVM requires
  at least VS 2019.
  #error LLVM requires at least VS 2019.

e.g. http://45.33.8.238/win/53703/step_4.txt

1920 corresponds to the earliest version of VS 2019.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D118713
2022-02-03 15:56:02 -08:00
Tom Stellard daf82a51a0 github: Add actions to automate part of the release workflow
This adds support for automatically cherry-picking and testing fixes for the
release branch using 'commands' in issue comments.  The two supported commands are:

/cherry-pick <commit1> <commit2> ...

Which will backport and test commits from main.  And also

/branch owner/repo/branch

Which will test commits from the given branch.

Reviewed By: alexbatashev, kwk

Differential Revision: https://reviews.llvm.org/D117386
2022-02-03 15:03:59 -08:00
Nico Weber e017dbab8c [gn build] (manually) attempt to port 95d609b549 2022-02-03 16:53:34 -05:00
LLVM GN Syncbot cf2bc63a1b [gn build] Port c34698a811 2022-02-03 16:04:30 +00:00
Nico Weber 9b65641d5e [gn build] (manually) port 20e05b9f0e (ClangPseudoTests) 2022-02-03 10:55:53 -05:00
LLVM GN Syncbot 42c61a5dfc [gn build] Port 610979b301 2022-02-03 01:19:34 +00:00
Nico Weber 5c17f9e109 [gn build] (manually) port ded733bd4 (llvm-remark-size-diff) 2022-02-02 19:32:54 -05:00
Louis Dionne 26a1830e39 [release] Use the Bootstrapping build for building LLVM releases
Instead of using the (now deprecated) Projects build for libcxx, libcxxabi,
libunwind and compiler-rt, this patch uses the Bootstrapping build. This
implies that Clang will be built from scratch, and then the runtimes will
be built using that just-built Clang instead of the system compiler.
This is the correct way of assembling a toolchain, since we don't want
to ship runtimes that were built with a non-Clang compiler (or a
potentially older Clang).

Differential Revision: https://reviews.llvm.org/D112748
2022-02-02 17:19:10 -05:00
LLVM GN Syncbot ff024374de [gn build] Port 712b31e2d4 2022-02-02 21:28:57 +00:00
Rashmi Mudduluru faabdfcf7f [analyzer] Add support for __attribute__((returns_nonnull)).
Differential Revision: https://reviews.llvm.org/D118657
2022-02-02 11:46:52 -08:00
LLVM GN Syncbot f587ff3ee1 [gn build] Port 256d253332 2022-02-02 16:10:56 +00:00
Tom Stellard a2601c9887 Bump the trunk major version to 15 2022-02-01 23:54:52 -08:00
Craig Topper 7f6441f96e [TableGen][RISCV] Relax a restriction in generating patterns for commutable SDNodes.
Previously, all children would be checked to see if any were an
explicit Register. If anywhere no commutable patterns would be
generated. This patch loosens the restriction to only check the
children that are being commuted.

Digging back through history, this code predates the existence of
commutable intrinsics and commutable SDNodes with more than 2
operands. At that time the loop would count the number of children that
weren't registers and if that was equal to 2 it would allow commuting.
I don't think this loop was re-considered when commutable
intrinsics were added or when we allowed SDNodes with more than 2
operands.

This important for RISCV were our isel patterns have a V0 mask
operand after the commutable operands on some RISCVISD opcodes.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D117955
2022-02-01 21:07:03 -08:00
Nico Weber a91a00d378 Reland "[gn build] (manually) port 36892727e4f1"
This reverts commit da01fb7471.
Matches 84f137a590.

Also adds LLVM_INSTALL_TOOLCHAIN_ONLY, which 84f137a590 added too.
2022-02-01 22:32:31 -05:00
Jonas Paulsson 16978d853b [TableGen] Fix reporting from CodeGenSchedModels::checkCompleteness().
Make the check for a complete SchedModel work as expected: report any
supported instruction not having scheduler info.

For unclear reasons there was a variable 'HadCompleteModel' that caused
e.g. new instructions for a new subtarget not to be reported. This variable
is now simply removed as all in-tree targets seem to build fine without it.

Review: Simon Pilgrim

Differential Revision: https://reviews.llvm.org/D118628
2022-02-01 11:32:38 -06:00
Nico Weber 93dc66a088 [gn build] unconfuse sync script after 762f0b5463 2022-02-01 07:22:33 -05:00
tyb0807 762f0b5463 [ARM] Make getInstSizeInBytes() use instruction size from InstrInfo.td
Currently, ARMBaseInstrInfo::getInstSizeInBytes() uses hard-coded
instruction size for some pseudo-instructions, while this
information should ideally be found in ARMInstrInfo.td,
ARMInstrThumb(2).td files (which can be accessed via MCInstrDesc). Hence,
the .td files should be updated and no hard-coded instruction sizes
should be used by getInstSizeInBytes() anymore.

Differential Revision: https://reviews.llvm.org/D118009
2022-02-01 10:39:14 +00:00
Nico Weber d1daa54f36 [gn build] (manually) port 551b177452 2022-01-31 16:15:48 -05:00
David Greene ecd46edd61 [UpdateTestChecks] Re-add --filter and --filter-out options
Re-add filtering options with fixes for failed tests.  We were not passing the
is_filtered argument in all check generator calls in update_cc_test_checks.py

Enhance the various update_*_test_checks.py tools to allow filtering the tool
output with regular expressions.  The --filter option will emit only tool output
lines matching the given regular expression while the --filter-out option will
emit only tools output lines not matching the given regular expression.  Filters
are applied in order of appearance on the command line (or in UTC_ARGS) and the
first matching filter terminates the search.

This allows test authors to create more focused tests by removing irrelevant
tool output and checking only the pieces of output necessary to test the desired
functionality.

Differential Revision: https://reviews.llvm.org/D117694
2022-01-31 13:11:40 -08:00
LLVM GN Syncbot 6d22f04975 [gn build] Port f3514af492 2022-01-31 15:38:08 +00:00
Nico Weber da01fb7471 Revert "[gn build] (manually) port 36892727e4f1"
This reverts commit 7b2dfe1c22.

Matches ab3b89855c.
2022-01-31 07:15:36 -05:00
serge-sans-paille 2dde5c9734 Cleanup llvm/utils/TableGen headers
Based on the output of include-what-you-use.
It's an utility directory, so no much impact on other code areas.

clang++ -E  -Iinclude -I../llvm/include ../llvm/utils/TableGen/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l
before: 4327274
after:  4316190

Related discourse thread: https://llvm.discourse.group/t/include-what-you-use-include-cleanup
Differential Revision: https://reviews.llvm.org/D118466
2022-01-31 11:16:28 +01:00
Nico Weber 7b2dfe1c22 [gn build] (manually) port 36892727e4 2022-01-29 16:06:24 -05:00
Craig Topper 1aeb3314d8 [TableGen] Detect multiple Processors with the same name.
Due to a bad merge we ended up with duplicate entries in our
downstream repo. I was surprised that nothing caught it. I wrote
this check so I could fix our downstream repo and figured I might
as well share it.

Reviewed By: RKSimon, spatel

Differential Revision: https://reviews.llvm.org/D118497
2022-01-28 22:53:51 -08:00
Nico Weber 106f2b2dfb [gn build] (manually) port 99217fa8a0 2022-01-28 22:33:19 -05:00
David Greene 7e32d2b21a Revert "[UpdateTestChecks] Add --filter and --filter-out options"
Broke some update-test-checks tests.  Reverting while developing a fix.

This reverts commit 030f71698d.
2022-01-28 17:06:51 -08:00
David Greene 030f71698d [UpdateTestChecks] Add --filter and --filter-out options
Enhance the various update_*_test_checks.py tools to allow filtering the tool
output with regular expressions.  The --filter option will emit only tool output
lines matching the given regular expression while the --filter-out option will
emit only tools output lines not matching the given regular expression.  Filters
are applied in order of appearance on the command line (or in UTC_ARGS) and the
first matching filter terminates the search.

This allows test authors to create more focused tests by removing irrelevant
tool output and checking only the pieces of output necessary to test the desired
functionality.

Differential Revision: https://reviews.llvm.org/D117694
2022-01-28 14:08:07 -08:00
LLVM GN Syncbot 00d4316cd0 [gn build] Port f489e86a24 2022-01-28 19:20:50 +00:00
Jay Foad de37912f00 [update_test_checks] Fix option name in warning message 2022-01-28 14:45:47 +00:00
Milica Matic 402f91bcbb [llvm-mca] Plot as result of comparing multiple files
This patch introduces a new options for script llvm-mca-compare.py
(-plot-resource-pressure, -plot) to draw plots for llvm-mca tool
statistics and option (--plot-path) to specify relative path where
you want to save the plots.

Differential Revision: https://reviews.llvm.org/D115718
2022-01-28 13:04:52 +01:00
serge-sans-paille bd059b3bc9 Cleanup includes for LLVMTableGenGlobalISel
Based on the output of include-what-you-use. No big deal here, it's a utils
library and it doesn't seem to be used a lot across the codebase.

$ clang++ -E  -Iinclude -I../llvm/include ../llvm/utils/TableGen/GlobalISel/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l
before: 573143
after:  568908

Related Discourse thread: https://llvm.discourse.group/t/include-what-you-use-include-cleanup
Differential Revision: https://reviews.llvm.org/D118375
2022-01-28 11:50:50 +01:00
Pierre Gousseau 14e8bedc98 [tblgen] Disable lsan weak hook when building with msvc
This change is to fix a link time error when building llvm with msvc.

MSVC's implementation does not support weak hook or lsan so this change
disables lsan's weak hook definition.
Only GCC supports LSan.

Tested with visual studio 2019 v16.9.6

Reviewed By: aaron.ballman, rnk

Differential Revision: https://reviews.llvm.org/D118162
2022-01-28 10:02:52 +00:00
Nico Weber 936f247ade [gn build] fix mac build after 0c425b43b9 2022-01-27 20:35:17 -05:00
Arthur Eubanks 0c425b43b9 [gn build] Add support for check-asan
With these changes, check-asan passes on Linux and Windows.

There are a couple libraries we need to add support for, asan_static, asan_preinit, and the shared library version of asan proper.
Since we need to build the asan proper sources twice, once with -DASAN_DYNAMIC and once without, those sources are no longer in a source_set.
Much of the check-asan target is taken from the existing check-hwasan target.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D118307
2022-01-27 16:09:43 -08:00
LLVM GN Syncbot aa53d0781b [gn build] Port bf20a09790 2022-01-27 23:10:54 +00:00
Sergej Jaskiewicz 773467c812 [LLDB] Add formatters for PointerIntPair, PointerUnion
Also, add summaries for `SmallVector` and `ArrayRef`,
and fix the `StringRef` summary provider so it doesn't
ignore the `Length` field.

Differential Revision: https://reviews.llvm.org/D117779
2022-01-27 12:54:16 +03:00
Arthur Eubanks b75eea12fe [gn build] Format gn files 2022-01-26 18:37:03 -08:00
Arthur Eubanks f73f367f72 [gn build] Move -fno-builtin to crt_code
crt_code seems to correspond to SANITIZER_COMMON_CFLAGS which contains -fno-builtin.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D118288
2022-01-26 18:33:35 -08:00
Arthur Eubanks 0a4bbdabe3 [gn build] Remove unnecessary include_dirs
These are already part of crt_code.
2022-01-26 15:40:54 -08:00
Arthur Eubanks 1d085f1147 [gn build] Don't pass -fuse-ld=lld to compiler-rt tests
This was done for check-hwasan, but compiler-rt/test/hwasan/lit.cfg.py
already does that.

This makes check-asan (to be submitted) fail on Windows due to using
lld-link (as opposed to MSVC link.exe) in tests. That seems like a
problem that should be fixed, but that's orthogonal to this patch.
2022-01-26 15:08:22 -08:00
Arthur Eubanks 10ce1eed47 [gn build] Remove incorrect interception dependency 2022-01-26 15:07:41 -08:00
LLVM GN Syncbot 2ebf3263e7 [gn build] Port b1d946cbf7 2022-01-26 20:46:39 +00:00
Arthur Eubanks cbc623c767 [gn build] Make HAVE_MALLINFO2 a gn arg, default to false
D117916 broke some people because some distros are still using a glibc
older than 2.33. Add gn arg llvm_have_mallinfo2 and default to false for
now.

Differential Revision: https://reviews.llvm.org/D118269
2022-01-26 10:28:55 -08:00
Arthur Eubanks db0631096e [gn build] Manually port D118110 2022-01-26 09:50:02 -08:00
Benjamin Kramer f15014ff54 Revert "Rename llvm::array_lengthof into llvm::size to match std::size from C++17"
This reverts commit ef82063207.

- It conflicts with the existing llvm::size in STLExtras, which will now
  never be called.
- Calling it without llvm:: breaks C++17 compat
2022-01-26 16:55:53 +01:00
serge-sans-paille 297bbf1062 Fix ambiguous call to llvm::size introduced in ef82063207 2022-01-26 16:54:26 +01:00
serge-sans-paille ef82063207 Rename llvm::array_lengthof into llvm::size to match std::size from C++17
As a conquence move llvm::array_lengthof from STLExtras.h to
STLForwardCompat.h (which is included by STLExtras.h so no build
breakage expected).
2022-01-26 16:17:45 +01:00
Marek Kurdej 1f3aa2af9d [Visualizers] Fix SmallVector<T> visualizer for T inside an anonymous namespace. Use `value_type` instead of `$T1`.
At least on MSVC 2022, using $T1 does not work.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D118105
2022-01-26 15:59:43 +01:00
LLVM GN Syncbot 8700b22cf6 [gn build] Port 37c4bd0fdb 2022-01-26 13:56:09 +00:00
LLVM GN Syncbot bfd5696b55 [gn build] Port 5da7c04003 2022-01-26 12:14:21 +00:00
LLVM GN Syncbot 3d8fa00b2d [gn build] Port 8e29d19b8d 2022-01-26 11:52:58 +00:00
LLVM GN Syncbot c5907f8a72 [gn build] Port 19eaad94c4 2022-01-26 11:47:14 +00:00
Leonard Grey f23d57a632 [lld-macho] Rename CallGraphSort.{h,cpp} to SectionPriorities
This is in preparation for moving the code that parses and processes
order files into this file.

See https://reviews.llvm.org/D117354 for context and discussion.
2022-01-25 12:15:14 -05:00
Marek Kurdej 4100cf2e92 [Visualizers] Fix Optional visualizer.
As discussed in https://reviews.llvm.org/D118105#3268773, OptionalStorage has been changed in commit fb97305750, but the visualizer still tries to use old members.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D118117
2022-01-25 14:16:03 +01:00
Nancy Wang 22b0fe3fd9 [SystemZ][z/OS]: fix lit tmp_dir to use - instead of _
Latest upstream change in https://reviews.llvm.org/D117179 causes lit regressions on z/OS, when TMPDIR is exported and contains _, ld linker fails, it doesnt recognize _ specified in SYSLIN. this seems a limitation on z/OS. we need to fix lit.

Differential Revision: https://reviews.llvm.org/D118071
2022-01-24 17:47:48 -05:00
LLVM GN Syncbot 5fa40fb293 [gn build] Port db2944e34b 2022-01-24 17:15:34 +00:00
LLVM GN Syncbot a922324590 [gn build] Port 787ccd345c 2022-01-24 17:15:33 +00:00
LLVM GN Syncbot 54f1d95066 [gn build] Port 3696c70e67 2022-01-24 12:06:49 +00:00
LLVM GN Syncbot 631f3e6215 [gn build] Port d2e8fb3318 2022-01-23 16:30:34 +00:00
Arthur Eubanks 6df05697ca [gn build] Set HAVE_MALLINFO2=1
I'm seeing deprecated warnings due to using mallinfo() instead of
mallinfo2().

  ../../llvm/lib/Support/Unix/Process.inc:98:10: warning: 'mallinfo' is deprecated [-Wdeprecated-declarations]
    mi = ::mallinfo();

mallinfo2() is part of glibc 2.33 which was released in Feb 2021, which
is fairly recent but I think gn users should be using fairly up to date
glibcs.

If this breaks people we could make this a gn arg instead.

Differential Revision: https://reviews.llvm.org/D117916
2022-01-21 14:02:42 -08:00
Arthur Eubanks e39c262979 Revert "[gn build] Set HAVE_MALLINFO2=1"
This reverts commit 9f4cc5a6bb.

Breaks http://45.33.8.238/macm1/26108/step_4.txt.
2022-01-21 13:53:03 -08:00
Arthur Eubanks 9f4cc5a6bb [gn build] Set HAVE_MALLINFO2=1
I'm seeing deprecated warnings due to using mallinfo() instead of
mallinfo2().

../../llvm/lib/Support/Unix/Process.inc:98:10: warning: 'mallinfo' is deprecated [-Wdeprecated-declarations]
  mi = ::mallinfo();

mallinfo2() is part of glibc 2.33 which was released in Feb 2021, which
is fairly recent but I think gn users should be using fairly up to date
glibcs.

If this breaks people we could make this a gn arg instead.

Differential Revision: https://reviews.llvm.org/D117916
2022-01-21 13:38:27 -08:00
LLVM GN Syncbot a65934241c [gn build] Port 1755f5b1d7 2022-01-21 02:11:31 +00:00
LLVM GN Syncbot 14a2964698 [gn build] Port 83d59e05b2 2022-01-20 20:02:50 +00:00
LLVM GN Syncbot 608a9c0e79 [gn build] Port 63a991d035 2022-01-20 20:02:49 +00:00
Nico Weber 91eca967b9 [gn build] (manually) port f29256a64a 2022-01-20 11:02:06 -05:00
Nico Weber 70002a7a62 [gn build] (manually) port 30c17e70a4 2022-01-19 21:15:31 -05:00
Nico Weber cc639dde8c [gn build] port c22329972f (lldb REPL/Clang)
Fixes `lldb-shell :: REPL/Basic.test` in the gn build, making
check-lldb pass (on Linux) again.
2022-01-19 11:32:53 -05:00
Nico Weber 7260a926cf [gn build] link lldb-vscode against ws2_32.lib
Necessary after aaa50e54e6.
2022-01-19 11:06:55 -05:00
Lukáš Zaoral 14a793ab05 [lit] Fix compatibility with upstream gtest
Upstream gtest now prints 'Running main() from FILE' instead of
plain 'Running main() from gtest_main.cc'. Thus, all such tests
ended-up being mistakenly marked as UNRESOLVED.

Patch by @lzaoral

Differential Revision: https://reviews.llvm.org/D100043
2022-01-19 08:02:28 -08:00
Nico Weber aaa50e54e6 [gn build] port b2a162e63b (liblldb.dll)
This requires making liblldb a dll on Windows.
Things still work with a static lib on non-Windows, so keep it a
static lib there for now.
2022-01-19 10:50:08 -05:00
LLVM GN Syncbot c2e8b54d59 [gn build] Port df51be85e4 2022-01-18 17:28:57 +00:00
Jan Svoboda 5f4ae56457 [llvm] Remove uses of `std::vector<bool>`
LLVM Programmer’s Manual strongly discourages the use of `std::vector<bool>` and suggests `llvm::BitVector` as a possible replacement.

This patch does just that for llvm.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D117121
2022-01-18 18:20:45 +01:00
Tim Northover 51f743db08 TableGen: sort SearchableTable emission order by fields, not top-level name
This is often used for anonymous definitions, so we were sorting by
"anonymous_1234" record names, which while less bad than pointers can be easily
perturbed by adding code even in completely unrelated systems. That causes test
failures on AArch64 when sysregs with multiple valid names suddenly start
printing a different one.
2022-01-18 12:59:41 +00:00
Shao-Ce SUN efd72ee23b [NFC][SDNode] Use `StringSwitch` instead of `if`
Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D117448
2022-01-18 08:12:26 +08:00
LLVM GN Syncbot bc17de79ee [gn build] Port e69a3d18f4 2022-01-17 21:32:04 +00:00
LLVM GN Syncbot b50c10fe59 [gn build] Port e6b153947d 2022-01-16 16:03:49 +00:00
LLVM GN Syncbot 9a0e6b2abd [gn build] Port f860fe3622 2022-01-16 13:58:27 +00:00
Tom Stellard a2adebf409 workflows: Make issue-subscriber more robust for labels with special characters
Also, replace the existing actionscript implementation with a python
script that can be run outside of GitHub Actions.  The intention is
that going forward, all github action functionality would be implemented
in this script.

Reviewed By: kwk

Differential Revision: https://reviews.llvm.org/D116762
2022-01-14 22:04:54 -08:00
LLVM GN Syncbot 538ffd4a24 [gn build] Port 5726e55981 2022-01-14 15:05:57 +00:00
LLVM GN Syncbot b8367518e7 [gn build] Port d3729bb384 2022-01-14 01:58:03 +00:00
Julian Lettner 0f6f6284d7 [lit] Make sure our test temp directory is actually used by tests
All credit to Martin Storsjö (mstorsjo) who describes the issue here:
https://github.com/llvm/llvm-project/issues/53167

Differential Revision: https://reviews.llvm.org/D117179
2022-01-13 11:23:32 -08:00
LLVM GN Syncbot e2c78f99c4 [gn build] Port 67151d029b 2022-01-13 17:34:38 +00:00
LLVM GN Syncbot 32d5634b1a [gn build] Port b9bc3c107c 2022-01-13 00:08:45 +00:00
Leonard Grey 6db04b97e6 [lld-macho] Port CallGraphSort from COFF/ELF
Depends on D112160

This adds the new options `--call-graph-profile-sort` (default),
`--no-call-graph-profile-sort` and `--print-symbol-order=`. If call graph
profile sorting is enabled, reads `__LLVM,__cg_profile` sections from object
files and uses the resulting graph to put callees and callers close to each
other in the final binary via the C3 clustering heuristic.

Differential Revision: https://reviews.llvm.org/D112164
2022-01-12 10:47:04 -05:00
LLVM GN Syncbot de05128eae [gn build] Port 35cca45b09 2022-01-12 11:14:10 +00:00
Simon Tatham 42f90a28a3 [extract_symbols.py] Fix line-splitting of tool output.
Two functions in the `is_32bit_windows` family were retrieving the
output of a tool via `subprocess.check_output`, and then iterating
over it using `for line in output`. But in Python, that gets you the
output one //character// at a time, not a line at a time. So the
regexes that looked for a platform name were never matching.

(This is a mistake that Python makes uniquely easy, because iterating
over a file and over a string have different default behaviour, and
because the element type of a string is still a string so you don't
even get a type mismatch error to warn you about it!)

Reviewed By: michaelplatings

Differential Revision: https://reviews.llvm.org/D117030
2022-01-12 09:06:56 +00:00
Nico Weber 37fc1a29cb [gn build] minor comment tweaks, no behavior change 2022-01-11 22:05:44 -05:00
Nico Weber bf95d5e334 [gn build] (manually) port 85e6e748d4 (llvm/lib/Target/X86/MCA) 2022-01-11 21:44:53 -05:00
Nico Weber fce1c6fb67 [gn build] (manually) port f77d115cc1 more 2022-01-11 14:49:14 -05:00
LLVM GN Syncbot 1088376630 [gn build] Port f77d115cc1 2022-01-11 17:12:28 +00:00
Nico Weber 5fc9abe474 [gn build] (manually) port 8503c688d5 2022-01-11 09:47:28 -05:00
LLVM GN Syncbot 04867c3c51 [gn build] Port 8d23b7420c 2022-01-11 06:50:34 +00:00
LLVM GN Syncbot 38916195c9 [gn build] Port c0fdc74887 2022-01-10 08:36:39 +00:00
Kazu Hirata f44473ec4e [llvm] Remove redundant member initialization (NFC)
Identified with readability-redundant-member-init.
2022-01-08 11:56:44 -08:00
Kazu Hirata 435a5a3652 [llvm] Fix bugprone argument comments (NFC)
Identified with bugprone-argument-comment.
2022-01-08 11:56:38 -08:00
Kazu Hirata 4e2ec7e38d [llvm] Remove unused forward declarations (NFC) 2022-01-07 20:00:34 -08:00
Nico Weber 19c37223d7 [gn build] (manually) port feeff8a37c
This reverts commit 3ca6928344.
492de35df4 relanded in feeff8a37c.
The reland only uses CMAKE_INSTALL_INCLUDEDIR and not CMAKE_INSTALL_BINDIR
in llvm-config, so this reland reflects that.
2022-01-07 21:22:08 -05:00
Kazu Hirata 2aed08131d [llvm] Use true/false instead of 1/0 (NFC)
Identified with modernize-use-bool-literals.
2022-01-07 00:39:14 -08:00
LLVM GN Syncbot 3d7a3888a2 [gn build] Port 56ca11e31e 2022-01-06 16:28:57 +00:00
Chuanqi Xu bbce75e352 Update Bug report URL to Github Issues
Although we moved to Github Issues. The bug report message refers to
Bugzilla still. This patch tries to update these URLs.

Reviewed By: MaskRay, Quuxplusone, jhenderson, libunwind, libc++

Differential Revision: https://reviews.llvm.org/D116351
2022-01-06 17:33:25 +08:00
LLVM GN Syncbot a881215821 [gn build] Port 68ac7b1701 2022-01-05 20:03:02 +00:00
Nico Weber dabc101ec0 [gn build] "port" 027ffb173a 2022-01-05 12:57:18 -05:00
Zi Xuan Wu 6025ee79ae [CSKY] Add python script of CSKY asm update test check 2022-01-05 15:59:03 +08:00
LLVM GN Syncbot f61b658d7d [gn build] Port 6d722801d1 2022-01-04 22:44:20 +00:00
LLVM GN Syncbot 2b1c38f737 [gn build] Port 4dcc47aaea 2022-01-04 14:32:08 +00:00
LLVM GN Syncbot ba70fb6460 [gn build] Port 4950198116 2022-01-04 14:32:07 +00:00
LLVM GN Syncbot fb7bea0a5a [gn build] Port af7bc39ba1 2022-01-04 09:23:00 +00:00
LLVM GN Syncbot a361320d75 [gn build] Port 6f6f88ffda 2022-01-03 20:50:31 +00:00
Kazu Hirata e5947760c2 Revert "[llvm] Remove redundant member initialization (NFC)"
This reverts commit fd4808887e.

This patch causes gcc to issue a lot of warnings like:

  warning: base class ‘class llvm::MCParsedAsmOperand’ should be
  explicitly initialized in the copy constructor [-Wextra]
2022-01-03 11:28:47 -08:00
LLVM GN Syncbot b9ed95afc4 [gn build] Port fe68088d44 2022-01-03 17:01:27 +00:00
LLVM GN Syncbot 3a33c0b1ce [gn build] Port a8ae6828a9 2022-01-03 15:14:39 +00:00