Commit Graph

10873 Commits

Author SHA1 Message Date
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