Commit Graph

11763 Commits

Author SHA1 Message Date
LLVM GN Syncbot 2d27b56be5 [gn build] Port 71410fd2c0 2022-10-03 01:41:14 +00:00
LLVM GN Syncbot 7578d337b5 [gn build] Port a6e1080b87 2022-10-02 23:53:57 +00:00
LLVM GN Syncbot facfdbe25b [gn build] Port 005916de58 2022-10-02 00:35:45 +00:00
LLVM GN Syncbot 38a636a5f2 [gn build] Port 099384dcea 2022-10-01 13:18:43 +00:00
LLVM GN Syncbot 5b4623831b [gn build] Port 5b26f4f042 2022-09-30 21:31:59 +00:00
Peter Collingbourne b1985dd74d gn build: Fix formatting in gen_version_script.gni. 2022-09-30 13:47:08 -07:00
Peter Collingbourne fa690c2212 gn build: Speculative Windows build fix. 2022-09-30 13:46:52 -07:00
Peter Collingbourne 25eabbc802 gn build: Re-add preinit file to static ubsan library. 2022-09-30 13:36:12 -07:00
Peter Collingbourne bae0d30491 gn build: Move bfloat16 source files to x86-specific block.
bfloat16 is currently only supported by default on x86.

Differential Revision: https://reviews.llvm.org/D134937
2022-09-30 12:33:23 -07:00
Peter Collingbourne 0f9f95fe93 gn build: Add support for building the standalone ubsan runtime as a shared library on non-Mac.
Differential Revision: https://reviews.llvm.org/D127556
2022-09-30 12:33:23 -07:00
Pierre van Houtryve 6886f094e8 [TableGen] Add `countRendererFns` to `InstructionOperandMatcher`
Without it, the count of renderer functions is inaccurate and, in some
edge cases (like the patterns added in D134354), we can actually
go out of bounds (run out of pre-allocated renderer function spaces
in the GISel state)

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D134861
2022-09-30 07:26:30 +00:00
LLVM GN Syncbot 682c95672b [gn build] Port 91c96a806c 2022-09-30 01:33:02 +00:00
LLVM GN Syncbot 7cc39b45fe [gn build] Port 8f4f26ba5b 2022-09-29 22:13:14 +00:00
Michał Górny 74085ebfb6 [llvm] [lit] Move %clang_dxc substitution from clang/test
Move the `%clang_dxc` substitution from local definition in clang/test
to lit's `llvm/config.py` module where all other driver definitions
are found.  This improves consistency and makes it easier to control
global clang options.

Differential Revision: https://reviews.llvm.org/D134871
2022-09-29 20:59:00 +02:00
LLVM GN Syncbot c4d9b40574 [gn build] Port 63accaf46f 2022-09-29 17:15:28 +00:00
Nikola Tesic 8b38a2c0a5 [Debugify][OriginalDIMode] Update script to handle large JSON reports
This patch updates llvm/utils/llvm-original-di-preservation.py to create more
compact HTML verify-debuginfo-preserve reports by:
- removing duplicated debug info bugs,
- introducing -compress option to create highly compressed report.
Additionally, this patch makes script able to process very large JSON inputs.
That is done by reading & analyzing JSON report in chunks.

Differential Revision: https://reviews.llvm.org/D115617
2022-09-29 16:48:06 +02:00
Nikola Tesic b5d28f3ea5 [Debugify][OriginalDIMode] Make HTML reporting infrastructure more resilient
Debugify in OriginalDebugInfo mode (verify-each-debuginfo-preserve), when used
in parallel builds of large projects, can produce incorrect report. More
precisely, simultaneous writes to JSON report file, could form incorrect JSON
objects, which describe found Debug Info bugs.
This patch uses the lock/unlock mechanism to protect JSON report file and also
makes script llvm/utils/llvm-original-di-preservation.py resilient to corrupted
lines in the report file. So, it ensures the creation of HTML report.

Differential Revision: https://reviews.llvm.org/D115616
2022-09-29 16:48:06 +02:00
LLVM GN Syncbot 1e818cd8e2 [gn build] Port e61d89efd7 2022-09-28 20:36:01 +00:00
Tobias Hieta 12ba7f27b8
[Release] Add bump-version script.
There are many files that needs to be updated when you
bump the version of LLVM. This script tries to automate
that in order to make the release managers job easier.

Reviewed By: kwk, hans, ldionne

Differential Revision: https://reviews.llvm.org/D133923
2022-09-28 08:41:29 +02:00
Nico Weber 697550ac2a [gn build] re-add hlsl.h after e432108bf2 2022-09-27 20:16:56 -04:00
LLVM GN Syncbot 530d14a996 [gn build] Port 13e1a65327 2022-09-27 17:33:35 +00:00
LLVM GN Syncbot 2dfe7a3429 [gn build] Port 6584d1f930 2022-09-27 07:24:34 +00:00
Sebastian Peryt 46fc75ab28 [NFC][2/n] Remove PrunePH pass
Second patch in the series to remove legacy PM and
associated -enable-new-pm=0 flag targets pass that
has not been ported to new PM - PruneEH.
Discussion about this can be found in D44415.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D134686
2022-09-26 18:38:04 -07:00
Kazu Hirata 06b1e5fdc3 [llvm] Use std::underlying_type_t (NFC) 2022-09-25 23:14:15 -07:00
LLVM GN Syncbot a225556d4d [gn build] Port cf14c7caac 2022-09-26 02:02:19 +00:00
James Y Knight 5351878ba1 [TableGen] Add useDeprecatedPositionallyEncodedOperands option.
Summary:
The existing undefined-bitfield-to-operand matching behavior is very
hard to understand, due to the combination of positional and named
matching. This can make it difficult to track down a bug in a target's
instruction definitions.

Over the last decade, folks have tried to work-around this in various
ways, but it's time to finally ditch the positional matching. With
https://reviews.llvm.org/D131003, there are no longer cases that
_require_ positional matching, and it's time to start removing usage
and support for it.

Therefore: add a (default-false) option, and set it to true only in
those targets that require positional matching today. Subsequent
changes will start cleaning up additional in-tree targets.

NOTE TO OUT OF TREE TARGET MAINTAINERS:

If this change breaks your build, you may restore the previous
behavior simply by adding:
  let useDeprecatedPositionallyEncodedOperands = 1;
to your target's InstrInfo tablegen definition. However, this is
temporary -- the option will be removed in the future.

If your target does not set 'decodePositionallyEncodedOperands', you
may thus start migrating to named operands. However, if you _do_
currently set that option, I recommend waiting until a subsequent
change lands, which adds decoder support for named sub-operands.

Differential Revision: https://reviews.llvm.org/D134073
2022-09-24 09:40:45 -04:00
James Y Knight a538d1f13a [TableGen][CodeEmitterGen] Allow local names for sub-operands in a operand list.
These names can then be matched by name against 'bits' fields in a
record, to populate an instruction's encoding.

This does _not_ yet change DecoderEmitter to allow by-name matching of
sub-operands. Unlike the encoder, the decoder already defaulted to not
supporting positional matching, and backends had workarounds in place
for the missing decoding support.

Additionally, use this new capability to allow the ARM and AArch64
backends not to require any positional operand matching.

Differential Revision: https://reviews.llvm.org/D131003
2022-09-24 09:40:44 -04:00
Yuanfang Chen 5850b995ef [lit] follow-up 2380c1b609, check stdout and stderr separately
The error output is cached so it could be out of order with stdout in
some bots.
2022-09-22 16:42:47 -07:00
Yuanfang Chen 2380c1b609 [lit][unit] avoid adding gtest binary more than once
Due to CMake mis-configurations, some gtest binaries may be added to the test
list more than once. This patch makes lit avoid such cases and issues a
warning when it happens.
2022-09-22 16:14:50 -07:00
Nico Weber 711814a652 [gn build] port 47afaf2eb0 (exegesis all targets) 2022-09-22 13:17:05 -04:00
LLVM GN Syncbot c7652eca1e [gn build] Port 32a8260ccc 2022-09-22 07:29:04 +00:00
Corentin Jabot c932cef32a Update Unicode to 15.0
Unicode 15.0 adds 4,489 characters, for a total of 149,186 characters.
These additions include 2 new scripts along with 20 new emoji characters,
and 4,193 CJK ideographs.

This changes modify most existing tables including
 - XID_Start/XID_Continue in Clang
 - The character name database (used by \N{} in Clang)
 - The list of formattable/printable codepoints
 - The case folding algorithm (which we had not updated since Unicode 9)
 - The list of nonspacing/enclosing marks used by the column width
   computation algorithm. The rest of the column width algorithm
   is not updated.

Reviewed By: tahonermann

Differential Revision: https://reviews.llvm.org/D133807
2022-09-22 05:03:01 +02:00
Chris Bieneman e77c40ffbd [NFC] Make dxil namespace consistent
We have namespaces `DXIL` and `dxil`, which is just confusing. This
renames `DXIL` -> `dxil` making everything consistent.

While the LLVM coding standards don't have a clear direction here, I
chose lower case because by my current unscientific count there are
more places where we had the lowercase namespace than the uppercase.
2022-09-21 17:48:13 -05:00
Joel E. Denny 88f183c0db [lit] Work around another windows issue in new test from 28412d1800
Based on result shown at:

<https://lab.llvm.org/buildbot/#/builders/216/builds/10123>
2022-09-21 14:08:10 -04:00
John McIver 01fdc2a3c9 [Utils] Refactor update_cc_test_checks.py to use shutil
The package `distutils` is deprecated and removal is planned for Python 3.12. All calls to `distutils.spawn.find_executable` are replaced with local version of `find_executable` which makes use of `shutils.which`.

Reviewed By: arichardson, MaskRay

Differential Revision: https://reviews.llvm.org/D134015
2022-09-21 10:55:33 -07:00
Arthur Eubanks 0f19c60342 [gn build] Don't set LLVM_UNREACHABLE_OPTIMIZE when llvm_enable_assertions
llvm_unreachable should properly error out if assertions are enabled.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D134332
2022-09-21 10:34:48 -07:00
Joel E. Denny b9735db646 [lit] Work around windows issue in new test from 28412d1800
Based on result shown at:

<https://lab.llvm.org/buildbot/#/builders/216/builds/10120>
2022-09-21 13:27:41 -04:00
LLVM GN Syncbot 96d6e68ed2 [gn build] Port 782ac2182c 2022-09-21 17:07:56 +00:00
Joel E. Denny 387924b307 [lit] Increase FileCheck verbosity temporarily
This is to help debug the failure 28412d1800 caused and f47a5df92d
failed to fix at:

<https://lab.llvm.org/buildbot/#/builders/216/builds/10117>
2022-09-21 12:27:45 -04:00
Joel E. Denny f47a5df92d [lit] Try to fix new test from 28412d1800 under Windows
`llvm/utils/lit/tests/Inputs/shtest-define/value-escaped.txt` broke at
least at <https://lab.llvm.org/buildbot/#/builders/216/builds/10114>.

The problem appears to be a non-portable `echo` command line.
2022-09-21 12:06:41 -04:00
Joel E. Denny 28412d1800 [lit] Implement DEFINE and REDEFINE directives
These directives define per-test lit substitutions.  The concept was
discussed at
<https://discourse.llvm.org/t/iterating-lit-run-lines/62596/10>.

For example, the following directives can be inserted into a test file
to define `%{cflags}` and `%{fcflags}` substitutions with empty
initial values, which serve as the parameters of another newly defined
`%{check}` substitution:

```
// DEFINE: %{cflags} =
// DEFINE: %{fcflags} =

// DEFINE: %{check} = %clang_cc1 %{cflags} -emit-llvm -o - %s | \
// DEFINE:            FileCheck %{fcflags} %s
```

The following directives then redefine the parameters before each use
of `%{check}`:

```
// REDEFINE: %{cflags} = -foo
// REDEFINE: %{fcflags} = -check-prefix=FOO
// RUN: %{check}

// REDEFINE: %{cflags} = -bar
// REDEFINE: %{fcflags} = -check-prefix=BAR
// RUN: %{check}
```

Of course, `%{check}` would typically be more elaborate, increasing
the benefit of the reuse.

One issue is that the strings `DEFINE:` and `REDEFINE:` already appear
in 5 tests.  This patch adjusts those tests not to use those strings.
Our prediction is that, in the vast majority of cases, if a test
author mistakenly uses one of those strings for another purpose, the
text appearing after the string will not happen to have the syntax
required for these directives.  Thus, the test author will discover
the mistake immediately when lit reports the syntax error.

This patch also expands the documentation on existing lit substitution
behavior.

Reviewed By: jhenderson, MaskRay, awarzynski

Differential Revision: https://reviews.llvm.org/D132513
2022-09-21 11:32:05 -04:00
Alex Richardson b84be9f2f1 Add all constant physical registers to callee preserved masks
This allows MachineCopyPropagation to eliminate copies of constant registers
such as zero registers. They were previously not being eliminated as the
check for MO.clobbersPhysReg(AvailSrc) would return true for constant
registers such as MIPS $zero.

To avoid having to manually add the zero registers to all CalleeSavedRegs
instantiations in tablegen, I instead added a new isConstant bit to the
Register and set this for MIPS, RISC-V, and AArch64 zero registers.
RegisterInfoEmitter.cpp looks at this flag and adds all constant registers
to the preserved register mask.

This may also benefit other passes but so far I have only seen differences
in MachineCopyPropagation. In the future it might make sense to generate
`isConstantPhysReg()` from this information.

Original source: 8588d8b814

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D131958
2022-09-21 12:50:12 +00:00
Kai Nacke 34a809591b [GISel] TreeMatcher: always skip leaves if they don't care
In `GIMatchTreeOpcodePartitioner::applyForPartition()`, the loop over
the possible leaves skip a leaf if the instruction does not care
about the instruction.
When processing the referenced operands in the next loop the same
leaves need to be skipped.

Later, when these leaves are added to all partitions, the bit vector
must be resized first before the bit representing the leaf is set.

This fixes a crash in llvm-tblgen.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D134192
2022-09-20 20:55:02 +00:00
LLVM GN Syncbot b4f86f04d0 [gn build] Port 00798e5006 2022-09-20 17:07:57 +00:00
Ben Dunbobbin 837caa99a2 Revert "[Utils] Refactor update_cc_test_checks.py to use shutil"
This reverts commit 2e6c50855b.

This caused failures on windows bots:
- https://lab.llvm.org/buildbot/#/builders/216/builds/10030
- https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/clang-windows-x64/b8802513693562827489/overview
2022-09-20 16:50:18 +01:00
John McIver 2e6c50855b [Utils] Refactor update_cc_test_checks.py to use shutil
The package distutils is deprecated and removal is planned for Python 3.12.
All calls to distutils.spawn.find_executable are replaced with shutil.which.

Differential Revision: https://reviews.llvm.org/D134015
2022-09-20 09:42:06 +01:00
LLVM GN Syncbot 613c429bbf [gn build] Port 55158efe10 2022-09-20 08:12:06 +00:00
LLVM GN Syncbot 29b37f319a [gn build] Port 70599d7027 2022-09-19 21:43:51 +00:00
Tobias Hieta b27f6de35d
[docs] Fix build-docs.sh
If libcxxabi is not included CMake will error out:

Cannot find target libcxxabi-SHARED

I ran into this doing the 15.0.0 release

Differential Revision: https://reviews.llvm.org/D133475
2022-09-19 21:45:12 +02:00
LLVM GN Syncbot bdb9ca4830 [gn build] Port 1146d40d9a 2022-09-19 10:55:29 +00:00