LLVM/project 0c57db6clang/lib/AST/ByteCode Interp.h, clang/test/AST/ByteCode/libcxx getfield-nonrecord.cpp

[clang][bytecode] Reject GetField{,Pop} ops on non-records (#202260)

Similar to what we do in GetPtrField{,Pop}.
DeltaFile
+89-0clang/test/AST/ByteCode/libcxx/getfield-nonrecord.cpp
+30-16clang/lib/AST/ByteCode/Interp.h
+119-162 files

LLVM/project 14aae62cross-project-tests/debuginfo-tests/dexter/dex/evaluation StateMatch.py, cross-project-tests/debuginfo-tests/dexter/dex/test_script Script.py Nodes.py

[Dexter] Add label nodes for line references

This patch adds a !label node to Dexter scripts, which references lines at
a position in the source program marked with "!dex_label <identifier>". Each
label use can be given a positive or negative offset, and file lookup is
based on the provided --source-root-dir (using the test file's directory if
none is provided).
DeltaFile
+111-7cross-project-tests/debuginfo-tests/dexter/dex/test_script/Script.py
+70-13cross-project-tests/debuginfo-tests/dexter/dex/test_script/Nodes.py
+41-0cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/labels/source_root_dir.cpp
+38-0cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/labels/simple_labels.cpp
+35-0cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/labels/offset.cpp
+14-10cross-project-tests/debuginfo-tests/dexter/dex/evaluation/StateMatch.py
+309-303 files not shown
+336-319 files

LLVM/project 2e34b79clang/lib/AST/ByteCode Interp.cpp, clang/test/AST/ByteCode switch-case-steps.cpp

[clang][bytecode] Only count taken jumps as steps (#201845)

There are several large array declarations in llvm-libc. They usually
look similar to this:
```c++
alignas(16) inline constexpr LogRR LOG_TABLE = {
    {
        {Sign::POS, 0, 0_u128},
        {Sign::POS, -134, 0x8080abac'46f38946'662d417c'ed007a46_u128},
        {Sign::POS, -133, 0x8102b2c4'9ac23a4f'91d082dc'e3ddcd38_u128},
        {Sign::POS, -133, 0xc2492946'4655f45c'da5f3cc0'b3251dbd_u128},
        {Sign::POS, -132, 0x820aec4f'3a222380'b9e3aea6'c444ef07_u128},
// ...
```
the `_u128` is a user-defined literal, so the hex constant to the left
of it is actually a `StringLiteral` and the UDL converts that to a
different type by iterating over all chars. It calls one function per
char, and that function contains the usual switch statement over all
ASCII characters.

    [15 lines not shown]
DeltaFile
+120-0clang/test/AST/ByteCode/switch-case-steps.cpp
+4-2clang/lib/AST/ByteCode/Interp.cpp
+124-22 files

LLVM/project c1c0fb3bolt/include/bolt/Core MCPlusBuilder.h, bolt/lib/Passes LongJmp.cpp BinaryPasses.cpp

Revert "[BOLT][AArch64] Transform cmpbr ~> cmp + br when inversion not possible (#185731)" (#202309)

This reverts commit 6b13656fd8386f979e061cc97e32b607ee3fcdf4.

We have identified various bugs hence reverting:

* relaxLocalBranches() should account for BB growth and adjust subsequent BB offsets in fragment
* multiple parallel workers are sharing the same allocator in DataflowInfoManager
* liveness is run lazily, potentially after the CFG has been modified
DeltaFile
+10-130bolt/unittests/Core/MCPlusBuilder.cpp
+38-84bolt/test/AArch64/compare-and-branch-inversion.S
+15-75bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp
+5-22bolt/lib/Passes/LongJmp.cpp
+2-14bolt/lib/Passes/BinaryPasses.cpp
+3-8bolt/include/bolt/Core/MCPlusBuilder.h
+73-3339 files not shown
+83-36715 files

LLVM/project dab2bdbmlir/include/mlir/Dialect/AMDGPU/IR CMakeLists.txt

[MLIR] Fix doc build by adding missing `-dialect=` (#202313)
DeltaFile
+1-1mlir/include/mlir/Dialect/AMDGPU/IR/CMakeLists.txt
+1-11 files

LLVM/project 2bd098bclang/include/clang/Analysis ProgramPoint.h CFG.h, clang/lib/StaticAnalyzer/Core CheckerManager.cpp CoreEngine.cpp

[analyzer] Trigger checkLifetimeEnd callback from CFGLifetimeEnds element

This patch adds handling of the `CFGLifetimeEnd` element to the CSA, and
produces a newly created callback `checkLifetimeEnd` for each occurrence
of it.

It is useful to implement detection of dangling pointers as in:

```
void su_use_after_block ()  { int* p=0; { int x=1; p=&x; } *p = 2; }
//                                                       ^ p dangles
```

This patch does not implement the check itself. it is motivated by the
discussion in

https://discourse.llvm.org/t/what-is-the-status-of-scopeend-and-scopebegin/90861

--

    [4 lines not shown]
DeltaFile
+209-0clang/unittests/StaticAnalyzer/CheckLifetimeEndTest.cpp
+182-0clang/test/Analysis/lifetime-end-simple-cfg-output.cpp
+53-27clang/include/clang/Analysis/ProgramPoint.h
+46-33clang/include/clang/Analysis/CFG.h
+48-6clang/lib/StaticAnalyzer/Core/CheckerManager.cpp
+10-8clang/lib/StaticAnalyzer/Core/CoreEngine.cpp
+548-749 files not shown
+615-7415 files

LLVM/project cf4f334flang-rt/lib/runtime iso_c_binding.f90, flang/docs Extensions.md

[flang][flang-rt] Treat REAL(2)/COMPLEX(2) as C-interoperable types (#201888)

IEEE-754 binary16 ("half") maps cleanly to the C `_Float16` type
(ISO/IEC TS 18661-3), but flang previously rejected `REAL(KIND=2)` and
`COMPLEX(KIND=2)` in C-interoperable contexts. Make `REAL(KIND=2)` and
`COMPLEX(KIND=2)` into actual interoperable types.

`ISO_C_BINDING` now exports the gfortran-compatible named constants
`c_float16` and `c_float16_complex` (both value 2), the kind parameter
for the half-precision C interoperable types.

Assisted-by: AI
DeltaFile
+31-0flang/test/Semantics/bind-c-real2.f90
+5-3flang/test/Semantics/bind-c06.f90
+6-0flang/docs/Extensions.md
+4-1flang/lib/Evaluate/type.cpp
+3-0flang-rt/lib/runtime/iso_c_binding.f90
+49-45 files

LLVM/project 47dec95clang/test/Sema wave-reduce-builtins-validate-amdgpu.cl

Missing SEMA tests
DeltaFile
+26-0clang/test/Sema/wave-reduce-builtins-validate-amdgpu.cl
+26-01 files

LLVM/project 82bfbb4clang/include/clang/Basic BuiltinsAMDGPU.td, clang/lib/CodeGen/TargetBuiltins AMDGPU.cpp

[AMDGPU] Add builtins for wave reduction intrinsics

Assisted by - Claude-sonnet:4.6
DeltaFile
+189-0clang/test/CodeGenOpenCL/builtins-amdgcn.cl
+18-0clang/lib/CodeGen/TargetBuiltins/AMDGPU.cpp
+9-0clang/include/clang/Basic/BuiltinsAMDGPU.td
+216-03 files

LLVM/project e805e69llvm/test/CodeGen/AMDGPU llvm.amdgcn.reduce.xor.ll llvm.amdgcn.reduce.and.ll

Modify test run lines
DeltaFile
+154-74llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.xor.ll
+134-64llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.and.ll
+134-64llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.or.ll
+422-2023 files

LLVM/project 8d89085llvm/lib/Target/AMDGPU SIInstructions.td SIISelLowering.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.reduce.umax.ll llvm.amdgcn.reduce.umin.ll

[AMDGPU] Support Wave Reduction for true-16 types - 1

Supporting true-16 versions of the reduction intrinsics
Supported Ops: `min`, `umin`, `max`, `umax`.
Supports only the iterative stratergy, DPP is yet
to be supported.
DeltaFile
+162-53llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.umax.ll
+134-64llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.umin.ll
+63-29llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.min.ll
+63-28llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.max.ll
+2-1llvm/lib/Target/AMDGPU/SIInstructions.td
+0-1llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+424-1766 files

LLVM/project b73c52dllvm/lib/Target/AMDGPU SIISelLowering.cpp AMDGPULegalizerInfo.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.reduce.xor.ll llvm.amdgcn.reduce.or.ll

Promote at legalization
DeltaFile
+32-25llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.xor.ll
+25-18llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.or.ll
+25-18llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.and.ll
+4-4llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+4-1llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+90-665 files

LLVM/project 12752a5llvm/test/CodeGen/AMDGPU llvm.amdgcn.reduce.and.ll llvm.amdgcn.reduce.or.ll

Drop unsed test prefixes
DeltaFile
+16-21llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.and.ll
+16-21llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.or.ll
+16-21llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.xor.ll
+48-633 files

LLVM/project b785676llvm/lib/Target/AMDGPU SIISelLowering.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.reduce.sub.ll llvm.amdgcn.reduce.add.ll

[AMDGPU] Support Wave Reduction for i16 types - 2

Supported Ops: `add`, `sub`.
Supports only the iterative stratergy, DPP is yet
to be supported.
Supports only Fake-16 versions of the lowering.
True-16 support is yet to be added.
DeltaFile
+642-177llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.sub.ll
+621-173llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.add.ll
+2-0llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+1,265-3503 files

LLVM/project 8489f0ellvm/lib/Target/AMDGPU SIISelLowering.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.reduce.xor.ll llvm.amdgcn.reduce.or.ll

[AMDGPU] Support Wave Reduction for i16 types - 3

Supported Ops: `and`, `or`, `xor`.
Supports only the iterative stratergy, DPP is yet
to be supported.
Supports only Fake-16 versions of the lowering.
True-16 support is yet to be added.
DeltaFile
+591-160llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.xor.ll
+491-136llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.or.ll
+491-136llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.and.ll
+8-1llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+1,581-4334 files

LLVM/project fad9d9fllvm/test/CodeGen/AMDGPU llvm.amdgcn.reduce.sub.ll llvm.amdgcn.reduce.add.ll

[AMDGPU] Support Wave Reduction for true-16 types - 2

Supporting true-16 versions of the reduction intrinsics
Supported Ops: `add`, `sub`.
Supports only the iterative stratergy, DPP is yet
to be supported.
DeltaFile
+87-39llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.sub.ll
+79-35llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.add.ll
+166-742 files

LLVM/project bb10e7dllvm/lib/Target/AMDGPU SIISelLowering.cpp AMDGPULegalizerInfo.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.reduce.sub.ll llvm.amdgcn.reduce.add.ll

Promote at legalization
DeltaFile
+24-16llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.sub.ll
+24-15llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.add.ll
+6-4llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+6-2llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+60-374 files

LLVM/project 591e6bfllvm/lib/Target/AMDGPU SIInstructions.td, llvm/test/CodeGen/AMDGPU llvm.amdgcn.reduce.min.ll

Use `REG_SEQUENCE` instead of `COPY`
Use SALU opcodes for all reductions
DeltaFile
+1-2llvm/lib/Target/AMDGPU/SIInstructions.td
+1-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.min.ll
+2-22 files

LLVM/project 9922f55llvm/lib/Target/AMDGPU SIISelLowering.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.reduce.or.ll llvm.amdgcn.reduce.and.ll

Use only SALU opcodes
DeltaFile
+13-13llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.or.ll
+13-13llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.and.ll
+13-13llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.xor.ll
+1-5llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+40-444 files

LLVM/project d1006c4llvm/lib/Target/AMDGPU SIISelLowering.cpp

Move variable decl to inner if-statement.
DeltaFile
+2-2llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+2-21 files

LLVM/project e20ad8bclang/docs ReleaseNotes.rst

Remove unrelated whitespace changes in clang/docs/ReleaseNotes.rst

Created using spr 1.3.7
DeltaFile
+6-6clang/docs/ReleaseNotes.rst
+6-61 files

LLVM/project 60dd90flldb/test/API/functionalities/postmortem/elf-core TestLinuxCore.py linux-aarch64-neon.core

[lldb][test] Remove home dir paths from core files used in tests (#201630)

Most of our core files contain paths to the source files that were used
to generate the core file. LLDB probes the existence of these source
files when it sees them in the core file, which on its own is not
problematic as that's usually quite cheap.

Unfortunately, the paths used in most core file tests are in the form of
/home/XYZ/test.c which does not exist on macOS. On some macOS machines
with network drives, these file accesses cause the kernel to perform
some kind of network request which is extremely slow.

The result is that the tests that inspect these core files run extremely
slow on macOS. For example, the TestNetBSDCore.py and TestLinuxCore.py
tests spend 95% of their runtime just probing these network paths. In
the case of TestLinuxCore.py, this causes the test to run for about 1
minute where only 3.7s are actual test logic.

This patch removes all /home/* paths from our core files and replaces

    [2 lines not shown]
DeltaFile
+2-4lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py
+0-0lldb/test/API/functionalities/postmortem/elf-core/linux-aarch64-neon.core
+0-0lldb/test/API/functionalities/postmortem/elf-core/linux-aarch64-pac.core
+0-0lldb/test/API/functionalities/postmortem/elf-core/linux-aarch64-pac.out
+0-0lldb/test/API/functionalities/postmortem/elf-core/linux-aarch64-sve-fpsimd.core
+0-0lldb/test/API/functionalities/postmortem/elf-core/linux-aarch64-sve-full.core
+2-423 files not shown
+2-429 files

LLVM/project ef7ef36lldb/test/API/python_api/global_module_cache TestGlobalModuleCache.py two-print.c

[lldb][test] Speed up TestGlobalModuleCache.py (#201561)

This patch reduces the runtime of TestGlobalModuleCache from 27s to
3-4s. There are three reasons for why the old test was slow:

* We did a sleep for 2s to ensure the source code file had a newer time
stamp and Make would rebuild the project. Instead, we now just age all
times on disk by 10s into the past to do the same thing. I'm not sure
how many other tests need to do this, but introducing a utility method
for forced in-place rebuild would be a good follow up.

* We additionally slept even for the first initial build, which wasn't
needed as there is nothing to rebuild.

* I removed some of the system includes in the source files which are
also not needed.
DeltaFile
+23-29lldb/test/API/python_api/global_module_cache/TestGlobalModuleCache.py
+2-6lldb/test/API/python_api/global_module_cache/two-print.c
+2-5lldb/test/API/python_api/global_module_cache/one-print.c
+27-403 files

LLVM/project e9f292clldb/packages/Python/lldbsuite/test dotest_args.py dotest.py, lldb/test/API lit.cfg.py

[lldb][test] Don't print LLDB version in every test (#201307)

An empty minimal API test currently runs for 330ms on my macOS system.
Of these 330ms, we spend 70ms (20%) just to print the lldb version
number at the start of each test.

This patch disables this behavior by default and instead prints the LLDB
version number once at the start of the LIT test suite. This saves about
2 minutes of CPU time in an LLDB test suite run.
DeltaFile
+12-0lldb/test/API/lit.cfg.py
+6-0lldb/packages/Python/lldbsuite/test/dotest_args.py
+5-1lldb/packages/Python/lldbsuite/test/dotest.py
+3-0lldb/packages/Python/lldbsuite/test/configuration.py
+26-14 files

LLVM/project 786c67flldb/include/lldb/Core Mangled.h AddressRange.h, lldb/include/lldb/Symbol LineTable.h

[lldb] Add size checks for frequently allocated classes (#200939)

Given how frequently we allocate these classes (or classes containing
these classes) on the heap, we should only grow them intentionally.

See also bd1b3d47462acf4f854f593bdd77b3f127adea46
DeltaFile
+4-0lldb/include/lldb/Symbol/LineTable.h
+3-0lldb/include/lldb/Core/Mangled.h
+2-0lldb/include/lldb/Core/AddressRange.h
+2-0lldb/include/lldb/Core/Address.h
+2-0lldb/include/lldb/Utility/ConstString.h
+13-05 files

LLVM/project d5fe431lldb/test/API/tools/lldb-dap/breakpoint TestDAP_breakpointLocations.py

[lldb][test] Don't hardcode line numbers in DAP_breakpointLocations (#201820)

Otherwise the test needs to be adjusted for every minor format change.
DeltaFile
+7-7lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_breakpointLocations.py
+7-71 files

LLVM/project c563635lldb/test/API lit.cfg.py, lldb/test/API/macosx/simulator lit.local.cfg

[lldb][test] Don't run simulator tests in parallel to stabilize them (#201870)

TestSimulatorPlatform is a notoriously flaky test on macOS. However, it
seems the test failures only happen when its exectuion overlaps with the
execution of TestAppleSimulatorOSType.py (which also interacts with the
simulator). Somehow one simulator test seems to break the other one, but
it's not exactly clear how they are inteferring with each other.

This patch ensures these two tests never run in parallel to avoid these
kind of issues. It creates a parallelism_group in lit for
apple-simulator and then puts both tests into that group.

TestAppleSimulatorOSType.py had to be moved to its own directory for
this. It shared its directory with a a lot of other unrelated tests and
the lit config applies to the whole directory.
DeltaFile
+125-0lldb/test/API/tools/lldb-server/apple-simulator/TestAppleSimulatorOSType.py
+0-125lldb/test/API/tools/lldb-server/TestAppleSimulatorOSType.py
+19-0lldb/test/API/tools/lldb-server/apple-simulator/main.cpp
+5-0lldb/test/API/tools/lldb-server/apple-simulator/Makefile
+4-0lldb/test/API/lit.cfg.py
+1-0lldb/test/API/macosx/simulator/lit.local.cfg
+154-1251 files not shown
+155-1257 files

LLVM/project 70447b4offload/test/ompt callbacks.h register_no_device_init.h

[NFC][OMPT] Use `unique_id` entry point for tests (#202228)

The OMPT tests currently use an incrementing ID for the host_op_id.
However, this value is not incremented for `submit_emi` callbacks, and
uses a global integer that is incremented on callback invocation. This
can lead to race conditions when e.g., `target nowait` is used.

Hence, replace the global integer by the `unique_id` entry point,
properly yielding unique and thread-safe IDs.

Signed-off-by: Jan André Reuter <j.reuter at fz-juelich.de>
DeltaFile
+7-4offload/test/ompt/callbacks.h
+5-0offload/test/ompt/register_no_device_init.h
+5-0offload/test/ompt/register_non_emi.h
+5-0offload/test/ompt/register_non_emi_map.h
+5-0offload/test/ompt/register_wrong_return.h
+5-0offload/test/ompt/register_both.h
+32-42 files not shown
+42-48 files

LLVM/project bc0e3f6llvm/utils/lit/lit/llvm decorate.py, llvm/utils/lit/tests narrow-and-decorate.py decorate.py

[lit] Add lit.llvm.decorate: --param decorate=PROG prepends PROG to a pipeline stage
DeltaFile
+41-0llvm/utils/lit/tests/narrow-and-decorate.py
+30-0llvm/utils/lit/lit/llvm/decorate.py
+30-0llvm/utils/lit/tests/decorate.py
+21-0llvm/utils/lit/tests/Inputs/narrow-and-decorate/sample.ll
+16-0llvm/utils/lit/tests/Inputs/narrow-and-decorate/lit.cfg
+10-0llvm/utils/lit/tests/Inputs/decorate/lit.cfg
+148-02 files not shown
+156-08 files

LLVM/project 891bc3fllvm/lib/Target/AMDGPU AMDGPURegBankLegalizeRules.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.cvt.scalef32.pk.gfx950.ll llvm.amdgcn.cvt.scale.pk.ll

AMDGPU/GlobalISel: RegBankLegalize rules for cvt_scale intrinsics
DeltaFile
+470-89llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.scalef32.pk.gfx950.ll
+425-3llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.scale.pk.ll
+214-0llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+161-9llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.scalef32.pk.ll
+163-1llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.scalef32.pk8.ll
+163-1llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.scalef32.sr.pk.gfx1250.ll
+1,596-1034 files not shown
+1,928-10610 files