Commit Graph

11702 Commits

Author SHA1 Message Date
Nico Weber 15e2e34097 [gn build] port 30578c0856 2022-09-13 10:48:48 -04:00
Nico Weber 0a40d7c27a [gn build] port a85e4aa37d 2022-09-12 21:02:02 -04:00
Nico Weber 4e08f5f0c4 [gn build] port 7d80b94ca3 (llvm-remarkutil) 2022-09-12 19:19:23 -04:00
Ben Langmuir 4a72459ed6 Revert "[clang][test] Disallow using the default module cache path in lit tests"
This reverts commit d96f526196.

Some systems do not support `env -u`.
2022-09-12 13:10:22 -07:00
LLVM GN Syncbot aad516ef0b [gn build] Port cf72dddaef 2022-09-12 19:46:19 +00:00
Nico Weber 90b36e6be5 [gn build] port 346856dc6c (or port 4d50a39240 more?) 2022-09-12 15:45:42 -04:00
Ben Langmuir d96f526196 [clang][test] Disallow using the default module cache path in lit tests
Make the default module cache path invalid when running lit tests so
that tests are forced to provide a cache path. This avoids accidentally
escaping to the system default location, and would have caught the
failure recently found in ClangScanDeps/multiple-commands.c.

Differential Revision: https://reviews.llvm.org/D133622
2022-09-12 09:54:56 -07:00
Matt Arsenault 7834194837 TableGen: Introduce generated getSubRegisterClass function
Currently there isn't a generic way to get a smaller register class
that can be produced from a subregister of a larger class. Replaces a
manually implemented version for AMDGPU. This will be used to improve
subregister support in the allocator.
2022-09-12 09:03:37 -04:00
Joe Loser 27731f0475 [llvm][lit] Respect GTEST_TOTAL_SHARDS and GTEST_SHARD_INDEX env vars
There are a variety of issues with using GTest sharding by default for users of
`lit` using the Google Test formatter as mentioned in
https://github.com/llvm/llvm-project/issues/56492 and
https://github.com/llvm/llvm-project/issues/56491.

Currently, there is no way for users to explicitly control the sharding
behavior, even with the environment variables that GTest provides. This patch
teaches the `googletest` formatter to actually respect `GTEST_TOTAL_SHARDS`
and `GTEST_SHARD_INDEX` environment variables if they are set.

In practice, we could go one step further and not do any of the post-processing
of the JSON files if `GTEST_TOTAL_SHARDS` is `1` for example, but that it left
as a follow-up if desired.  There may be preferred alternative approaches to
disabling sharding entirely through another mechanism, such as a lit config
variable.

Differential Revision: https://reviews.llvm.org/D133542
2022-09-09 17:47:21 -06:00
Joe Loser 62b8a61d6c [llvm] Remove includes of `llvm/Support/STLArrayExtras.h`
`llvm` and downstream internal callers no longer use `array_lengthof`, so drop
the include everywhere.

Differential Revision: https://reviews.llvm.org/D133600
2022-09-09 17:44:00 -06:00
Nico Weber 28890b7bab [gn build] port 1a608cfb5c 2022-09-09 19:18:05 -04:00
Nico Weber 27613a1038 [gn build] port 48506fbbbf (Mach-O-Fileset) 2022-09-09 19:18:05 -04:00
Nico Weber 30c30d7fc1 [gn build] port 4d50a39240 (llvm-exegesis multi-target)
Also ports follow-up 5a425b0b2f (I'm getting linker errors without it).
2022-09-09 15:04:47 -04:00
Nico Weber aee094fb8b [gn build] port 5e0464e38b (lld test zstd) 2022-09-09 14:48:26 -04:00
Carlos Alberto Enciso f671eb17be Add command line argument parsing to the Windows packaging script.
As discussed here:
https://discourse.llvm.org/t/build-llvm-release-bat-script-options

Add a function to parse command line arguments: `parse_args`.

The format for the arguments is:
  Boolean: --option
  Value:   --option<separator>value
    with `<separator>` being: space, colon, semicolon or equal sign

Command line usage example:
  my-batch-file.bat --build --type=release --version 123

It will create 3 variables:
  `build` with the value `true`
  `type` with the value `release`
  `version` with the value `123`

Usage:
  set "build="
  set "type="
  set "version="

  REM Parse arguments.
  call :parse_args %*

  if defined build (
    ...
  )
  if %type%=='release' (
    ...
  )
  if %version%=='123' (
    ...
  )
2022-09-09 14:36:40 +01:00
Joe Loser 5e96cea1db [llvm] Use std::size instead of llvm::array_lengthof
LLVM contains a helpful function for getting the size of a C-style
array: `llvm::array_lengthof`. This is useful prior to C++17, but not as
helpful for C++17 or later: `std::size` already has support for C-style
arrays.

Change call sites to use `std::size` instead.

Differential Revision: https://reviews.llvm.org/D133429
2022-09-08 09:01:53 -06:00
Christian Sigg 1dbcb79498 [lit] Test changes to make it work with bazel
These non-functional changes will make it easier to add the lit tests to the bazel build (see utils/bazel).

Reviewed By: bkramer

Differential Revision: https://reviews.llvm.org/D133416
2022-09-08 14:52:08 +02:00
Nico Weber 5dd87a31fd [gn build] port a0365abad8 2022-09-08 06:28:45 -04:00
Fangrui Song b6e1fd761d [llvm-objcopy] Support --{,de}compress-debug-sections for zstd
Also, add ELFCOMPRESS_ZSTD (2) from the approved generic-abi proposal:
https://groups.google.com/g/generic-abi/c/satyPkuMisk
("Add new ch_type value: ELFCOMPRESS_ZSTD")

Link: https://discourse.llvm.org/t/rfc-zstandard-as-a-second-compression-method-to-llvm/63399
("[RFC] Zstandard as a second compression method to LLVM")

Reviewed By: jhenderson, dblaikie

Differential Revision: https://reviews.llvm.org/D130458
2022-09-08 00:59:14 -07:00
Nikita Popov 0444b40ed3 Revert "[Support] Add llvm::compression::{getReasonIfUnsupported,compress,decompress}"
This reverts commit 19dc3cff0f.
This reverts commit 5b19a1f8e8.
This reverts commit 9397648ac8.
This reverts commit 10842b4475.

Breaks the GCC build, as reported here:
https://reviews.llvm.org/D130506#3776415
2022-09-08 09:33:12 +02:00
Fangrui Song 5b19a1f8e8 [llvm-objcopy] Support --{,de}compress-debug-sections for zstd
Also, add ELFCOMPRESS_ZSTD (2) from the approved generic-abi proposal:
https://groups.google.com/g/generic-abi/c/satyPkuMisk
("Add new ch_type value: ELFCOMPRESS_ZSTD")

Link: https://discourse.llvm.org/t/rfc-zstandard-as-a-second-compression-method-to-llvm/63399
("[RFC] Zstandard as a second compression method to LLVM")

Reviewed By: jhenderson, dblaikie

Differential Revision: https://reviews.llvm.org/D130458
2022-09-07 23:53:40 -07:00
LLVM GN Syncbot eaf0986b18 [gn build] Port 97c2220565 2022-09-07 23:00:40 +00:00
LLVM GN Syncbot bee10b07c3 [gn build] Port 3e7350f317 2022-09-07 23:00:39 +00:00
Nico Weber cce2947952 [gn build] port aa484c90cf 2022-09-07 18:55:07 -04:00
Nico Weber 811688d5a3 [gn build] port e321c8dd2c 2022-09-07 18:52:06 -04:00
LLVM GN Syncbot f2059dfb38 [gn build] Port e5d2d3eafb 2022-09-07 16:59:10 +00:00
Marco Elver 0ba8886af5 [FastISel] Propagate PCSections metadata to MachineInstr
Propagate PC sections metadata to MachineInstr when FastISel is doing
instruction selection.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D130884
2022-09-07 11:36:01 +02:00
Nico Weber 7bace6f8e6 [gn build] port 5dbc7cf7ca 2022-09-06 11:39:07 -04:00
LLVM GN Syncbot 4ce3848038 [gn build] Port 9823d42557 2022-09-06 11:10:44 +00:00
Eli Friedman 4658366d95 [ARM64EC 3/?] Mark reserved registers specific to ARM64EC ABI.
Part of patchset to add initial support for ARM64EC.

I'm not completely sure I understand the reason for this restriction,
but Microsoft documentation says that asynchronous signals clobber these
registers, so we can't ever use them.

As far as I know, none of these registers have any hardcoded meaning, so
reserving them shouldn't have any significant side-effects.

Differental Revision: https://reviews.llvm.org/D125413
2022-09-05 12:59:39 -07:00
LLVM GN Syncbot 41c79d0b6d [gn build] Port 2d52c6bfae 2022-09-05 14:41:45 +00:00
LLVM GN Syncbot 8f33a3abb3 [gn build] Port d5e26775d0 2022-09-05 10:39:22 +00:00
LLVM GN Syncbot 1553179e34 [gn build] Port a46154cb1c 2022-09-04 21:07:13 +00:00
Fangrui Song 83ea47acd7 [test] Make tests pass regardless of gnu++14/gnu++17 default
GCC from 11 onwards defaults to -std=gnu++17 for C++ source files. We want to do the same
(https://discourse.llvm.org/t/c-objc-switch-to-gnu-17-as-the-default-dialect/64360).
Split RUN lines, adjust `-verify`, or add `__cplusplus < 201703L` or `-Wno-dynamic-exception-spec`,
so that tests will pass regardless of gnu++14/gnu++17 default.

We have a desire to mark a test compatible with multiple language standards.
There are ongoing discussions how to add markers in the long term:

* https://discourse.llvm.org/t/iterating-lit-run-lines/62596
* https://discourse.llvm.org/t/lit-run-a-run-line-multiple-times-with-different-replacements/64932

As a workaround in the short term, add lit substitutions `%std_cxx98-`,
`%std_cxx11-14`, etc. They can be used for tests which work across multiple
language standards. If a range has `n` standards, run lit multiple times, with
`LIT_CLANG_STD_GROUP=0`, `LIT_CLANG_STD_GROUP=1`, etc to cover all `n` standards.

Reviewed By: #clang-language-wg, aaron.ballman

Differential Revision: https://reviews.llvm.org/D131464
2022-09-04 05:29:32 +00:00
Kazu Hirata 86e8164a8f [llvm] Qualify auto in range-based for loops (NFC)
Identified with readability-qualified-auto.
2022-09-03 11:17:49 -07:00
Kazu Hirata 32aa35b504 Drop empty string literals from static_assert (NFC)
Identified with modernize-unary-static-assert.
2022-09-03 11:17:47 -07:00
LLVM GN Syncbot e3018e4a4f [gn build] Port bc8fd9c633 2022-09-03 02:43:17 +00:00
LLVM GN Syncbot 211817d3be [gn build] Port 3a49cffe3a 2022-09-03 02:22:45 +00:00
LLVM GN Syncbot 055721ff75 [gn build] Port 30adaa730c 2022-09-02 19:47:21 +00:00
LLVM GN Syncbot c0433f91d3 [gn build] Port f6b66cbc7d 2022-09-01 18:01:38 +00:00
LLVM GN Syncbot f252b8477e [gn build] Port d931ac9e27 2022-09-01 10:19:04 +00:00
LLVM GN Syncbot 3622e9bea0 [gn build] Port 74c8d9d5fc 2022-08-31 18:52:31 +00:00
Nico Weber 068fe0724d [gn build] port d45c04da7c (TestingADTTests) 2022-08-31 14:15:23 -04:00
LLVM GN Syncbot 1830302b3f [gn build] Port c9033eeb2e 2022-08-31 17:02:52 +00:00
LLVM GN Syncbot 9eec2ac1d1 [gn build] Port ea9ac3519c 2022-08-30 22:53:54 +00:00
Kazu Hirata ce9f007c7c [llvm] Use llvm::find_if (NFC) 2022-08-28 10:41:48 -07:00
Alexey Baturo f8b71a307e [RISC-V][HWASAN] Add tag mismatch routines for HWASAN required for RISC-V
Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D131341
2022-08-28 19:42:08 +03:00
Benjamin Kramer af14c41d07 [tblgen] Use std::variant to simplify code. NFCI. 2022-08-27 10:50:28 +02:00
LLVM GN Syncbot a5857bd21f [gn build] Port 82e893c47c 2022-08-26 19:20:51 +00:00
Nico Weber cb0644b1cc [gn build] port 47166968db (no more clang-offload-wrapper) 2022-08-26 15:11:45 -04:00