Commit Graph

11353 Commits

Author SHA1 Message Date
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
Nico Weber 21b97df74c Revert "[gn build] (manually) port 6316129e066e"
This reverts commit 5f4a334ded.
6316129e06 was reverted in 112aafcaf4.
2022-03-18 08:26:46 -04:00
Tomas Matheson 62c481542e Revert "[ARM][AArch64] generate subtarget feature flags"
This reverts commit dd8b0fecb9.
2022-03-18 11:58:20 +00:00
Tomas Matheson dd8b0fecb9 [ARM][AArch64] generate subtarget feature flags
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 11:48:20 +00:00
Amir Ayupov fdcb256f97 [TableGen] X86 mnemonic tables backend
Add tablegen backend that generates X86 mnemonic-based opcode groupings, e.g.
`isADD`, `isTEST`, etc.

Addresses https://lists.llvm.org/pipermail/llvm-dev/2022-January/154526.html

Reviewed By: skan

Differential Revision: https://reviews.llvm.org/D121571
2022-03-18 01:43:53 -07:00
Shengchen Kan 9e832a67fe [Codegen][tablgen][NFC] Allow meta instruction to be target dependent
An instruction is a meta-instruction if it doesn't produce any output
in the form of executable instructions. So in the concept, a
meta-instruction does not have to be target independent.

Before this patch, `isMetaInstruction` is implemented by checking the
opcode of the instruction, add we have no way to add target dependent
opcode to the list, which does not make sense.

After this patch, a bit `isMeta` is added for class `Instruction` in
tablegen, which is used to indicate whether it's a meta instruction.

Reviewed By: pengfei

Differential Revision: https://reviews.llvm.org/D121600
2022-03-18 13:09:01 +08:00
Nico Weber 5f4a334ded [gn build] (manually) port 6316129e06 2022-03-17 20:08:14 -04:00
LLVM GN Syncbot f18590118e [gn build] Port 22570bac69 2022-03-17 19:06:22 +00:00
LLVM GN Syncbot cb29df4998 [gn build] Port 1af5fbd5c6 2022-03-17 16:55:08 +00:00
LLVM GN Syncbot 56a25a95d4 [gn build] Port 22077627ae 2022-03-16 23:23:57 +00:00
Nico Weber 668d880f59 [gn build] (manually) port 5aab45f430 (SymbolGraph) 2022-03-16 19:18:27 -04:00
LLVM GN Syncbot a8ef5d2f6d [gn build] Port c2f62ab84b 2022-03-16 15:19:44 +00:00
Nico Weber 14d1a58209 [gn build] (manually) port e4cab4e24d 2022-03-16 07:52:50 -04:00
Sam McCall 75acad41bc Use lit_config.substitute instead of foo % lit_config.params everywhere
This mechanically applies the same changes from D121427 everywhere.

Differential Revision: https://reviews.llvm.org/D121746
2022-03-16 09:57:41 +01:00
Sam McCall e4cab4e24d [lit] Remove clang_libs_dir
Seems to have been added accidentally in 58db03a116 and then
copied into clangd by me (but not actually needed).
2022-03-16 03:03:02 +01:00
Nico Weber fd20ec6b6e [gn build] (manually) port 89cd86bbc5 (clang-pseudo move) 2022-03-15 20:45:36 -04:00
Nico Weber 78d29203ad [gn build] (manually) port 2b69eb4a7d 2022-03-15 19:05:46 -04:00
Sam McCall fa1019fa18 [lit] add lit_config.substitute to interpolate lit_config.params
A version of this logic appears in ~every lit.site.cfg.in (28 copies total).
This patch just removes two, but I'll update the rest of llvm-project next.

Differential Revision: https://reviews.llvm.org/D121427
2022-03-15 22:09:43 +01:00
LLVM GN Syncbot d6d67083e8 [gn build] Port d46409fc8e 2022-03-15 18:43:11 +00:00
LLVM GN Syncbot c55b4c276f [gn build] Port 7262eacd41 2022-03-15 13:08:09 +00:00
Keith Smiley 6541d3e979 [test] Add lit helper for windows paths
This adds 2 new lit helpers `%{fs-src-root}` and `%{fs-sep}`, these
allow writing tests that correctly handle slashes on Windows. In the
case of tests like clang/test/CodeGen/debug-prefix-map.c, these are
unable to correctly test behavior on both platforms, unless they fork
and add OS requirements, because the relevant logic hits host specific
codepaths like checking if paths are absolute.

Differential Revision: https://reviews.llvm.org/D111457
2022-03-14 20:05:55 -07:00
LLVM GN Syncbot e28ace8a97 [gn build] Port 9c542a5a4e 2022-03-15 00:51:57 +00:00
Peter Collingbourne aaca634c94 gn build: Add support for building with libcurl.
Differential Revision: https://reviews.llvm.org/D121260
2022-03-14 12:52:19 -07:00
LLVM GN Syncbot 5fc70e53bf [gn build] Port 5e65e79bac 2022-03-14 16:52:53 +00:00
LLVM GN Syncbot 6c123674d8 [gn build] Port 999fa9f687 2022-03-12 17:10:56 +00:00
serge-sans-paille ed98c1b376 Cleanup includes: DebugInfo & CodeGen
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup
Differential Revision: https://reviews.llvm.org/D121332
2022-03-12 17:26:40 +01:00
LLVM GN Syncbot a7b1dccf7a [gn build] Port ee0f8c4010 2022-03-12 00:46:45 +00:00
LLVM GN Syncbot 6299089b94 [gn build] Port b1b4b6f366 2022-03-12 00:10:18 +00:00
Petr Hosek 0c0f6cfb7b [CMake] Rename TARGET_TRIPLE to LLVM_TARGET_TRIPLE
This clarifies that this is an LLVM specific variable and avoids
potential conflicts with other projects.

Differential Revision: https://reviews.llvm.org/D119918
2022-03-11 15:43:01 -08:00
serge-sans-paille fbbc41f8dd Cleanup include: TableGen
This also includes a few cleanup from Support.

Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup
Differential Revision: https://reviews.llvm.org/D121331
2022-03-11 11:41:32 +01:00
Sam McCall 895653d904 [cmake] Remove unused OUTPUT_MAPPING param to configure_lit_site_cfg(). NFC
Looks like it never did anything.
Added in 71deeee593
2022-03-10 21:26:53 +01:00
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