Commit Graph

11353 Commits

Author SHA1 Message Date
LLVM GN Syncbot 892b205c97 [gn build] Port 80045e9afa 2022-05-04 18:28:43 +00:00
LLVM GN Syncbot 88962f536f [gn build] Port 9f38da258e 2022-05-03 18:28:46 +00:00
LLVM GN Syncbot 3e8aca5324 [gn build] Port 860eabb395 2022-05-03 13:55:41 +00:00
LLVM GN Syncbot 5a64bc4d3e [gn build] Port eac22d0754 2022-05-03 13:47:14 +00:00
LLVM GN Syncbot 24901ac6d0 [gn build] Port 41c0ff1e74 2022-05-03 00:35:04 +00:00
LLVM GN Syncbot 4f5d525b1d [gn build] Port 4070aa0156 2022-05-02 22:32:10 +00:00
Sheng df3765bfdc [NFC] Rename `FixedLenDecoderEmitter` as `DecoderEmitter`
Since now we are able to handle both fixed length & variable
length instructions.

Reviewed By: myhsu

Differential Revision: https://reviews.llvm.org/D123451
2022-05-03 03:37:13 +08:00
Sheng 28e850a8da [TableGen] Add support for variable length instruction in decoder generator
To support variable length instructions, I think of them as fixed length instructions with the "maximum length". For example, if there're three instructions with 2, 6 and 9 bytes, we can fit them into the algorithm by treating them all as 9 bytes.

Also, since we can't know the length of the instruction in advance, there is a function object with type `void(APInt &, uint64_t)` added in the parameter list of `decodeInstruction` and `fieldFromInstruction`. We can use this to supply the additional bits the decoder needs after we know the opcode of the instruction.

Finally, `InstrLenTable` is added to let the decoder know the length of the instructions.

See D120960 for its usage.

Reviewed By: myhsu

Differential Revision: https://reviews.llvm.org/D120958
2022-05-03 03:37:13 +08:00
Sheng 522d90528e Revert "Fix a misuse of `cast`"
This reverts commit ba59ec2843.
2022-05-03 03:37:13 +08:00
LLVM GN Syncbot aa69cb7695 [gn build] Port 5de0a3e9da 2022-05-02 15:51:27 +00:00
Nico Weber d21289e042 [gn build] (manually) port fb7a435492 2022-05-02 07:23:10 -04:00
LLVM GN Syncbot 1790e2976b [gn build] Port 3939e99aae 2022-05-01 22:32:29 +00:00
LLVM GN Syncbot 616dd4fe4e [gn build] Port 73417c5176 2022-04-30 00:44:51 +00:00
Dimitry Andric 7abfaa0a81 [lldb] Define LLDB_VERSION_PATCH correctly
In commit ccf1469a4c lldb got its own generated Version.inc file, with
`LLDB_VERSION` macros. However, it used `LLDB_VERSION_PATCHLEVEL`
instead of the actually correct `LLDB_VERSION_PATCH`. Correct this.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D124672
2022-04-29 19:29:51 +02:00
LLVM GN Syncbot b0db5a72f7 [gn build] Port fb4113ef0c 2022-04-29 09:40:01 +00:00
Yuanfang Chen 0e554ebf02 [lit][unit] set the default result start and pid
In case of interrupting, there were None. Fixes PR55176.
2022-04-28 13:39:11 -07:00
Nico Weber de7e539432 [gn build] (manually) port 0f1b5f115a 2022-04-28 08:39:12 -04:00
Andrew Savonichev 1041a9642b [lit] Support %if ... %else syntax for RUN lines
This syntax allows to modify RUN lines based on features
available. For example:

    RUN: ... | FileCheck %s --check-prefix=%if windows %{CHECK-W%} %else %{CHECK-NON-W%}
    CHECK-W: ...
    CHECK-NON-W: ...

The whole command can be put under %if ... %else:

    RUN: %if tool_available %{ %tool %} %else %{ true %}

or:

    RUN: %if tool_available %{ %tool %}

If tool_available feature is missing, we'll have an empty command in
this RUN line.  LIT used to emit an error for empty commands, but now
it treats such commands as nop in all cases.

Multi-line expressions are also supported:

    RUN: %if tool_available %{ \
    RUN:   %tool               \
    RUN: %} %else %{           \
    RUN:   true                \
    RUN: %}

Background and motivation:
D121727 [NVPTX] Integrate ptxas to LIT tests
https://reviews.llvm.org/D121727

Differential Revision: https://reviews.llvm.org/D122569
2022-04-27 20:29:08 +03:00
LLVM GN Syncbot 74ddcc2b27 [gn build] Port 6ddf2a824d 2022-04-27 13:44:43 +00:00
LLVM GN Syncbot 224386679d [gn build] Port 7b81192d46 2022-04-26 17:42:25 +00:00
Jay Foad fb571719d5 [TableGen] Dump RC.AllocationPriority with -register-info-debug 2022-04-26 16:29:26 +01:00
LLVM GN Syncbot 86312461b8 [gn build] Port 854c33946f 2022-04-26 09:06:40 +00:00
LLVM GN Syncbot b0d119b583 [gn build] Port b1fa5ac3ba 2022-04-26 01:46:12 +00:00
Nico Weber 31456ff191 [gn build] Kind of port e6f44a3cd2 (DirectXTests) 2022-04-25 20:25:39 -04:00
Yuanfang Chen d3efa577f5 [lit] Keep stdout/stderr when using GoogleTest format
When a unit test crashes or timeout, print the shard's stdout and
stderr. When a unit test fails, attaches the test's output to the LIT
output to help debugging.

While at it, concatenating shard's environment variables using space
instead of newline to make the reproducer script user friendly.

Based on D123797. (Thanks to @lenary)
2022-04-25 12:26:03 -07:00
LLVM GN Syncbot ea8cbd5c58 [gn build] Port 042dc3c46d 2022-04-25 10:26:57 +00:00
Matt Arsenault 0ecbb683a2 TableGen/GlobalISel: Make address space/align predicates consistent
The builtin predicate handling has a strange behavior where the code
assumes that a PatFrag is a stack of PatFrags, and each level adds at
most one predicate. I don't think this particularly makes sense,
especially without a diagnostic to ensure you aren't trying to set
multiple at once.

This wasn't followed for address spaces and alignment, which could
potentially fall through to report no builtin predicate was
added. Just switch these to follow the existing convention for now.
2022-04-22 15:48:07 -04:00
Nico Weber 3fdc3d63f6 [gn build] (manually) port a7691dee2d (TestAST)
This makes clang/lib/Testing the very first non-test()-target that includes
gtest headers, which means it needs an explicit dep on gtest.
2022-04-21 21:37:48 -04:00
serge-sans-paille af7b98c383 [clang-tblgen] Automatically document options values
This is a port of f5c666742f to clang's tablegen,
with a better wording.

Differential Revision: https://reviews.llvm.org/D123682
2022-04-20 22:00:06 +02:00
Nico Weber 59bd20526c [gn build] (manually) port f26c41e8dd (lib/clang/Support) 2022-04-20 09:28:04 -04:00
LLVM GN Syncbot f493fe34bf [gn build] Port 6c69427e88 2022-04-20 04:12:02 +00:00
Nico Weber 9973075274 [gn build] port clang-linker-wrapper build file
Tests now try to run it, so we need a build file for it.
2022-04-20 00:11:34 -04:00
LLVM GN Syncbot 858e40d8f3 [gn build] Port bac6cd5bf8 2022-04-19 21:23:58 +00:00
LLVM GN Syncbot b5e962a510 [gn build] Port c57f03415f 2022-04-19 20:13:49 +00:00
David Green cc03414125 [PerfectShuffle] Remove unused variables from D123386. NFC 2022-04-19 16:22:04 +01:00
David Green 73dc996428 [AArch64] Add lane moves to PerfectShuffle tables
This teaches the perfect shuffle tables about lane inserts, that can
help reduce the cost of many entries. Many of the shuffle masks are
one-away from being correct, and a simple lane move can be a lot simpler
than trying to use ext/zip/etc. Because they are not exactly like the
other masks handled in the perfect shuffle tables, they require special
casing to generate them, with a special InsOp Operator.

The lane to insert into is encoded as the RHSID, and the move from is
grabbed from the original mask. This helps reduce the maximum perfect
shuffle entry cost to 3, with many more shuffles being generatable in a
single instruction.

Differential Revision: https://reviews.llvm.org/D123386
2022-04-19 14:49:50 +01:00
David Green 50af82701c [AArch64] Cost all perfect shuffles entries as cost 1
A brief introduction to perfect shuffles - AArch64 NEON has a number of
shuffle operations - dups, zips, exts, movs etc that can in some way
shuffle around the lanes of a vector. Given a shuffle of size 4 with 2
inputs, some shuffle masks can be easily codegen'd to a single
instruction. A <0,0,1,1> mask for example is a zip LHS, LHS. This is
great, but some masks are not so simple, like a <0,0,1,2>. It turns out
we can generate that from zip LHS, <0,2,0,2>, having generated
<0,2,0,2> from uzp LHS, LHS, producing the result in 2 instructions.

It is not obvious from a given mask how to get there though. So we have
a simple program (PerfectShuffle.cpp in the util folder) that can scan
through all combinations of 4-element vectors and generate the perfect
combination of results needed for each shuffle mask (for some definition
of perfect). This is run offline to generate a table that is queried for
generating shuffle instructions. (Because the table could get quite big,
it is limited to 4 element vectors).

In the perfect shuffle tables zip, unz and trn shuffles were being cost
as 2, which is higher than needed and skews the perfect shuffle tables
to create inefficient combinations. This sets them to 1 and regenerates
the tables. The codegen will usually be better and the costs should be
more precise (but it can get less second-order re-use of values from
multiple shuffles, these cases should be fixed up in subsequent patches.

Differential Revision: https://reviews.llvm.org/D123379
2022-04-19 12:05:05 +01:00
Nico Weber bf59cd7244 [gn build] (manually) port f2526c1a5c 2022-04-16 12:58:04 -04:00
LLVM GN Syncbot 73110f1306 [gn build] Port 721651be24 2022-04-15 19:23:18 +00:00
Daniil Kovalev b1bb76a731 [NFC][UpdateTestChecks] Fix whitespace in common.py and asm.py
While working on D122986, noticed that indentation size varies even within
one file. Fixed that - now indentation is 2 spaces everywhere. This indentation

Differential Revision: https://reviews.llvm.org/D123859
2022-04-15 18:11:24 +03:00
Roman Lebedev 8fbed6870b
[UpdateTestChecks] Prevent rapid onset insanity when forced to write LoopVectorize-driven costmodel tests
Subj, or on other words, we have a lot of tests that are driven by
the LoopVectorizer's debug output, but we don't have
any meaningful way to autogenerate checklines in them,
which means that an insurmountable amount of manual work
is required when modifying the appropriate cost models.

That is not sustainable, so this presents a solution.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D121133
2022-04-15 15:37:29 +03:00
LLVM GN Syncbot 4dba3d4c53 [gn build] Port 1d83750f63 2022-04-15 11:44:38 +00:00
Nico Weber f097885b07 [gn build] (manually) port 6d45558c1a (MipsGenPostLegalizeGICombiner) 2022-04-15 07:05:15 -04:00
Daniil Kovalev 8e43cbab33 [UpdateTestChecks] Add NVPTX support in update_llc_test_checks.py
This patch makes possible generating NVPTX assembly check lines with
update_llc_test_checks.py utility.

Differential Revision: https://reviews.llvm.org/D122986
2022-04-15 11:01:53 +03:00
Vitaly Buka b61f173f24 [lit] Forward more sanitizer env in TestingConfig 2022-04-15 00:50:52 -07:00
Vitaly Buka 43e0cedc1e [NFC] Reformat a part of TestingConfig.py 2022-04-15 00:50:52 -07:00
Xiaodong Liu 2d9b7fdaa3 [utils] Use git to checkout code instead of svn in building docker image
Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D123795
2022-04-15 01:41:14 +00:00
LLVM GN Syncbot 234678fbf9 [gn build] Port b9ca972b1f 2022-04-14 18:36:20 +00:00
LLVM GN Syncbot f80e47884c [gn build] Port 1fdf952dee 2022-04-14 15:22:09 +00:00
LLVM GN Syncbot 4f1065156b [gn build] Port e471ba3d01 2022-04-14 14:51:17 +00:00
LLVM GN Syncbot 5bf9aa38ab [gn build] Port 58d9ab70ae 2022-04-14 13:37:28 +00:00
LLVM GN Syncbot 65fcd31ef1 [gn build] Port dd47ab750b 2022-04-14 13:21:19 +00:00
LLVM GN Syncbot 33ab2e3c84 [gn build] Port 73da7eed8f 2022-04-14 13:06:13 +00:00
Nico Weber a29d9ba1f5 Revert "[gn build] Port 73da7eed8fac"
This reverts commit bd4463bebf.
Breaks check-clang-tools on Windows, see comment on
https://reviews.llvm.org/D123655
2022-04-14 09:05:11 -04:00
LLVM GN Syncbot 04a3f3f167 [gn build] Port 6ba1b9075d 2022-04-14 09:08:24 +00:00
LLVM GN Syncbot bd4463bebf [gn build] Port 73da7eed8f 2022-04-14 05:36:21 +00:00
Nico Weber 65d3850efe [gn build] (manually) port ab8abeaf48 2022-04-13 20:58:10 -04:00
Arthur Eubanks 2f70fe1b59 [gn build] Set CLANG_ENABLE_OPAQUE_POINTERS_INTERNAL=1
Matches official cmake build.
2022-04-13 16:29:52 -07:00
LLVM GN Syncbot 1203a24764 [gn build] Port a85da649b9 2022-04-13 15:05:20 +00:00
LLVM GN Syncbot d1e5854805 [gn build] Port 2fb026ee4d 2022-04-13 13:52:22 +00:00
LLVM GN Syncbot 0242ffd9c0 [gn build] Port 2b424f4ea8 2022-04-13 13:04:50 +00:00
LLVM GN Syncbot 05256c8d95 [gn build] Port e53c461bf3 2022-04-13 05:30:23 +00:00
Yuanfang Chen cd0a5889d7 [Reland][lit] Use sharding for GoogleTest format
This helps lit unit test performance by a lot, especially on windows. The performance gain comes from launching one gtest executable for many subtests instead of one (this is the current situation).

The shards are executed by the test runner and the results are stored in the
json format supported by the GoogleTest. Later in the test reporting stage,
all test results in the json file are retrieved to continue the test results
summary etc.

On my Win10 desktop, before this patch: `check-clang-unit`: 177s, `check-llvm-unit`: 38s; after this patch: `check-clang-unit`: 37s, `check-llvm-unit`: 11s.
On my Linux machine, before this patch: `check-clang-unit`: 46s, `check-llvm-unit`: 8s; after this patch: `check-clang-unit`: 7s, `check-llvm-unit`: 4s.

Reviewed By: yln, rnk, abrachet

Differential Revision: https://reviews.llvm.org/D122251
2022-04-12 14:51:12 -07:00
Harald van Dijk 3337f50625
[X86] Fix handling of maskmovdqu in x32 differently
This reverts the functional changes of D103427 but keeps its tests, and
and reimplements the functionality by reusing the existing 32-bit
MASKMOVDQU and VMASKMOVDQU instructions as suggested by skan in review.
These instructions were previously predicated on Not64BitMode. This
reimplementation restores the disassembly of a class of instructions,
which will see a test added in followup patch D122449.

These instructions are in 64-bit mode special cased in
X86MCInstLower::Lower, because we use flags with one meaning for subtly
different things: we have an AdSize32 class which indicates both that
the instruction needs a 0x67 prefix and that the text form of the
instruction implies a 0x67 prefix. These instructions are special in
needing a 0x67 prefix but having a text form that does *not* imply a
0x67 prefix, so we encode this in MCInst as an instruction that has an
explicit address size override.

Note that originally VMASKMOVDQU64 was special cased to be excluded from
disassembly, as we cannot distinguish between VMASKMOVDQU and
VMASKMOVDQU64 and rely on the fact that these are indistinguishable, or
close enough to it, at the MCInst level that it does not matter which we
use. Because VMASKMOVDQU now receives special casing, even though it
does not make a difference in the current implementation, as a
precaution VMASKMOVDQU is excluded from disassembly rather than
VMASKMOVDQU64.

Reviewed By: RKSimon, skan

Differential Revision: https://reviews.llvm.org/D122540
2022-04-12 18:32:14 +01:00
Nico Weber 2ac876c52c [gn build] Fix a URL in a comment 2022-04-12 11:38:12 -04:00
LLVM GN Syncbot dbf1557359 [gn build] Port 95f0f69f1f 2022-04-12 09:55:37 +00:00
LLVM GN Syncbot dbd80d7d27 [gn build] Port 5a5be4044f 2022-04-12 08:49:06 +00:00
Tobias Hieta 1889170aeb workflow: When updating the issueXX branch, use force push
Otherwise if you try to update the branch with a new /cherry-pick
from the same issue you will run into problems similar as to the
one shown in this workflow:
https://github.com/llvm/llvm-project/runs/5864672298?check_suite_focus=true

Reviewed By: tstellar

Differential Revision: https://reviews.llvm.org/D123365
2022-04-12 08:03:59 +02:00
LLVM GN Syncbot ff84cb1660 [gn build] Port 203a1e36ed 2022-04-11 23:49:30 +00:00
Fangrui Song a8ef1647aa [CMake][gn][Bazel] Remove HAVE_PTHREAD_GETSPECIFIC
The only user was removed by d351f54a07.
2022-04-11 14:44:45 -07:00
LLVM GN Syncbot 5ef0ed7d5a [gn build] Port c292b6066c 2022-04-11 14:58:55 +00:00
LLVM GN Syncbot f5d6d13d72 [gn build] Port b4ad28da19 2022-04-11 12:47:08 +00:00
Patryk Wychowaniec d16a631c12 [AVR] Merge AVRRelaxMemOperations into AVRExpandPseudoInsts
This commit contains a refactoring that merges AVRRelaxMemOperations
into AVRExpandPseudoInsts, so that we have a single place in code that
expands the STDWPtrQRr opcode.

Seizing the day, I've also fixed a couple of potential bugs with our
previous implementation (e.g. when the destination register was killed,
the previous implementation would try to .addDef() that killed
register, crashing LLVM in the process - that's fixed now, as proved by
the test).

Reviewed By: benshi001

Differential Revision: https://reviews.llvm.org/D122533
2022-04-11 02:42:13 +00:00
Sheng ba59ec2843 Fix a misuse of `cast`
`cast` will assert instead of returning null pointer.
2022-04-11 01:21:15 +00:00
LLVM GN Syncbot a099bc3c77 [gn build] Port 7aa8c38a9e 2022-04-09 20:16:19 +00:00
LLVM GN Syncbot c6f37ab250 [gn build] Port a96443edde 2022-04-09 14:04:27 +00:00
LLVM GN Syncbot a31cd8c8f2 [gn build] Port 889302292b 2022-04-09 07:40:37 +00:00
Fangrui Song ca68038d12 Reland "[Driver] Default CLANG_DEFAULT_PIE_ON_LINUX to ON""
(With C++ exceptions, `clang++ --target=mips64{,el}-linux-gnu -fpie -pie
-fuse-ld=lld` has link errors (lld does not implement some strange R_MIPS_64
.eh_frame handling in GNU ld). However, sanitizer-x86_64-linux-qemu used this to
build ScudoUnitTests. Pined ScudoUnitTests to -no-pie.)

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 may be removed in the future.

Differential Revision: https://reviews.llvm.org/D120305
2022-04-08 23:40:18 -07:00
Fangrui Song a58d0af058 Revert D121556 "[randstruct] Add randomize structure layout support"
This reverts commit 3f0587d0c6.

Not all tests pass after a few rounds of fixes.

I spot one failure that std::shuffle (potentially different results with
different STL implementations) was misused and replaced it with llvm::shuffle,
but there appears to be another failure in a Windows build.

The latest failure is reported on https://reviews.llvm.org/D121556#3440383
2022-04-08 18:37:26 -07:00
LLVM GN Syncbot 62c8b185ff [gn build] Port 46b2a463bd 2022-04-09 01:14:57 +00:00
LLVM GN Syncbot 6bf7c1b6ac [gn build] Port 2a2149c754 2022-04-09 00:50:44 +00:00
LLVM GN Syncbot c807141d27 [gn build] Port 3f0587d0c6 2022-04-08 20:26:24 +00:00
LLVM GN Syncbot 59308b4b79 [gn build] Port 2aa575fd7f 2022-04-08 20:26:23 +00:00
LLVM GN Syncbot c8084fd907 [gn build] Port 08920cc043 2022-04-08 11:20:14 +00:00
Nico Weber 26b3a1ea34 [gn build] (manually) port bf2dc4b376 2022-04-08 07:07:32 -04:00
LLVM GN Syncbot a5daf81df0 [gn build] Port 690085c9b7 2022-04-08 04:04:28 +00:00
Nico Weber e22a60b1c8 Revert "Reland "[Driver] Default CLANG_DEFAULT_PIE_ON_LINUX to ON"""
This reverts commit 2aca33baf1.
Broke tests on several bots, see comments on https://reviews.llvm.org/D120305
2022-04-07 10:07:07 -04:00
LLVM GN Syncbot 1c1d477ce3 [gn build] Port 1306b1025c 2022-04-07 13:18:45 +00:00
Nico Weber 79e5e086a2 [gn build] (manually) port 3031fa88f0 2022-04-07 08:15:41 -04:00
Nico Weber 23ce89a5a2 [gn build] (manually) port 5390606aa9 2022-04-07 08:13:26 -04:00
Fangrui Song 2aca33baf1 Reland "[Driver] Default CLANG_DEFAULT_PIE_ON_LINUX to ON""
(The upgrade of the ppc64le bot and D121257 have fixed compiler-rt failures. Tested by nemanjai.)

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 may be removed in the future.

Differential Revision: https://reviews.llvm.org/D120305
2022-04-06 20:19:07 -07:00
LLVM GN Syncbot 7ac2e30fe1 [gn build] Port 39f1568633 2022-04-07 00:55:44 +00:00
Peter Collingbourne 38f9200945 gn build: Fix some tests for host_os to instead check current_os.
Should fix Windows build:
http://45.33.8.238/win/55809/step_4.txt
2022-04-06 15:45:51 -07:00
Peter Collingbourne 02a7b1754f Reland "gn build: Fix support for building the builtins for baremetal."
Our support for building for baremetal was conditional on a default
off arg and would have failed to build if you had somehow arranged
to pass the correct --target flag; presumably nobody noticed because
nobody was turning it on. A better approach is to model baremetal
as a separate "OS" called "baremetal" and build it in the same way
as we cross-compile for other targets. That's what this patch does.
I only hooked up the arm64 target but others can be added.

Relanding after fixing Mac build breakage in D123244.

Differential Revision: https://reviews.llvm.org/D122862
2022-04-06 13:45:40 -07:00
Peter Collingbourne 096477e25e gn build: Use target OS to control whether to use/depend on llvm-ar.
When cross-compiling from Mac to non-Mac, we need to use the just-built
llvm-ar instead of libtool. We're currently doing the right thing
when determining which archiver command to use, but the path to ar
and the toolchain dependencies were being set based on the host OS
(current_os evaluated in host OS toolchain), instead of the target
OS. Fix the problem by looking up current_os inside toolchain_args.

Differential Revision: https://reviews.llvm.org/D123244
2022-04-06 13:45:40 -07:00
LLVM GN Syncbot ee5fda1ff8 [gn build] Port c03d6257c5 2022-04-06 19:38:53 +00:00
Peter Collingbourne d384f2b253 Revert "gn build: Fix support for building the builtins for baremetal."
This reverts commit b02b9b3dac.

Broke Mac build: http://45.33.8.238/macm1/32578/step_4.txt
2022-04-06 12:16:06 -07:00
LLVM GN Syncbot 2232d35f82 [gn build] Port 9fc45ca00a 2022-04-06 18:21:38 +00:00
Nico Weber 25b7efc9d1 Revert "[gn build] (manually) port 83a798d4b0 (abi_breaking_checks in tests)"
This reverts commit edddf384c2.
83a798d4b0 was reverted in 62a983ebc5.
2022-04-06 14:02:09 -04:00
Peter Collingbourne b02b9b3dac gn build: Fix support for building the builtins for baremetal.
Our support for building for baremetal was conditional on a default
off arg and would have failed to build if you had somehow arranged
to pass the correct --target flag; presumably nobody noticed because
nobody was turning it on. A better approach is to model baremetal
as a separate "OS" called "baremetal" and build it in the same way
as we cross-compile for other targets. That's what this patch does.
I only hooked up the arm64 target but others can be added.

Differential Revision: https://reviews.llvm.org/D122862
2022-04-06 11:01:21 -07:00
LLVM GN Syncbot 324ac838ae [gn build] Port d78624975b 2022-04-06 15:52:20 +00:00
LLVM GN Syncbot c59e833942 [gn build] Port afa94306a8 2022-04-06 14:24:39 +00:00
LLVM GN Syncbot bb47e1fe3d [gn build] Port 68eac9a6e7 2022-04-06 14:15:16 +00:00
Shengchen Kan 05535f3d07 [X86][tablgen] Add one entry manually into the memory folding table
```
{"MMX_MOVD64grr", "MMX_MOVD64mr"}
```
This pair has different opcodes.
2022-04-06 22:06:15 +08:00
Shengchen Kan f4661b5a55 [X86] Fold MMX_MOVD64from64rr + store to MMX_MOVQ64mr instead of MMX_MOVD64from64mr in auto-generated table
This is a follow-up patch for D122241.
2022-04-06 21:33:57 +08:00
Shengchen Kan eddd399c98 [X86][tablgen] Add three entries manually into the memory folding table
```
{X86::MOVLHPSrr,X86::MOVHPSrm}
{X86::VMOVLHPSZrr,X86::VMOVHPSZ128rm}
{X86::VMOVLHPSrr,X86::VMOVHPSrm}
```

Each of the three pairs has different mnemonic, so we have to add it
manually. This is a follow-up patch for D122477.
2022-04-06 20:37:39 +08:00
Nico Weber edddf384c2 [gn build] (manually) port 83a798d4b0 (abi_breaking_checks in tests) 2022-04-06 08:31:20 -04:00
Nikita Popov ed4e6e0398 [cmake] Remove LLVM_ENABLE_NEW_PASS_MANAGER cmake option
Or rather, error out if it is set to something other than ON. This
removes the ability to enable the legacy pass manager by default,
but does not remove the ability to explicitly enable it through
various flags like -flegacy-pass-manager or -enable-new-pm=0.

I checked, and our test suite definitely doesn't pass with
LLVM_ENABLE_NEW_PASS_MANAGER=OFF anymore.

Differential Revision: https://reviews.llvm.org/D123126
2022-04-06 09:52:21 +02:00
Martin Storsjö 46776f7556 Fix warnings about variables that are set but only used in debug mode
Add void casts to mark the variables used, next to the places where
they are used in assert or `LLVM_DEBUG()` expressions.

Differential Revision: https://reviews.llvm.org/D123117
2022-04-06 10:01:46 +03:00
Shengchen Kan 81b10f8200 [X86][tablgen] Consider the mnemonic when auto-generating memory folding table
Intuitively, the memory folding pair should have the same mnemonic.

This patch removes
```
{X86::SENDUIPI,X86::VMXON}
```
in the auto-generated table.
And `NotMemoryFoldable` for `TPAUSE` and `CLWB` can be saved.
```
{X86::MOVLHPSrr,X86::MOVHPSrm}
{X86::VMOVLHPSZrr,X86::VMOVHPSZ128rm}
{X86::VMOVLHPSrr,X86::VMOVHPSrm}
```
It seems the three pairs above are mistakenly killed.
But we can add them back manually later.

Reviewed By: Amir

Differential Revision: https://reviews.llvm.org/D122477
2022-04-06 12:53:05 +08:00
LLVM GN Syncbot 6847081160 [gn build] Port 97e496054a 2022-04-06 03:38:24 +00:00
Nico Weber bf0f5e72bd [gn build] (semi-automatically) Port 4661a65f4b
...and follow-up 970ae8376e.
2022-04-05 09:02:16 -04:00
LLVM GN Syncbot a9bd565ff2 [gn build] Port 3ba8548c8e 2022-04-05 09:06:48 +00:00
LLVM GN Syncbot 331a58ae79 [gn build] Port 0320115c16 2022-04-05 08:34:08 +00:00
Alex Brachet 47f59df892 Revert "Reland "[lit] Use sharding for GoogleTest format""
This reverts commit 948f3deca9.
2022-04-04 16:34:28 +00:00
Nico Weber 80ce17e3d4 [gn build] Always make symlinks target explicitly depend on base binary
This is a no-op in these files since the symlinks array is never empty
and the dependency to the base binary is added through the loop in these
cases.

But adding them doesn't hurt either, and it:
1. Makes all symlinks targets look the same, independent of symlinks
   are created always or just conditionally based on gn args
2. Makes it less likely that bugs like the one fixed by b0abada8fe
   are introduced by copy-pasting an existing symlink target and then
   not being careful enough when tweaking it.

No behavior change.
2022-04-04 09:54:41 -04:00
LLVM GN Syncbot ed020808d7 [gn build] Port 980c3e6dd2 2022-04-04 13:48:25 +00:00
Nico Weber b0abada8fe [gn build] llvm-lipo, llvm-libtool-darwin symlink targets now dep on binary
This fixes a regression from 69cde915e923d: If llvm_install_cctools_symlinks
is false, depending llvm-lipo:symlinks didn't actually depend on llvm-lipo
and the binary didn't get built as dependency of `check-lld` (because the
`symlinks` array ended up empty).
2022-04-04 09:20:49 -04:00
Yuanfang Chen 948f3deca9 Reland "[lit] Use sharding for GoogleTest format"
This relands commit a87ba5c86d.

Adjust llvm/utils/lit/tests/googletest-timeout.py for new test output.
2022-04-03 22:35:45 -07:00
Yuanfang Chen c0f90c84b1 Revert "[lit] Use sharding for GoogleTest format"
This reverts commit a87ba5c86d.

Breaks bots:
https://lab.llvm.org/buildbot/#/builders/196/builds/10454
2022-04-03 20:04:55 -07:00
Yuanfang Chen a87ba5c86d [lit] Use sharding for GoogleTest format
This helps lit unit test performance by a lot, especially on windows. The performance gain comes from launching one gtest executable for many subtests instead of one (this is the current situation).

The shards are executed by the test runner and the results are stored in the
json format supported by the GoogleTest. Later in the test reporting stage,
all test results in the json file are retrieved to continue the test results
summary etc.

On my Win10 desktop, before this patch: `check-clang-unit`: 177s, `check-llvm-unit`: 38s; after this patch: `check-clang-unit`: 37s, `check-llvm-unit`: 11s.
On my Linux machine, before this patch: `check-clang-unit`: 46s, `check-llvm-unit`: 8s; after this patch: `check-clang-unit`: 7s, `check-llvm-unit`: 4s.

Reviewed By: yln, rnk

Differential Revision: https://reviews.llvm.org/D122251
2022-04-03 19:47:02 -07:00
LLVM GN Syncbot 6020830e88 [gn build] Port e476df5629 2022-04-03 15:09:33 +00:00
LLVM GN Syncbot 3bab268f95 [gn build] Port f547fc89c0 2022-04-01 21:24:52 +00:00
LLVM GN Syncbot 6d481adb35 [gn build] Port fc7573f29c 2022-03-31 22:04:13 +00:00
LLVM GN Syncbot c7639f896c [gn build] Port 46774df307 2022-03-31 17:50:34 +00:00
Nico Weber d2f7547f14 [gn build] (manually) port 19246b0779 2022-03-31 11:10:18 -04:00
Tobias Hieta a30972fbd7 [test-release] Added -silent-log flag to test-release.sh
This flag silents the build output of test-release.sh so that
it can be used in CI systems a bit better. It will still log
the build output to the log files but not echo it to stdout.

Reviewed By: tstellar

Differential Revision: https://reviews.llvm.org/D122146
2022-03-31 08:34:53 +02:00
Jordan R Abrahams-Whitehead a4b56d7620 [Utils] Add URL formatting for revert_checker
This lets the revert_checker.py get called with the -u option, which
formats the revert and reverted SHAs into handy URLs which point to the
LLVM reviews associated with those SHAs. This is useful for viewers to
look quickly at the changes made by SHAs that were potentially reverted.

Differential Revision: https://reviews.llvm.org/D122772
2022-03-30 17:30:25 -07:00
LLVM GN Syncbot f54f448525 [gn build] Port 1410a4860e 2022-03-30 07:33:49 +00:00
serge-sans-paille f5c666742f [doc] Rely on tblgen to dump supported options value when generating doc
It was already the case for CLI help, also support it for rst output. As a side
effect remove redundant (and sometime inconsistent!) value help from HelpText in
clang/Driver/Options.td.

Differential Revision: https://reviews.llvm.org/D122378
2022-03-29 12:25:33 +02:00
LLVM GN Syncbot 5314582407 [gn build] Port 90cb325abd 2022-03-29 06:21:57 +00:00
LLVM GN Syncbot 75c8585ef0 [gn build] Port 2add3fbd97 2022-03-28 23:38:54 +00:00
LLVM GN Syncbot 040c80924c [gn build] Port c5e54e2752 2022-03-28 20:09:41 +00:00
LLVM GN Syncbot 12f0802c93 [gn build] Port c0eb9b4cde 2022-03-28 08:27:36 +00:00
LLVM GN Syncbot f7e3174ec0 [gn build] Port ad57e10dbc 2022-03-28 06:40:50 +00:00
Shengchen Kan 4a48742922 [X86][tablgen] Extract common functions in X86EVEX2VEXTablesEmitter.cpp and X86FoldTablesEmitter.cpp to avoid duplicated code. NFC 2022-03-27 08:47:18 +08:00
Shengchen Kan 460e1bd66e [X86][tablgen] Remove PointerLikeRegClass from isRegisterOperand b/c getRegOperandSize crashes for it. NFCI 2022-03-27 07:35:47 +08:00
LLVM GN Syncbot 139416cb5e [gn build] Port 555214cbcc 2022-03-26 16:10:19 +00:00
Shengchen Kan 3e41917984 [X86][tablgen] Remove useless check in X86FoldTablesEmitter.cpp. NFC
Any `X86Inst` has a name.
2022-03-27 00:09:29 +08:00
Shengchen Kan a86cd3be1c [X86][tablgen] Rename some fields for RecognizableInstrBase to align with fields in TD file. NFC
The comment for `HasVEX_L` is updated.
2022-03-26 23:32:50 +08:00
Shengchen Kan dc68ca3eff [X86][tablgen] Rename field hasREX_WPrefix to hasREX_W for X86Inst. NFC
To make it more like hasVEX_L and hasEVEX_K, etc.
2022-03-26 23:14:08 +08:00
Shengchen Kan 271e8d2495 [X86][tablgen] Refine the class RecognizableInstr. NFCI
1. Add comments to explain why we set `isAsmParserOnly` for XACQUIRE and XRELEASE
2. Check `X86Inst` in the constructor of `RecognizableInstrBase` so that
   we can avoid the case where one of it's field is not initialized but
   accessed by user. (e.g. in X86EVEX2VEXTablesEmitter.cpp)
3. Move `Rec` from `RecognizableInstrBase` to `RecognizableInstr` to reduce
   size of `RecognizableInstrBase`
4. Remove out-of-date comments for shouldBeEmitted() (filter() was removed)
5. Add a basic field `IsAsmParserOnly` and remove the field
   `ShouldBeEmitted` b/c we can deduce it w/ little overhead
2022-03-26 22:41:49 +08:00
Shengchen Kan c8ea732937 [X86][tablgen] Set ShouldBeEmitted to false when isAsmParserOnly is true. NFCI
In fact, an instruction can not be emitted to disassemble table when
`isAsmParserOnly` is true, so `isAsmParserOnly=true` implies
`ShouldBeEmitted=false`.

We check `isAsmParserOnly` in X86FoldTablesEmitter.cpp at a early stage
b/c none of them is foldable.
2022-03-26 19:10:58 +08:00
Shengchen Kan 5f543cb0ef [X86][tablgen] Use initializer list for some fields of RecognizableInstr*. NFC
Also, some code in constructor of `RecognizableInstrBase` is formatted.
2022-03-26 18:03:13 +08:00
Shengchen Kan 7a94fa58c4 [X86][tablgen] Move fields Name, Is64Bit, Is32Bit, Operands from RecognizableInstrBase to RecognizableInstr, NFCI
These four fields are not used by any user of `RecognizableInstrBase`,
so we can move them to `RecognizableInstr` to avoid unnecessary
construction.
2022-03-26 16:43:18 +08:00
Shengchen Kan bf11ed293a [X86][tablgen] Add class RecognizableInstrBase to simplify X86 code, NFCI 2022-03-26 13:03:06 +08:00
Shengchen Kan e13faa40cf [X86][tablgen] Add interface getMnemonic to namespace X86Disassembler, NFCI
Address comments in D122477 b/c `getMnemonic` is common to X86 and may be
used in more than one place.
2022-03-26 09:55:54 +08:00
Maksim Panchenko 4ae9745af1 [Disassember][NFCI] Use strong type for instruction decoder
All LLVM backends use MCDisassembler as a base class for their
instruction decoders. Use "const MCDisassembler *" for the decoder
instead of "const void *". Remove unnecessary static casts.

Reviewed By: skan

Differential Revision: https://reviews.llvm.org/D122245
2022-03-25 18:53:59 -07:00
Sam McCall 57ee624d79 [cmake] Provide CURRENT_TOOLS_DIR centrally, replacing CLANG_TOOLS_DIR
CLANG_TOOLS_DIR holds the the current bin/ directory, maybe with a %(build_mode)
placeholder. It is used to add the just-built binaries to $PATH for lit tests.
In most cases it equals LLVM_TOOLS_DIR, which is used for the same purpose.
But for a standalone build of clang, CLANG_TOOLS_DIR points at the build tree
and LLVM_TOOLS_DIR points at the provided LLVM binaries.

Currently CLANG_TOOLS_DIR is set in clang/test/, clang-tools-extra/test/, and
other things always built with clang. This is a few cryptic lines of CMake in
each place. Meanwhile LLVM_TOOLS_DIR is provided by configure_site_lit_cfg().

This patch moves CLANG_TOOLS_DIR to configure_site_lit_cfg() and renames it:
 - there's nothing clang-specific about the value
 - it will also replace LLD_TOOLS_DIR, LLDB_TOOLS_DIR etc (not in this patch)

It also defines CURRENT_LIBS_DIR. While I removed the last usage of
CLANG_LIBS_DIR in e4cab4e24d, there are LLD_LIBS_DIR usages etc that
may be live, and I'd like to mechanically update them in a followup patch.

Differential Revision: https://reviews.llvm.org/D121763
2022-03-25 20:22:01 +01:00
LLVM GN Syncbot a78bd83264 [gn build] Port cef52105bd 2022-03-25 18:54:35 +00:00
LLVM GN Syncbot bb48c3a9e7 [gn build] Port 39b80c8380 2022-03-25 15:50:53 +00:00
Johannes Doerfert a81fff8afd Reapply "[Intrinsics] Add `nocallback` to the default intrinsic attributes"
This reverts commit c5f789050d and
reapplies 7aea3ea8c3 with additional test
changes.
2022-03-25 09:36:50 -05:00
Aakanksha b0225ab8fd Prevent comparison with wider type in loop condition
This change fixes the code violations flagged in AMD compute CodeQL scan - "comparison-with-wider-type"

Differential Revision: https://reviews.llvm.org/D122447
2022-03-25 11:35:18 +00:00
Tom Stellard 3929f91397 Release Workflow: Remove cherry-pick-failed label when pull request is created
Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D121032
2022-03-25 00:45:28 -07:00
LLVM GN Syncbot 382797d475 [gn build] Port 75112133b8 2022-03-25 07:28:25 +00:00
Nico Weber c4eae8a4eb Make BLAKE3 a component library
It's unusual that BLAKE3/CMakeLists.txt just defines a list of
files that it injects into its parent scope. The list should either
be defined in llvm/lib/Support/CMakeLists.txt, or
llvm/lib/Support/BLAKE3/CMakeLists.txt should define an object
library.

This does the latter. It makes llvm/lib/Support/BLAKE3/CMakeLists.txt
more self-contained.

No behavior change.

Differential Revision: https://reviews.llvm.org/D122428
2022-03-24 21:16:55 -04:00
Arthur Eubanks df0b893d94 [opt] Remove -analyze option
This is legacy PM-specific, which is deprecated.

Uses of this should be replaced with a corresponding `-passes='print<foo>'`.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D122420
2022-03-24 14:10:57 -07:00
Nico Weber 8705708b6d Revert "[gn build] Manually port llvm/lib/Support/BLAKE3"
This reverts commit 8424d4f641.
That approach doesn't work. I checked in something that kinda
works 30 min ago or so.
2022-03-24 15:24:02 -04:00
LLVM GN Syncbot 1e3713f6df [gn build] Port 2022-03-24 19:11:19 +00:00
Fangrui Song 8424d4f641 [gn build] Manually port llvm/lib/Support/BLAKE3 2022-03-24 12:06:19 -07:00
Johannes Doerfert c5f789050d Revert "[Intrinsics] Add `nocallback` to the default intrinsic attributes"
This reverts commit 7aea3ea8c3 as it
breaks the buildbots.

I didn't see these failures in the pre-merge checks, looking into it.
2022-03-24 14:04:41 -05:00
Nico Weber 973acc3db5 [gn build] ugly hack to work around sync script for now 2022-03-24 14:56:51 -04:00
Nico Weber 0bfa1ab025 [gn build] (manually) port 9aa701984d (BLAKE3) 2022-03-24 14:51:24 -04:00
Johannes Doerfert 7aea3ea8c3 [Intrinsics] Add `nocallback` to the default intrinsic attributes
Most intrinsics, especially "default" ones, will not call back into the
IR module. `nocallback` encodes this nicely. As it was not used before,
this patch also makes use of `nocallback` in the Attributor which
results in many more `norecurse` deductions.

Tablegen part is mechanical, test updates by script.

Differential Revision: https://reviews.llvm.org/D118680
2022-03-24 13:50:54 -05:00
Arthur Eubanks a7ea304f93 [gn build] Manually port 0c86198b2 2022-03-24 10:56:21 -07:00
LLVM GN Syncbot ced9bbe0b2 [gn build] Port 62d5f254cc 2022-03-24 13:50:02 +00:00
Nico Weber 028f9f5b2b [gn build] remove a "from __future__" import not needed after 0ff3cc2087 2022-03-24 09:07:54 -04:00
LLVM GN Syncbot 621cc83fc1 [gn build] Port 406bde9a15 2022-03-24 12:12:11 +00:00
Dávid Bolvanský 3642baf5dd [NFCI] Fix set-but-unused warning in X86DisassemblerTables.cpp 2022-03-24 10:31:29 +01:00
LLVM GN Syncbot bf6f5113bc [gn build] Port 64902d335c 2022-03-24 01:49:33 +00:00
Zequan Wu 0396e229cd Revert "[gn build] Port 9c542a5a4e1b"
This reverts commit e28ace8a97.
2022-03-23 16:11:54 -07:00
Nico Weber 0ff3cc2087 [gn build] Change python run lines to python3
macOS 12.3 no longer ships non-3 python.

Almost all of these scripts were launched by ninja, and the GN files
already told it to run them under python3, so this is a fairly small
change.  The main effect is that if you run them manually, you now
get the same behavior.

(A small set of scripts, gn.py, gen.py, sync_source_lists_from_cmake.py,
are for manual running.  For these, it is an actual change.)

Differential Revision: https://reviews.llvm.org/D122345
2022-03-23 16:42:18 -04:00
Nico Weber 88da78ddd0 Install symlink "otool" if LLVM_INSTALL_CCTOOLS_SYMLINKS is set
Differential Revision: https://reviews.llvm.org/D122313
2022-03-23 16:22:24 -04:00
Nico Weber 69cde915e9 [gn build] add llvm_install_cctools_symlinks arg
It behaves (mostly) like the LLVM_INSTALL_CCTOOLS_SYMLINKS option
in cmake.

The minor difference is that the llvm-objcopy symlinks bitcode_strip
and install_name_tool symlink to llvm-objcopy directly in the GN build,
while it's a bitcode_strip -> llvm-bitcode-strip -> objcopy chain
in the CMake build (and analogous for install_name_tool).

The implementation is very similar to the implementation of the
existing llvm_install_binutils_symlinks arg.

Differential Revision: https://reviews.llvm.org/D122312
2022-03-23 16:19:54 -04:00
Nico Weber f9889dd28a [gn build] (manually) port b0fd9497af 2022-03-23 16:16:53 -04:00
Nico Weber e85aee06d8 [gn build] (manually) port b0fd9497af 2022-03-23 15:46:42 -04:00
Arthur Eubanks 9bd66b312c [PassManager][Coroutine] Run passes under -O0 conditionally and run GlobalDCE
CoroSplit lowers various coroutine intrinsics. It's a CGSCC pass and
CGSCC passes don't run on unreachable functions. Normally GlobalDCE will
come along and delete unreachable functions, but we don't run GlobalDCE
under -O0, so an unreachable function with coroutine intrinsics may
never have CoroSplit run on it.

This patch adds GlobalDCE when coroutines intrinsics are present. It
also now runs all coroutine passes conditional when coroutine intrinsics
are present. This should also solve the -O0 regression reported in
D105877 due to LazyCallGraph construction.

Fixes https://github.com/llvm/llvm-project/issues/54117

Reviewed By: ChuanqiXu

Differential Revision: https://reviews.llvm.org/D122275
2022-03-23 11:03:26 -07:00
Xiaodong Liu 9580f95488 [Dockerfile] Upgrade debian base image to version 10
Debian8 is too old to build LLVM project, the version
of GCC, CMake and python are lower than the requirements:
https://llvm.org/docs/GettingStarted.html#software

Debian10 is the earliest release that has software
packages that meet the above requirements.

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D120826
2022-03-23 15:32:15 +00:00
Arthur Eubanks e22b78de27 [gn build] Manually port 89f6b26 2022-03-22 16:26:44 -07:00
Craig Topper 9b0f227d7b [TableGen][RISCV] Add InstAliases with zero_reg to cover unmasked vnot.v, vncvt.x.x.w, vneg.v, etc.
The mask being NoRegister prevented the existing aliases from matching
since NoRegister isn't in the VMV0 register class.

To workaround this I've added new aliases that look for zero_reg.
I had to motify tablegen to generate matching code for zero_reg.
And as a consequence, I had to change the EmitPriority for an ARM
alias that used zero_reg that started printing.

Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D121496
2022-03-22 10:14:43 -07:00
Craig Topper 49c2206b3b [VP] Preserve address space of pointer for strided load/store intrinsics.
This adds LLVMAnyPointerToElt to use instead of LLVMPointerToElt.
This allows us to preserve the address space as part of the type
overload for the intrinsic, but still require the vector element
type to match the pointer type.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D122042
2022-03-22 09:52:54 -07:00
Shengchen Kan 6902734eb3 [X86] Simplify attributes of the generated memory folding table (NFCI)
This reduces the gaps between tables in X86GenFoldTables.inc and X86InstrFoldTables.cpp
2022-03-22 16:02:54 +08:00
Sheng 23423c0ea8 [TableGen] Fix a misuse of getValueAsBitsInit
`getValueAsBitsInit` will assert when the "SoftFail" isn't presented.

But given the 'if' statement below, we should've allowed this situation.

This patch fix this.
2022-03-22 06:04:36 +00:00
LLVM GN Syncbot 01f76917cc [gn build] Port e6c84f82b8 2022-03-21 20:44:15 +00:00
Nico Weber 312ec6f156 [gn build] Use lld-link's new /winsysroot: flag
If `clang_base_path` is set, it must now point to a directory that contains
an lld-link built with D118070.

(If this is a problem for anyone, we can guard this behind a
lld_link_understands_winsysroot gn arg, but let's see if we can get away
without that for now.)

With this, it's possible to build everything in a normal cmd.exe Window,
an MSVC shell isn't needed \o/

(Assuming you set `clang_base_path`, and you set `sysroot` to a directory
that contains a win sysroot. If you have MSVC installed,
`python3 llvm\utils\sysroot.py make-fake --out-dir=my-sysroot` and
setting `sysroot = "//my-sysroot"` in args.gn works, for example.)

Differential Revision: https://reviews.llvm.org/D121871
2022-03-21 13:43:38 -04:00
LLVM GN Syncbot f8cda8f6be [gn build] Port 7917b3c695 2022-03-21 17:28:05 +00:00
Dave Lee 826bdf51ff [lldb] Fix llvm::Optional summary provider
Differential Revision: https://reviews.llvm.org/D122041
2022-03-21 10:03:16 -07:00
Amir Ayupov 442e9e1389 [X86][NFC] MnemonicTables: only access RI fields if they're initialized
Fix an issue reported by UBSan.

Test Plan:
Configure with `-DLLVM_USE_SANITIZER="Address;Undefined"`
`ninja llc`

Differential Revision: https://reviews.llvm.org/D122140
2022-03-21 09:25:29 -07:00
Aaron Puchert 3a33664e88 Add cmake/ to release tarballs via concatenation
The solution using append was reported not to work, but additionally it
would use the contents of the checked-out source tree instead of the git
tag or commit. This uses `git archive`, so it will use the right commit,
and at least for me (with GNU tar) it seems to work as intended.

Should fix #53281.

Reviewed By: kwk

Differential Revision: https://reviews.llvm.org/D121972
2022-03-21 15:28:29 +01:00
Nikita Popov 062b1ae7e0 Reapply [Utils] Fix %S substitution
%S refers to the directory of %s, not to the cwd. This is mostly
handled correctly, but update_cc_test_checks.py used the wrong
path for non-FileCheck RUN lines.

Reapplying this with a fix for an update_cc_test_checks test that
was based on cwd semantics.
2022-03-21 15:15:34 +01:00
Nikita Popov 7af5fc1372 Revert "[Utils] Fix %S substitution"
This reverts commit 8ee1ef2a08.

This breaks an update_cc_test_checks test that is based on an
incorrect %S use, revert until I can fix it.
2022-03-21 14:25:02 +01:00
Nikita Popov 8ee1ef2a08 [Utils] Fix %S substitution
%S refers to the directory of %s, not to the cwd. This is mostly
handled correctly, but update_cc_test_checks.py used for the wrong
path for non-FileCheck RUN lines.
2022-03-21 13:22:34 +01:00
LLVM GN Syncbot 819419f996 [gn build] Port 9ada761be3 2022-03-21 07:47:10 +00:00
Shengchen Kan 871db60e1c [NFC] Remove unused parameters for SubtargetEmitter::ParseFeaturesFunction 2022-03-19 19:14:22 +08:00
Nico Weber 3ac84c430b Reland "[gn build] (manually) port 6316129e066e"
This reverts commit 21b97df74c.
6316129e06 relanded in 7b983917d4.
2022-03-18 15:43:02 -04:00
Tomas Matheson 831ab35b2f [ARM][AArch64] generate subtarget feature flags
Reland of D120906 after sanitizer failures.

This patch aims to reduce a lot of the boilerplate around adding new subtarget
features. From the SubtargetFeatures tablegen definitions, a series of calls to
the macro GET_SUBTARGETINFO_MACRO are generated in
ARM/AArch64GenSubtargetInfo.inc.  ARMSubtarget/AArch64Subtarget can then use
this macro to define bool members and the corresponding getter methods.

Some naming inconsistencies have been fixed to allow this, and one unused
member removed.

This implementation only applies to boolean members; in future both BitVector
and enum members could also be generated.

Differential Revision: https://reviews.llvm.org/D120906
2022-03-18 16:07:00 +00:00
LLVM GN Syncbot 00145bcb4c [gn build] Port a36c2dd6d5 2022-03-18 14:44:37 +00:00
LLVM GN Syncbot 959e2f00b0 [gn build] Port f83d833e41 2022-03-18 12:43:27 +00:00
Nico Weber ec49c84fb9 [gn build] (manually) port a954ade8ed (gen X86GenMnemonicTables.inc) 2022-03-18 08:42:50 -04:00
Nico Weber d2dc52493e [gn build] (semiautomatically) port fdcb256f97 2022-03-18 08:42:50 -04:00