11846 Commits

Author SHA1 Message Date
Félix Cloutier
bca75abc01 Revert "[NFC] Make format() more amenable to format attributes"
This reverts commit fb1e90ef07fec0d64a05c0b6d41117a5ea3e8344.
2022-10-26 12:53:14 -07:00
Nico Weber
457fe21d8b [gn build] port cb0eb9d8dd5 (lldb test libc++ refs) 2022-10-26 15:30:10 -04:00
Félix Cloutier
fb1e90ef07 [NFC] Make format() more amenable to format attributes
This change modifies the implementation of the format() function
so that vendor forks committed to building with compilers that
support __attribute__((format)) on non-variadic functions can
check the format() function with it.

Reviewed By: ahatanak
Differential Revision: https://reviews.llvm.org/D132413
rdar://84571523
2022-10-26 12:10:42 -07:00
Anton Sidorenko
7bc7f2da76 [UpdateTestChecks] Sync flags in update_mir_test_checks.py with MIFlags
Some instructions are not matched by update_mir_test_checks.py because MIFlags and
regex in the script are not synchronized.

Differential Revision: https://reviews.llvm.org/D136170
2022-10-26 17:07:46 +03:00
LLVM GN Syncbot
2e5bf4da99 [gn build] Port bb72d0dde29e 2022-10-26 13:25:32 +00:00
LLVM GN Syncbot
85e4d5583e [gn build] Port 93ce23adb548 2022-10-26 13:20:22 +00:00
Pierre van Houtryve
63390dccd8 [GlobalISel] Add Predicates to GICombineRule
Small QoL change to allow Predicates to be used in GICombineRule.
Currently only one combine in the AMDGPU backend makes use of it.

The implementation is pretty simple to get started but of course we can expand this later on and optimize predicate checking better if needed.

Reviewed By: dsanders

Differential Revision: https://reviews.llvm.org/D136681
2022-10-26 07:13:40 +00:00
Corentin Jabot
0057756fd4 [Clang][NFC] Fix UnicodeData.txt parsing.
Fix the UnicodeNameToCodepoint tool misshandling
the case of a line containing a single semi-colon
(which does not happens in practice)
2022-10-25 18:48:38 +02:00
gbreynoo
33601f4255 [llvm-lit][test] Fix regex to capture scientific notation
We were seeing an intermittent local test failure of
utils\lit\tests\test-output.py in which the elapsed time output was
being given in scientific notation. Python automatically represents
small floating-point values in scientific notation so I have altered
these tests regex to capture output in that format.

Differential Revision: https://reviews.llvm.org/D136469
2022-10-25 16:05:35 +01:00
LLVM GN Syncbot
89fd81d6b3 [gn build] Port a3be778ed09b 2022-10-25 14:17:26 +00:00
LLVM GN Syncbot
4ffba0a9be [gn build] Port 791fe26d7581 2022-10-25 14:17:24 +00:00
Fangrui Song
3a3603ff99 [clang] Replace BACKEND_PACKAGE_STRING with LLVM_VERSION_STRING
420d7ccbac0f499a6ff9595bdbfa99cd3376df22 introduced BACKEND_PACKAGE_STRING to
replace `PACKAGE_VERSION` (llvm/Config/config.h) to support standalone builds.
This is used in the output of `clang -cc1 -v`.

Since llvm-config.h is available for both standalone and non-standalone builds,
we can just use `LLVM_VERSION_STRING` from llvm-config.h.

clang/cmake/modules/AddClang.cmake uses `VERSION_STRING "${CLANG_VERSION} (${BACKEND_PACKAGE_STRING})"`.
Just simplify it to `"${CLANG_VERSION}"` so that we can remove the CMake
variable BACKEND_PACKAGE_STRING.

Reviewed By: tstellar

Differential Revision: https://reviews.llvm.org/D136660
2022-10-25 00:24:25 -07:00
LLVM GN Syncbot
a704782e6a [gn build] Port fdac4c4e92e5 2022-10-25 06:57:59 +00:00
Freddy Ye
fdac4c4e92 [X86] Add CMPCCXADD instructions.
For more details about these instructions, please refer to the latest ISE document: https://www.intel.com/content/www/us/en/develop/download/intel-architecture-instruction-set-extensions-programming-reference.html

Reviewed By: pengfei, skan

Differential Revision: https://reviews.llvm.org/D135933
2022-10-25 14:33:39 +08:00
Nico Weber
8d995c085f [gn build] port 97bd44f436ea 2022-10-24 07:32:13 -04:00
LLVM GN Syncbot
b50392342b [gn build] Port e98a4c5acb37 2022-10-24 07:30:12 +00:00
LLVM GN Syncbot
ae34f969e7 [gn build] Port 2c155d379960 2022-10-24 04:14:21 +00:00
LLVM GN Syncbot
bb1c8b1293 [gn build] Port 596fdf75d99f 2022-10-23 22:17:33 +00:00
LLVM GN Syncbot
cfd0769e5b [gn build] Port 27902eea0f0a 2022-10-23 22:17:32 +00:00
LLVM GN Syncbot
d3f8e0bf8d [gn build] Port 661881d43633 2022-10-22 00:22:59 +00:00
Nico Weber
f498cff034 [gn build] port 27d8eedd5a3c (ClangSupportTests) 2022-10-21 20:22:38 -04:00
Arthur Eubanks
4153f989ba [ObjCARC] Remove legacy PM versions of optimization passes
This doesn't touch objc-arc-contract because that's in the codegen pipeline.
However, this does move its corresponding initialize function into initializeCodegen().

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D135041
2022-10-21 13:40:54 -07:00
Arthur Eubanks
0fbb261536 [llvm-reduce] Attempt to strip debug info
I often run llvm-reduce on IR that contains debug info, this prevents an
extra step of `opt -passes=strip` I do every time and will result in a
lot less invalid reductions around debug metadata.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D136208
2022-10-21 09:11:58 -07:00
Caroline Concatto
1e4f82c257 [AArch64]SME2 Multi-single vector SVE Destructive 2 and 4 Registers
This patch adds the assembly/disassembly for the following instructions:
  ADD (to vector): Add replicated single vector to multi-vector with multi-vector result.
  SQDMULH (multiple and single vector): Multi-vector signed saturating doubling multiply high by vector.
for 2 and 4 ZA SVE registers.

The reference can be found here:

https://developer.arm.com/documentation/ddi0602/2022-09

It also adds more size for the multiple register tuple:
  ZZ_b_mul_r,  ZZ_h_mul_r,
  ZZZZ_b_mul_r,  ZZZZ_h_mul_r,
for 8 bits and 16 bits with 2 and 4 ZA registers.

Depends on: D135468

With a fix for Mips for this test:
llvm/test/MC/Mips/mips64r6/valid.s

Differential Revision: https://reviews.llvm.org/D135563
2022-10-21 14:01:29 +01:00
LLVM GN Syncbot
e5f6ad2212 [gn build] Port 0332a8e7d6da 2022-10-21 04:55:54 +00:00
Caroline Concatto
9895447006 Revert "[AArch64]SME2 Multi-single vector SVE Destructive 2 and 4 Registers"
This reverts commit 4c4909703d74883e5cc49edcbd22b783135d2897.

This patch was breaking this test:

llvm/test/MC/Mips/mips64r6/valid.s

I will push again when fixed
2022-10-20 19:43:31 +01:00
Caroline Concatto
4c4909703d [AArch64]SME2 Multi-single vector SVE Destructive 2 and 4 Registers
This patch adds the assembly/disassembly for the following instructions:
  ADD (to vector): Add replicated single vector to multi-vector with multi-vector result.
  SQDMULH (multiple and single vector): Multi-vector signed saturating doubling multiply high by vector.
for 2 and 4 ZA SVE registers.

The reference can be found here:

https://developer.arm.com/documentation/ddi0602/2022-09

It also adds more size for the multiple register tuple:
  ZZ_b_mul_r,  ZZ_h_mul_r,
  ZZZZ_b_mul_r,  ZZZZ_h_mul_r,
for 8 bits and 16 bits with 2 and 4 ZA registers.

Depends on: D135468

Differential Revision: https://reviews.llvm.org/D135563
2022-10-20 18:54:41 +01:00
LLVM GN Syncbot
96552e7390 [gn build] Port a48007355a03 2022-10-20 15:30:49 +00:00
Pierrick Bouvier
b1e5e81efd
Detect Visual Studio automatically in Windows packaging script
Instead of hardcoding several VS paths, use vswhere.exe (available from
VS 2017) to get latest version available.

Reviewed By: hans, thieta

Differential Revision: https://reviews.llvm.org/D135873
2022-10-20 16:29:36 +02:00
Pierrick Bouvier
d7d05ffa74
Introduce options for Windows packaging script
Options:
--version: [required] version to build
--help: display this help
--x86: build and test x86 variant
--x64: build and test x64 variant

Note: At least one variant to build is required.

Example: build_llvm_release.bat --version 15.0.0 --x64

Reviewed By: hans, thieta

Differential Revision: https://reviews.llvm.org/D135255
2022-10-20 14:13:28 +02:00
LLVM GN Syncbot
ab2b84db99 [gn build] Port 3c397c90c183 2022-10-20 07:32:37 +00:00
LLVM GN Syncbot
8e237d87c5 [gn build] Port e28b9357b14c 2022-10-20 05:20:35 +00:00
LLVM GN Syncbot
647ca2ee70 [gn build] Port 62ca79102cf9 2022-10-20 01:14:27 +00:00
Yuanfang Chen
63512592e9 [lit] fix a error when using --show-used-features
The error is
```
NotADirectoryError: [Errno 20] Not a directory: '<build-dir>/unittests/Analysis/./AnalysisTests/0/40'
```

Exclude unittests when collecting features because
unittests don't make use of feature keywords.
2022-10-19 10:57:01 -07:00
LLVM GN Syncbot
9af0184842 [gn build] Port 8cadac41e9f6 2022-10-19 12:45:01 +00:00
LLVM GN Syncbot
0bfd900150 [gn build] Port 594fa1474f0c 2022-10-18 19:15:31 +00:00
Arthur Eubanks
743087fb63 Port print-cfg-sccs to new pass manager
This is actually used, see https://discourse.llvm.org/t/use-print-callgrapg-sccs-from-opt/65782.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D135718
2022-10-18 08:47:08 -07:00
Andrew Ng
1e29766314 [CMake] Add Python script to generate version script symbol exports
Using a Python script instead of the various shell commands means that
it is now possible to cross compile LLVM for Linux on Windows.

Differential Revision: https://reviews.llvm.org/D136092
2022-10-18 13:47:43 +01:00
Nico Weber
2ea39330ba [gn build] port fe7a3cedf771 (llvm-debuginfo-analyzer) 2022-10-18 06:34:53 -04:00
Fangrui Song
3baadff896 [CMake] Remove CLANG_DEFAULT_STD_C/CLANG_DEFAULT_STD_CXX
When Clang is used as a cross compiler, it should respect the target
platform default. Defaulting to a configure-time CLANG_DEFAULT_STD_C/CLANG_DEFAULT_STD_CXX
does not make much sense.

When Clang is used as a single-platform compiler, we should use Clang
configuration file (https://discourse.llvm.org/t/configuration-files/42529
https://clang.llvm.org/docs/UsersManual.html#configuration-files).

The Gentoo needs from D34365 has been satisfied by a configuration file.

Reviewed By: mgorny

Differential Revision: https://reviews.llvm.org/D133375
2022-10-16 13:15:44 -07:00
Keith Smiley
c116bd9f60
[github] Fix minor lint warnings (NFC)
Differential Revision: https://reviews.llvm.org/D135532
2022-10-14 15:46:57 -07:00
Keith Smiley
14e4d92f8d
[github] Update pip deps (NFC)
Minor dep updates identified in https://github.com/llvm/llvm-project/issues/57907

Differential Revision: https://reviews.llvm.org/D135531
2022-10-14 15:46:56 -07:00
Nico Weber
edfd8c66bc [gn build] port 0cfa50154a47eb 2022-10-14 15:07:56 -04:00
Nico Weber
a191fc8fc6 [gn build] Remove unused tablegen.gni imports
Found via

    for f in $(rg -l tablegen.gni llvm/utils/gn); do
        if ! rg -q 'tablegen\(' $f; then
            echo $f
        fi
    done

after seeing it randomly in one of the files.
2022-10-14 15:03:41 -04:00
Nico Weber
37c693d8da [gn build] port 911d2dc230 (LLVMFrontendHLSL) 2022-10-14 14:59:41 -04:00
Nico Weber
71d331ca22 [gn build] port 6ce872724877 2022-10-14 14:33:33 -04:00
Aaron Ballman
19e984ef8f Properly print unnamed TagDecl objects in diagnostics
The diagnostics engine is very smart about being passed a NamedDecl to
print as part of a diagnostic; it gets the "right" form of the name,
quotes it properly, etc. However, the result of using an unnamed tag
declaration was to print '' instead of anything useful.

This patch causes us to print the same information we'd have gotten if
we had printed the type of the declaration rather than the name of it,
as that's the most relevant information we can display.

Differential Revision: https://reviews.llvm.org/D134813
2022-10-14 08:18:28 -04:00
Nico Weber
aaecabe68b [gn build] port 1fda6f6859aa (lld driver_executable) 2022-10-13 19:56:42 -04:00
Philip Reames
fe755af3a9 Revert "Remove PlaceSafepoints pass"
This reverts commit cb66e123c6bc82a793300b6fb3ecbed79c58f557.  It was reported via https://reviews.llvm.org/rGcb66e123c6bc82a793300b6fb3ecbed79c58f557#1132969 that the Microsoft.NET compiler is still using this pass.
2022-10-13 07:17:25 -07:00
LLVM GN Syncbot
caa41a78f1 [gn build] Port 573a5de7551c 2022-10-13 00:34:23 +00:00