Commit Graph

11070 Commits

Author SHA1 Message Date
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
Nico Weber 936f247ade [gn build] fix mac build after 0c425b43b9 2022-01-27 20:35:17 -05:00
Arthur Eubanks 0c425b43b9 [gn build] Add support for check-asan
With these changes, check-asan passes on Linux and Windows.

There are a couple libraries we need to add support for, asan_static, asan_preinit, and the shared library version of asan proper.
Since we need to build the asan proper sources twice, once with -DASAN_DYNAMIC and once without, those sources are no longer in a source_set.
Much of the check-asan target is taken from the existing check-hwasan target.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D118307
2022-01-27 16:09:43 -08:00
LLVM GN Syncbot aa53d0781b [gn build] Port bf20a09790 2022-01-27 23:10:54 +00:00
Sergej Jaskiewicz 773467c812 [LLDB] Add formatters for PointerIntPair, PointerUnion
Also, add summaries for `SmallVector` and `ArrayRef`,
and fix the `StringRef` summary provider so it doesn't
ignore the `Length` field.

Differential Revision: https://reviews.llvm.org/D117779
2022-01-27 12:54:16 +03:00
Arthur Eubanks b75eea12fe [gn build] Format gn files 2022-01-26 18:37:03 -08:00
Arthur Eubanks f73f367f72 [gn build] Move -fno-builtin to crt_code
crt_code seems to correspond to SANITIZER_COMMON_CFLAGS which contains -fno-builtin.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D118288
2022-01-26 18:33:35 -08:00
Arthur Eubanks 0a4bbdabe3 [gn build] Remove unnecessary include_dirs
These are already part of crt_code.
2022-01-26 15:40:54 -08:00
Arthur Eubanks 1d085f1147 [gn build] Don't pass -fuse-ld=lld to compiler-rt tests
This was done for check-hwasan, but compiler-rt/test/hwasan/lit.cfg.py
already does that.

This makes check-asan (to be submitted) fail on Windows due to using
lld-link (as opposed to MSVC link.exe) in tests. That seems like a
problem that should be fixed, but that's orthogonal to this patch.
2022-01-26 15:08:22 -08:00
Arthur Eubanks 10ce1eed47 [gn build] Remove incorrect interception dependency 2022-01-26 15:07:41 -08:00
LLVM GN Syncbot 2ebf3263e7 [gn build] Port b1d946cbf7 2022-01-26 20:46:39 +00:00
Arthur Eubanks cbc623c767 [gn build] Make HAVE_MALLINFO2 a gn arg, default to false
D117916 broke some people because some distros are still using a glibc
older than 2.33. Add gn arg llvm_have_mallinfo2 and default to false for
now.

Differential Revision: https://reviews.llvm.org/D118269
2022-01-26 10:28:55 -08:00
Arthur Eubanks db0631096e [gn build] Manually port D118110 2022-01-26 09:50:02 -08:00
Benjamin Kramer f15014ff54 Revert "Rename llvm::array_lengthof into llvm::size to match std::size from C++17"
This reverts commit ef82063207.

- It conflicts with the existing llvm::size in STLExtras, which will now
  never be called.
- Calling it without llvm:: breaks C++17 compat
2022-01-26 16:55:53 +01:00
serge-sans-paille 297bbf1062 Fix ambiguous call to llvm::size introduced in ef82063207 2022-01-26 16:54:26 +01:00
serge-sans-paille ef82063207 Rename llvm::array_lengthof into llvm::size to match std::size from C++17
As a conquence move llvm::array_lengthof from STLExtras.h to
STLForwardCompat.h (which is included by STLExtras.h so no build
breakage expected).
2022-01-26 16:17:45 +01:00
Marek Kurdej 1f3aa2af9d [Visualizers] Fix SmallVector<T> visualizer for T inside an anonymous namespace. Use `value_type` instead of `$T1`.
At least on MSVC 2022, using $T1 does not work.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D118105
2022-01-26 15:59:43 +01:00
LLVM GN Syncbot 8700b22cf6 [gn build] Port 37c4bd0fdb 2022-01-26 13:56:09 +00:00
LLVM GN Syncbot bfd5696b55 [gn build] Port 5da7c04003 2022-01-26 12:14:21 +00:00
LLVM GN Syncbot 3d8fa00b2d [gn build] Port 8e29d19b8d 2022-01-26 11:52:58 +00:00
LLVM GN Syncbot c5907f8a72 [gn build] Port 19eaad94c4 2022-01-26 11:47:14 +00:00
Leonard Grey f23d57a632 [lld-macho] Rename CallGraphSort.{h,cpp} to SectionPriorities
This is in preparation for moving the code that parses and processes
order files into this file.

See https://reviews.llvm.org/D117354 for context and discussion.
2022-01-25 12:15:14 -05:00
Marek Kurdej 4100cf2e92 [Visualizers] Fix Optional visualizer.
As discussed in https://reviews.llvm.org/D118105#3268773, OptionalStorage has been changed in commit fb97305750, but the visualizer still tries to use old members.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D118117
2022-01-25 14:16:03 +01:00
Nancy Wang 22b0fe3fd9 [SystemZ][z/OS]: fix lit tmp_dir to use - instead of _
Latest upstream change in https://reviews.llvm.org/D117179 causes lit regressions on z/OS, when TMPDIR is exported and contains _, ld linker fails, it doesnt recognize _ specified in SYSLIN. this seems a limitation on z/OS. we need to fix lit.

Differential Revision: https://reviews.llvm.org/D118071
2022-01-24 17:47:48 -05:00
LLVM GN Syncbot 5fa40fb293 [gn build] Port db2944e34b 2022-01-24 17:15:34 +00:00
LLVM GN Syncbot a922324590 [gn build] Port 787ccd345c 2022-01-24 17:15:33 +00:00
LLVM GN Syncbot 54f1d95066 [gn build] Port 3696c70e67 2022-01-24 12:06:49 +00:00
LLVM GN Syncbot 631f3e6215 [gn build] Port d2e8fb3318 2022-01-23 16:30:34 +00:00
Arthur Eubanks 6df05697ca [gn build] Set HAVE_MALLINFO2=1
I'm seeing deprecated warnings due to using mallinfo() instead of
mallinfo2().

  ../../llvm/lib/Support/Unix/Process.inc:98:10: warning: 'mallinfo' is deprecated [-Wdeprecated-declarations]
    mi = ::mallinfo();

mallinfo2() is part of glibc 2.33 which was released in Feb 2021, which
is fairly recent but I think gn users should be using fairly up to date
glibcs.

If this breaks people we could make this a gn arg instead.

Differential Revision: https://reviews.llvm.org/D117916
2022-01-21 14:02:42 -08:00
Arthur Eubanks e39c262979 Revert "[gn build] Set HAVE_MALLINFO2=1"
This reverts commit 9f4cc5a6bb.

Breaks http://45.33.8.238/macm1/26108/step_4.txt.
2022-01-21 13:53:03 -08:00
Arthur Eubanks 9f4cc5a6bb [gn build] Set HAVE_MALLINFO2=1
I'm seeing deprecated warnings due to using mallinfo() instead of
mallinfo2().

../../llvm/lib/Support/Unix/Process.inc:98:10: warning: 'mallinfo' is deprecated [-Wdeprecated-declarations]
  mi = ::mallinfo();

mallinfo2() is part of glibc 2.33 which was released in Feb 2021, which
is fairly recent but I think gn users should be using fairly up to date
glibcs.

If this breaks people we could make this a gn arg instead.

Differential Revision: https://reviews.llvm.org/D117916
2022-01-21 13:38:27 -08:00
LLVM GN Syncbot a65934241c [gn build] Port 1755f5b1d7 2022-01-21 02:11:31 +00:00
LLVM GN Syncbot 14a2964698 [gn build] Port 83d59e05b2 2022-01-20 20:02:50 +00:00
LLVM GN Syncbot 608a9c0e79 [gn build] Port 63a991d035 2022-01-20 20:02:49 +00:00
Nico Weber 91eca967b9 [gn build] (manually) port f29256a64a 2022-01-20 11:02:06 -05:00
Nico Weber 70002a7a62 [gn build] (manually) port 30c17e70a4 2022-01-19 21:15:31 -05:00
Nico Weber cc639dde8c [gn build] port c22329972f (lldb REPL/Clang)
Fixes `lldb-shell :: REPL/Basic.test` in the gn build, making
check-lldb pass (on Linux) again.
2022-01-19 11:32:53 -05:00
Nico Weber 7260a926cf [gn build] link lldb-vscode against ws2_32.lib
Necessary after aaa50e54e6.
2022-01-19 11:06:55 -05:00
Lukáš Zaoral 14a793ab05 [lit] Fix compatibility with upstream gtest
Upstream gtest now prints 'Running main() from FILE' instead of
plain 'Running main() from gtest_main.cc'. Thus, all such tests
ended-up being mistakenly marked as UNRESOLVED.

Patch by @lzaoral

Differential Revision: https://reviews.llvm.org/D100043
2022-01-19 08:02:28 -08:00
Nico Weber aaa50e54e6 [gn build] port b2a162e63b (liblldb.dll)
This requires making liblldb a dll on Windows.
Things still work with a static lib on non-Windows, so keep it a
static lib there for now.
2022-01-19 10:50:08 -05:00
LLVM GN Syncbot c2e8b54d59 [gn build] Port df51be85e4 2022-01-18 17:28:57 +00:00
Jan Svoboda 5f4ae56457 [llvm] Remove uses of `std::vector<bool>`
LLVM Programmer’s Manual strongly discourages the use of `std::vector<bool>` and suggests `llvm::BitVector` as a possible replacement.

This patch does just that for llvm.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D117121
2022-01-18 18:20:45 +01:00
Tim Northover 51f743db08 TableGen: sort SearchableTable emission order by fields, not top-level name
This is often used for anonymous definitions, so we were sorting by
"anonymous_1234" record names, which while less bad than pointers can be easily
perturbed by adding code even in completely unrelated systems. That causes test
failures on AArch64 when sysregs with multiple valid names suddenly start
printing a different one.
2022-01-18 12:59:41 +00:00
Shao-Ce SUN efd72ee23b [NFC][SDNode] Use `StringSwitch` instead of `if`
Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D117448
2022-01-18 08:12:26 +08:00
LLVM GN Syncbot bc17de79ee [gn build] Port e69a3d18f4 2022-01-17 21:32:04 +00:00
LLVM GN Syncbot b50c10fe59 [gn build] Port e6b153947d 2022-01-16 16:03:49 +00:00
LLVM GN Syncbot 9a0e6b2abd [gn build] Port f860fe3622 2022-01-16 13:58:27 +00:00
Tom Stellard a2adebf409 workflows: Make issue-subscriber more robust for labels with special characters
Also, replace the existing actionscript implementation with a python
script that can be run outside of GitHub Actions.  The intention is
that going forward, all github action functionality would be implemented
in this script.

Reviewed By: kwk

Differential Revision: https://reviews.llvm.org/D116762
2022-01-14 22:04:54 -08:00
LLVM GN Syncbot 538ffd4a24 [gn build] Port 5726e55981 2022-01-14 15:05:57 +00:00
LLVM GN Syncbot b8367518e7 [gn build] Port d3729bb384 2022-01-14 01:58:03 +00:00
Julian Lettner 0f6f6284d7 [lit] Make sure our test temp directory is actually used by tests
All credit to Martin Storsjö (mstorsjo) who describes the issue here:
https://github.com/llvm/llvm-project/issues/53167

Differential Revision: https://reviews.llvm.org/D117179
2022-01-13 11:23:32 -08:00
LLVM GN Syncbot e2c78f99c4 [gn build] Port 67151d029b 2022-01-13 17:34:38 +00:00
LLVM GN Syncbot 32d5634b1a [gn build] Port b9bc3c107c 2022-01-13 00:08:45 +00:00
Leonard Grey 6db04b97e6 [lld-macho] Port CallGraphSort from COFF/ELF
Depends on D112160

This adds the new options `--call-graph-profile-sort` (default),
`--no-call-graph-profile-sort` and `--print-symbol-order=`. If call graph
profile sorting is enabled, reads `__LLVM,__cg_profile` sections from object
files and uses the resulting graph to put callees and callers close to each
other in the final binary via the C3 clustering heuristic.

Differential Revision: https://reviews.llvm.org/D112164
2022-01-12 10:47:04 -05:00
LLVM GN Syncbot de05128eae [gn build] Port 35cca45b09 2022-01-12 11:14:10 +00:00
Simon Tatham 42f90a28a3 [extract_symbols.py] Fix line-splitting of tool output.
Two functions in the `is_32bit_windows` family were retrieving the
output of a tool via `subprocess.check_output`, and then iterating
over it using `for line in output`. But in Python, that gets you the
output one //character// at a time, not a line at a time. So the
regexes that looked for a platform name were never matching.

(This is a mistake that Python makes uniquely easy, because iterating
over a file and over a string have different default behaviour, and
because the element type of a string is still a string so you don't
even get a type mismatch error to warn you about it!)

Reviewed By: michaelplatings

Differential Revision: https://reviews.llvm.org/D117030
2022-01-12 09:06:56 +00:00
Nico Weber 37fc1a29cb [gn build] minor comment tweaks, no behavior change 2022-01-11 22:05:44 -05:00
Nico Weber bf95d5e334 [gn build] (manually) port 85e6e748d4 (llvm/lib/Target/X86/MCA) 2022-01-11 21:44:53 -05:00
Nico Weber fce1c6fb67 [gn build] (manually) port f77d115cc1 more 2022-01-11 14:49:14 -05:00
LLVM GN Syncbot 1088376630 [gn build] Port f77d115cc1 2022-01-11 17:12:28 +00:00
Nico Weber 5fc9abe474 [gn build] (manually) port 8503c688d5 2022-01-11 09:47:28 -05:00
LLVM GN Syncbot 04867c3c51 [gn build] Port 8d23b7420c 2022-01-11 06:50:34 +00:00
LLVM GN Syncbot 38916195c9 [gn build] Port c0fdc74887 2022-01-10 08:36:39 +00:00
Kazu Hirata f44473ec4e [llvm] Remove redundant member initialization (NFC)
Identified with readability-redundant-member-init.
2022-01-08 11:56:44 -08:00
Kazu Hirata 435a5a3652 [llvm] Fix bugprone argument comments (NFC)
Identified with bugprone-argument-comment.
2022-01-08 11:56:38 -08:00
Kazu Hirata 4e2ec7e38d [llvm] Remove unused forward declarations (NFC) 2022-01-07 20:00:34 -08:00
Nico Weber 19c37223d7 [gn build] (manually) port feeff8a37c
This reverts commit 3ca6928344.
492de35df4 relanded in feeff8a37c.
The reland only uses CMAKE_INSTALL_INCLUDEDIR and not CMAKE_INSTALL_BINDIR
in llvm-config, so this reland reflects that.
2022-01-07 21:22:08 -05:00
Kazu Hirata 2aed08131d [llvm] Use true/false instead of 1/0 (NFC)
Identified with modernize-use-bool-literals.
2022-01-07 00:39:14 -08:00
LLVM GN Syncbot 3d7a3888a2 [gn build] Port 56ca11e31e 2022-01-06 16:28:57 +00:00
Chuanqi Xu bbce75e352 Update Bug report URL to Github Issues
Although we moved to Github Issues. The bug report message refers to
Bugzilla still. This patch tries to update these URLs.

Reviewed By: MaskRay, Quuxplusone, jhenderson, libunwind, libc++

Differential Revision: https://reviews.llvm.org/D116351
2022-01-06 17:33:25 +08:00
LLVM GN Syncbot a881215821 [gn build] Port 68ac7b1701 2022-01-05 20:03:02 +00:00
Nico Weber dabc101ec0 [gn build] "port" 027ffb173a 2022-01-05 12:57:18 -05:00
Zi Xuan Wu 6025ee79ae [CSKY] Add python script of CSKY asm update test check 2022-01-05 15:59:03 +08:00
LLVM GN Syncbot f61b658d7d [gn build] Port 6d722801d1 2022-01-04 22:44:20 +00:00
LLVM GN Syncbot 2b1c38f737 [gn build] Port 4dcc47aaea 2022-01-04 14:32:08 +00:00
LLVM GN Syncbot ba70fb6460 [gn build] Port 4950198116 2022-01-04 14:32:07 +00:00
LLVM GN Syncbot fb7bea0a5a [gn build] Port af7bc39ba1 2022-01-04 09:23:00 +00:00
LLVM GN Syncbot a361320d75 [gn build] Port 6f6f88ffda 2022-01-03 20:50:31 +00:00
Kazu Hirata e5947760c2 Revert "[llvm] Remove redundant member initialization (NFC)"
This reverts commit fd4808887e.

This patch causes gcc to issue a lot of warnings like:

  warning: base class ‘class llvm::MCParsedAsmOperand’ should be
  explicitly initialized in the copy constructor [-Wextra]
2022-01-03 11:28:47 -08:00
LLVM GN Syncbot b9ed95afc4 [gn build] Port fe68088d44 2022-01-03 17:01:27 +00:00
LLVM GN Syncbot 3a33c0b1ce [gn build] Port a8ae6828a9 2022-01-03 15:14:39 +00:00
Kazu Hirata fd4808887e [llvm] Remove redundant member initialization (NFC)
Identified with readability-redundant-member-init.
2022-01-01 16:18:18 -08:00
LLVM GN Syncbot ed56007ac5 [gn build] Port 2edcde00cb 2022-01-01 02:17:49 +00:00
Kazu Hirata 5a667c0e74 [llvm] Use nullptr instead of 0 (NFC)
Identified with modernize-use-nullptr.
2021-12-28 08:52:25 -08:00
LLVM GN Syncbot 0819234033 [gn build] Port b5c5d8912e 2021-12-28 07:59:27 +00:00
LLVM GN Syncbot 3b4c040cca [gn build] Port 969a51ff36 2021-12-24 11:05:23 +00:00
Nico Weber a6114ff0cd [gn build] "port" 71b3bfde9c 2021-12-23 19:52:34 -05:00
Nico Weber ee4bbb50ae [gn build] (manually) port 7cd7b4d2f8 (sanitizer_symbolize_set_demangle) 2021-12-23 18:06:48 -05:00
Nico Weber 5fd328c45f [gn build] (manually) port f103ee2e9e (sanitizer_symbolize_set_inline_frames) 2021-12-23 16:40:13 -05:00
Simon Moll 2810c3403e [VE] Add VE support to update_llc_test_checks
Add VE assembly scrubbing and triple support to update_llc_test_checks.

Reviewed By: kaz7

Differential Revision: https://reviews.llvm.org/D116104
2021-12-23 14:12:44 +01:00
LLVM GN Syncbot ece75e2035 [gn build] Port cb8a0b0797 2021-12-22 17:34:39 +00:00
LLVM GN Syncbot 19030717e3 [gn build] Port 7056250f51 2021-12-22 01:35:25 +00:00
Nico Weber 0e9393f522 [gn build] (manually) port f68e89044a 2021-12-21 18:59:37 -05:00
LLVM GN Syncbot 3ce4b6a599 [gn build] Port f78d49e068 2021-12-21 18:57:55 +00:00
Nico Weber f2f6d09185 [gn build] (semiautomatically) port 9b4f179bf8 2021-12-21 08:10:52 -05:00
Djordje Todorovic 0e343479a7 [llvm-mca] Compare multiple files
Script (llvm-mca-compare.py) uses llvm-mca tool to print
statistics in console for multiple files.
Script requires specified --llvm-mca-binary option (specified
relative path to binary of llvm-mca).
Options: --args [="-option1=<arg> -option2=<arg> ..."], -v or -h can also be used.

The script is used as follows:
$ llvm-project/llvm/utils/llvm-mca-compare.py file1.s --llvm-mca-binary=build/bin/llvm-mca

Patch by Milica Matic <Milica.Matic@syrmia.com>

Differential Revision: https://reviews.llvm.org/D115138
2021-12-21 11:56:18 +01:00
Sami Tolvanen 5dc8aaac39 [llvm][IR] Add no_cfi constant
With Control-Flow Integrity (CFI), the LowerTypeTests pass replaces
function references with CFI jump table references, which is a problem
for low-level code that needs the address of the actual function body.

For example, in the Linux kernel, the code that sets up interrupt
handlers needs to take the address of the interrupt handler function
instead of the CFI jump table, as the jump table may not even be mapped
into memory when an interrupt is triggered.

This change adds the no_cfi constant type, which wraps function
references in a value that LowerTypeTestsModule::replaceCfiUses does not
replace.

Link: https://github.com/ClangBuiltLinux/linux/issues/1353

Reviewed By: nickdesaulniers, pcc

Differential Revision: https://reviews.llvm.org/D108478
2021-12-20 12:55:32 -08:00
Geoffrey Martin-Noble e8b5b72182 [lit] Support relative path arguments
Currently the behavior with relative paths is pretty broken. It differs
between external shell and internal shell because the path resolution
is done with a different working directory. With the internal shell,
it's resolved relative to the directory from which lit is executed,
whereas with the external shell it's resolved relative to where the
test case is executed. To make matters worse, using the internal shell
the filepath to binaries looked up with `which` is returned relative
to the directory from which lit is executed, but then executed from
the test execution directory. That means that relative paths with the
internal shell give a `[Errno 2] No such file or directory` error
instead of the expected `command not found`.

To address these issues this patch makes lit interpret relative paths
as relative to the directory from which lit was invoked and modifies
`which` to return absolute paths, matching the behavior of its
namesake unix function.

See https://groups.google.com/g/llvm-dev/c/KzMWlOXR98Y/m/QJoqn0U5HAAJ

Reviewed By: yln

Differential Revision: https://reviews.llvm.org/D115486
2021-12-20 11:49:42 -08:00
Fangrui Song 98e0b2cf70 [Support] Revert posix_fallocate in resize_file
This reverts 3816c53f04 and removes follow-up
fixups.

The original intention was to show error earlier (posix_fallocate time) than
later for ld.lld but it appears to cause some problems which make it not free.

* FreeBSD ZFS: EINVAL, not too bad.
* FreeBSD UFS: according to khng "devastatingly slow on freebsd because UFS on freebsd does not have preallocation support like illumos. It zero-fills."
* NetBSD: maybe EOPNOTSUPP
* Linux tmpfs: unless tmpfs is set up to use huge pages (requires CONFIG_TRANSPARENT_HUGE_PAGECACHE=y), I can consistently demonstrate ~300ms delay for a 1.4GiB output.
* Linux ext4: I don't measure any benefit, either backed by a hard disk or by a file in tmpfs.
* The current code organization of `defined(HAVE_POSIX_FALLOCATE)` costs us a macro dispatch for AIX.

I think we should just remove it. I think if posix_fallocate ever finds demonstrable benefit,
it is likely Linux specific and will not need HAVE_POSIX_FALLOCATE, and possibly opt-in by some specific programs.

In a filesystem with CoW and compression, the ENOSPC benefit may be lost as well.

Reviewed By: khng300

Differential Revision: https://reviews.llvm.org/D115957
2021-12-20 11:16:03 -08:00
LLVM GN Syncbot ed086a8dbc [gn build] Port 37e6bd8bc8 2021-12-20 17:19:51 +00:00
LLVM GN Syncbot 3b2fd945b7 [gn build] Port 754ea6fd4d 2021-12-20 08:24:56 +00:00
Martin Storsjö 2ec75a0869 [lit] Flush stderr manually on Windows after printing messages
When run in a git bash terminal, sys.stderr isn't flushed implicitly
after printing each line. Manually flush it after each printout,
to avoid getting broken/misordered output.

A similar fix had been done in the old libcxx test config, committed
as part of 7e3ee09ad2 / D28725; this
generalizes the fix, making it available in the new libcxx test
configs too, and for any other test that uses lit_config.note().

Differential Revision: https://reviews.llvm.org/D115761
2021-12-18 21:41:40 +02:00
LLVM GN Syncbot 7de813e14c [gn build] Port 65d7fd0239 2021-12-17 18:52:31 +00:00
Kazu Hirata 2b7be47b22 [llvm] Strip redundant lambda (NFC) 2021-12-17 10:51:40 -08:00
LLVM GN Syncbot 2fefb66e53 [gn build] Port cc324af0d6 2021-12-17 18:41:48 +00:00
Nico Weber 2438540a4a [gn build] (manually) port fb9a075c81 2021-12-17 10:02:26 -05:00
Nico Weber fc01f85bf3 [gn build] (semiautomatically) port 3f5f687e2e 2021-12-17 07:26:34 -05:00
LLVM GN Syncbot cccc7aed4d [gn build] Port 09103807e7 2021-12-17 01:57:11 +00:00
LLVM GN Syncbot d98f00aa19 [gn build] Port bdc68ee70f 2021-12-17 00:28:54 +00:00
Nico Weber 85f799730f [gn build] Port 95946d2f85 2021-12-16 18:38:32 -05:00
Nico Weber 0a1bcb120f [gn build] port 78523516bc (cut MC->ProfileData dep) 2021-12-16 18:38:32 -05:00
LLVM GN Syncbot d3208cf1cd [gn build] Port 8a85be807b 2021-12-16 21:40:46 +00:00
LLVM GN Syncbot 9043c3d65b [gn build] Port da816ca0cb 2021-12-16 19:27:34 +00:00
Nico Weber 35ae37a161 [gn build] port ec37e0bbaf 2021-12-16 14:27:18 -05:00
LLVM GN Syncbot c42decb033 [gn build] Port db5aceb979 2021-12-16 07:22:17 +00:00
LLVM GN Syncbot fd65d39793 [gn build] Port 2b48761575 2021-12-15 23:47:26 +00:00
Nico Weber 65146382b3 [gn build] Remove unhelpful default for goma_dir
The default hasn't worked in over 9 months now.

Getting a friendly error message if this isn't set is more useful than getting
a bad default value.

Differential Revision: https://reviews.llvm.org/D115833
2021-12-15 18:39:53 -05:00
LLVM GN Syncbot 5949a3d210 [gn build] Port 8179e1fd51 2021-12-15 19:34:58 +00:00
Nico Weber d4f3af2f6c [gn build] (manually) port b45ad7363c (LLVM_WITH_Z3) 2021-12-14 23:11:42 -05:00
LLVM GN Syncbot 794b4df504 [gn build] Port 4299d8d0ce 2021-12-15 01:15:06 +00:00
LLVM GN Syncbot d4127c0d76 [gn build] Port 3f630cff65 2021-12-15 00:46:46 +00:00
Fangrui Song 1add613642 [gn build] (manually) port 9c7fbc3f9b (LLDB_ENABLE_FBSDVMCORE) 2021-12-14 16:36:44 -08:00
LLVM GN Syncbot 803ec71b84 [gn build] Port 4e94cba5b4 2021-12-14 19:12:20 +00:00
Nico Weber 0e5e963b2d [gn build] Reformat all build files
Ran:

    git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format
2021-12-14 14:07:19 -05:00
Nico Weber 5ac14cd167 [gn build] (manually) port f0ca8d2461 (debuginfod-find) 2021-12-14 14:06:12 -05:00
Nico Weber 0319d4a12e [gn build] (manually) port 1042de9058 to lit.site.cfg.in too 2021-12-14 13:49:04 -05:00
Fangrui Song aeea20eebe [gn] Use CLANG_DEFAULT_PIE_ON_LINUX= 2021-12-14 10:20:51 -08:00
Fangrui Song 1042de9058 [Driver] Add CLANG_DEFAULT_PIE_ON_LINUX to emulate GCC --enable-default-pie
In 2015-05, GCC added the configure option `--enable-default-pie`. When enabled,

* in the absence of -fno-pic/-fpie/-fpic (and their upper-case variants), -fPIE is the default.
* in the absence of -no-pie/-pie/-shared/-static/-static-pie, -pie is the default.

This has been adopted by all(?) major distros.

I think default PIE is the majority in the Linux world, but
--disable-default-pie users is not that uncommon because GCC upstream hasn't
switched the default yet (https://gcc.gnu.org/PR103398).

This patch add CLANG_DEFAULT_PIE_ON_LINUX which allows distros to use default PIE.
The option is justified as its adoption can be very high among Linux distros
to make Clang default match GCC, and is likely a future-new-default, at which
point we will remove CLANG_DEFAULT_PIE_ON_LINUX.
The lit feature `default-pie-on-linux` can be handy to exclude default PIE sensitive tests.

Reviewed By: foutrelis, sylvestre.ledru, thesamesam

Differential Revision: https://reviews.llvm.org/D113372
2021-12-14 10:09:00 -08:00
Kirill Stoimenov 3bc08d8b8d [gn build] Reland 5082c330138: (semimanually) port ebc31d2. 2021-12-14 17:22:25 +00:00
LLVM GN Syncbot bc56ea7c3e [gn build] Port fff876c20e 2021-12-13 23:30:23 +00:00
Noah Shutty 34491ca729 [Symbolizer][Debuginfo] Add debuginfod client to llvm-symbolizer.
Adds a fallback to use the debuginfod client library (386655) in `findDebugBinary`.
Fixed a cast of Erorr::success() to Expected<> in debuginfod library.
Added Debuginfod to Symbolize deps in gn.
Updates compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh to include Debuginfod library to fix sanitizer-x86_64-linux breakage.

Reviewed By: jhenderson, vitalybuka

Differential Revision: https://reviews.llvm.org/D113717
2021-12-13 23:00:32 +00:00
Noah Shutty 6c3bc57f25 [gn build] Remove unnecessary lld dependency on DebugInfo/Symbolize.
The gn script for lld's COFF lib adds an unnecessary dependency on llvm/lib/DebugInfo/Symbolize. There is no such dependency in lld/COFF/CMakeLists.txt. This can be safely removed.

Reviewed By: phosek, thakis

Differential Revision: https://reviews.llvm.org/D115554
2021-12-13 20:07:44 +00:00
LLVM GN Syncbot 9c1fd1b533 [gn build] Port 78b0f3701d 2021-12-13 15:53:45 +00:00
Matt Devereau 41def32040 [AArch64][SVE][NEON] Add NEON-SVE-Bridge intrinsics
Adds svset_neonq, svget_neonq, svdup_neonq AArch64 intrinsics.

These are described in the ACLE specification:
https://github.com/ARM-software/acle/pull/72

https://reviews.llvm.org/D114713
2021-12-13 11:31:57 +00:00
Nico Weber 318942de22 [gn build] Port abb5dd6e99
(This reverts commit 7d9f11be81,
to reland the Ryu code: ae53d02f55 relanded in abb5dd6e99).
2021-12-12 12:39:32 -05:00
Yitzhak Mandelbaum 93fbaa46c8 Revert "Revert "[clang][dataflow] Add framework for testing analyses.""
This reverts commit 78ff12da11 and fixes the initial cause of the revert.
2021-12-11 23:16:59 +00:00
Kazu Hirata 36b8a4f9f3 [llvm] Use llvm::is_contained (NFC) 2021-12-11 11:42:09 -08:00
Nico Weber 3ca6928344 Revert "[gn build] (manually) port 492de35df44"
This reverts commit 9a3df8fbc2.
492de35df4 was reverted in 30fc88bf1d.
2021-12-10 21:00:02 -05:00
Nico Weber 9a3df8fbc2 [gn build] (manually) port 492de35df4 2021-12-10 16:33:55 -05:00
LLVM GN Syncbot bebfbfd4a8 [gn build] Port 04f2712ef4 2021-12-10 19:52:50 +00:00
Duncan P. N. Exon Smith dcd6162b7f utils: Remove some no-op raw_string_ostream flush calls, NFC
Since 65b13610a5, raw_string_ostream has
been unbuffered by default. Based on an audit of llvm/utils/, this
commit removes every call to `raw_string_ostream::flush()` and any call
to `raw_string_ostream::str()` whose result is ignored or that doesn't
help with clarity.

I left behind a few calls to `str()`. In these cases, the underlying
std::string was declared pretty far away and never used again, whereas
stream recently had its last write. The code is easier to read as-is;
the no-op call to `flush()` inside `str()` isn't harmful, and when
https://reviews.llvm.org/D115421 lands it'll be gone anyway.
2021-12-10 11:26:08 -08:00
LLVM GN Syncbot 2d1761bffc [gn build] Port d25a65030b 2021-12-10 18:58:26 +00:00
Nico Weber 78ff12da11 Revert "[clang][dataflow] Add framework for testing analyses."
Doesn't build on Windows.

This reverts commit 5a40df6381
and commit db494bd4e8.
2021-12-10 11:06:40 -05:00
Nico Weber 5082c33013 [gn build] (semimanually) port ebc31d2e72 2021-12-10 10:39:28 -05:00
Nico Weber db494bd4e8 [gn build] Port 5a40df6381 2021-12-10 10:37:31 -05:00
Nico Weber 30f221bba0 Revert "[Symbolizer][Debuginfo] Add debuginfod client to llvm-symbolizer."
This reverts commit 5bba0fe12b.
Makes lld depend on libcurl, see comments on https://reviews.llvm.org/D113717
2021-12-10 10:33:05 -05:00
Nico Weber 2586c23bae [gn build] Prevent deps on HTTP requests in clang and lld at GN time
To make sure no regressions creep in. See also discussion on
https://reviews.llvm.org/D113717

We don't want this dep in most targets, but protecting clang and lld is
a good start.
2021-12-10 08:56:24 -05:00
Nico Weber 754e310a62 [gn build] (manually) port 8dcaf3aa0b and 6e2aecd759 2021-12-10 07:50:41 -05:00
LLVM GN Syncbot 37a395b396 [gn build] Port 1d0244aed7 2021-12-10 09:08:48 +00:00
Noah Shutty 5bba0fe12b [Symbolizer][Debuginfo] Add debuginfod client to llvm-symbolizer.
Adds a fallback to use the debuginfod client library (386655) in `findDebugBinary`.
Fixed a cast of Erorr::success() to Expected<> in debuginfod library.
Added Debuginfod to Symbolize deps in gn.
Updates compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh to include Debuginfod library to fix sanitizer-x86_64-linux breakage.

Reviewed By: jhenderson, vitalybuka

Differential Revision: https://reviews.llvm.org/D113717
2021-12-10 01:32:36 +00:00
Noah Shutty afa3c14e2f Revert "[Symbolizer][Debuginfo] Add debuginfod client to llvm-symbolizer."
This reverts commit e2ad4f1756 because it
does not correctly fix the sanitizer buildbot breakage.
2021-12-10 00:59:13 +00:00
Noah Shutty e2ad4f1756 [Symbolizer][Debuginfo] Add debuginfod client to llvm-symbolizer.
Adds a fallback to use the debuginfod client library (386655) in `findDebugBinary`.
Fixed a cast of Erorr::success() to Expected<> in debuginfod library.
Added Debuginfod to Symbolize deps in gn.
Adds new symbolizer symbols to `global_symbols.txt`.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D113717
2021-12-10 00:23:00 +00:00
LLVM GN Syncbot 075eb78d07 [gn build] Port cfb0750891 2021-12-09 21:10:50 +00:00
Amy Kwan 0ae1b1ce1a [test-release.sh] Respect the given width in LIT runs by adding `-j` in LLVM_LIT_ARGS.
This patch adds allows the LIT runs within test-release.sh to obey the width that
is passed into the script. This is accomplished by adding the width in the LLVM_LIT_ARGS
CMake configuration.

Differential Revision: https://reviews.llvm.org/D115350
2021-12-09 08:37:15 -06:00
LLVM GN Syncbot aebd932bc4 [gn build] Port 059e03476c 2021-12-09 04:11:22 +00:00
Nico Weber 80544d1b4c [gn build] (manually) port ccf1469a4c (lldbVersion) 2021-12-08 19:47:45 -05:00
Nico Weber 3f3faa36ff [gn build] (manually) port f75cce0be8 2021-12-08 19:21:07 -05:00
Nico Weber d04ea509df [gn build] (manually) port f71c553a30 2021-12-08 19:10:53 -05:00
Martin Storsjö aff028f7d8 [lit] Pass the COMSPEC variable through to test processes on Windows
This variable is necessary for the system() function for running
external processes.

This is needes for some libcxx tests. With the current libcxx test
infrastructure, all OS environment variables are passed through, but
with the new "from scratch" libcxx test setup, we only pass through
the variables listed here.

Differential Revision: https://reviews.llvm.org/D115363
2021-12-08 23:29:39 +02:00
Nico Weber 470c3d8ca3 Revert "[gn build] (manually) port 02cc8d698c49"
This reverts commit 0f865dc694.
02cc8d698c was reverted in aaec63d2a7.
2021-12-08 13:56:21 -05:00
Nico Weber 0f865dc694 [gn build] (manually) port 02cc8d698c 2021-12-08 13:45:54 -05:00
Louis Dionne a6e5563dfa [libc++][release] Do not force building the runtimes with -fPIC
There's a lot of history behind this, so here's a summary:

1. I stopped forcing -fPIC when building the runtimes in 30f305efe2,
   before the LLVM 9 release back in 2019.

2. Someone complained that libc++.a couldn't be used in shared libraries
   built without -fPIC (http://llvm.org/PR43604) since the LLVM 9 release.
   This had been caused by my removal of -fPIC when building libc++.a in (1).

3. I suggested two ways of fixing the issue, the first being to force
   -fPIC back unconditionally (http://llvm.org/D104328), and the second
   being to specify that option explicitly when building the LLVM release
   (http://llvm.org/D104327). We converged on the first solution.

4. I landed D104328, which forced building the runtimes with -fPIC.
   This was included in the LLVM 13.0 release.

5. People complained about that and requested that we be able to
   customize this setting (basically we should have done the second
   solution).

This patch makes it such that the LLVM release script will specifically
ask for building with -fPIC using CMAKE_POSITION_INDEPENDENT_CODE,
however by default the runtimes will not force that option onto users.

This patch has the unintended effect that Clang and the LLVM libraries
(not only the runtime ones like libc++) will also be built with -fPIC
in the release. It would be better if we could specify that -fPIC is to
be used only when building the runtimes, however this is left as a
future improvement. The release should probably be using a bootstrapping
build and passing those options to the stage that builds the runtimes
only, see https://reviews.llvm.org/D112748 for that change.

Differential Revision: https://reviews.llvm.org/D110261
2021-12-08 11:34:35 -05:00
LLVM GN Syncbot 894de8118a [gn build] Port 81eda008e9 2021-12-08 13:42:16 +00:00
Nico Weber 8720247f60 Reland "[gn build] (manually) port 1ee32055ea (benchmark move)"
This reverts commit bbccf49922.
1ee32055ea relanded in 5dda2efde5.
2021-12-07 20:51:25 -05:00
Mircea Trofin 5dda2efde5 Re-Reland "[benchmarks] Move libcxx's fork of google/benchmark and llvm/utils'"
This reverts commit b2fbd45d23. D114922
fixed the reason of the 2nd revert.

This patch also re-applies 39e9f5d368.

Differential Revision: https://reviews.llvm.org/D112012
2021-12-07 17:10:41 -08:00
LLVM GN Syncbot 6914af05b2 [gn build] Port 02940d6d22 2021-12-07 21:08:05 +00:00
LLVM GN Syncbot 9779972311 [gn build] Port fa99cb64ff 2021-12-07 17:01:16 +00:00
LLVM GN Syncbot 0fc2e6d390 [gn build] Port f573f6866e 2021-12-07 15:31:37 +00:00
LLVM GN Syncbot 7d9f11be81 [gn build] Port ae53d02f55 2021-12-07 08:10:43 +00:00
LLVM GN Syncbot 2ccab2ecbf [gn build] Port 0fe61ecc2c 2021-12-07 06:41:50 +00:00
LLVM GN Syncbot 37fbf238f4 [gn build] Port d9941f7454 2021-12-07 05:54:10 +00:00
Nico Weber 63d518f31a [tsan] Move tsan/rtl build rules into tsan/rtl/CMakeLists.txt
That way, the build rules are closer to the source files they describe.

No intended behavior change.

Differential Revision: https://reviews.llvm.org/D115155
2021-12-06 19:58:30 -05:00
Nico Weber 6fef466779 [gn build] Port 3678326d28 2021-12-06 19:08:59 -05:00
LLVM GN Syncbot 92b94dabef [gn build] Port cc3bb85580 2021-12-06 23:16:18 +00:00
Nico Weber 0890efe613 Reland "[gn build] (manually) port 4a16fe1369 (debuginfod)"
This reverts commit 4b63562ebc.
The debuginfod change relanded in 0e0f1b28fc
2021-12-06 18:15:20 -05:00
Nico Weber 4b63562ebc Revert "[gn build] (manually) port 4a16fe1369 (debuginfod)"
This reverts commit f0cda7155c.
4a16fe1369 got reverted in f45c9c56c5.
2021-12-06 14:24:01 -05:00
Nico Weber f0cda7155c [gn build] (manually) port 4a16fe1369 (debuginfod) 2021-12-06 13:19:09 -05:00
Evgeny Mandrikov c94eb0f9ef Fix compilation of Google Test in C++20 mode
Without this patch when using CMAKE_CXX_STANDARD=20
and MSVC 19.30.30705.0 compilation of unit tests
fails with

llvm\utils\unittest\googlemock\include\gmock/gmock-actions.h(828): error C2039: 'result_of': is not a member of 'std'

Patch is taken from Google Test:
61f010d703

Do not use std::result_of as it was removed in C++20.

Differential Revision: https://reviews.llvm.org/D115163
2021-12-06 18:07:25 +01:00
LLVM GN Syncbot 73195657cc [gn build] Port c68f71eb37 2021-12-06 17:02:44 +00:00
Paulo Matos a96d828510 [WebAssembly] Implementation of intrinsic for ref.null and HeapType removal
This patch implements the intrinsic for ref.null.
In the process of implementing int_wasm_ref_null_func() and
int_wasm_ref_null_extern() intrinsics, it removes the redundant
HeapType.

This also causes the textual assembler syntax for ref.null to
change. Instead of receiving an argument: `func` or `extern`, the
instruction mnemonic is either ref.null_func or ref.null_extern,
without the need for a further operand.

Reviewed By: tlively

Differential Revision: https://reviews.llvm.org/D114979
2021-12-06 09:46:15 +01:00
Nico Weber 14e7f5b051 [gn build] port a8025e06fc more
src/ryu/*.cpp includes files relative to src, so src/ needs
to be passes as -I flag now.
2021-12-05 13:17:03 -05:00
Nico Weber dfb68e49aa [gn build] (semiautomaticallly) port a8025e06fc (libc++ ryu) 2021-12-05 07:52:43 -05:00
Nico Weber 92ceba7d13 [gn build] port f1585a4b47 2021-12-04 22:29:05 -05:00
Jay Foad c8e84c7a5f [IR,TableGen] Add support for vec3 intrinsic arguments
Add generic support for vec3 types, and in particular define
llvm_v3f32_ty which will be used by AMDGPU's
llvm.amdgcn.image.bvh.intersect.ray intrinsic.

Differential Revision: https://reviews.llvm.org/D114956
2021-12-04 10:32:11 +00:00