LLVM/project ad021b6.ci/green-dragon lldb-windows.groovy

[lldb][Windows][CI] refine timeouts (#206942)

Add/refine timeouts on each step of the lldb on Windows CI script. This
should help avoid runaway builds which timeout after 24h.
DeltaFile
+17-9.ci/green-dragon/lldb-windows.groovy
+17-91 files

LLVM/project 41f1d13clang/lib/CIR/Dialect/Transforms HoistAllocas.cpp, clang/test/CIR/CodeGenOpenMP omp-llvmir.c

[CIR][OpenMP] Prevent HoistAllocas pass from hoisting above OpenMP regions (#206168)

This patch modifies the HoistAllocas pass to prevent it from hoisting
allocas outside OpenMP regions, since this may break isolated from above
requirements and affect privatization semantics.

Assisted-by: Cursor / claude-4.8-opus-medium
DeltaFile
+85-0clang/test/CIR/Transforms/hoist-allocas.cir
+15-19clang/test/CIR/CodeGenOpenMP/omp-llvmir.c
+26-4clang/lib/CIR/Dialect/Transforms/HoistAllocas.cpp
+126-233 files

LLVM/project eff826emlir/lib/Dialect/Vector/Transforms LowerVectorBroadcast.cpp, mlir/test/Conversion/VectorToLLVM vector-to-llvm.mlir

[MLIR][Vector] Generalize broadcast lowering for single-element vector to nD (#206501)
DeltaFile
+36-0mlir/test/Dialect/Vector/vector-broadcast-lowering-transforms.mlir
+11-12mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
+2-3mlir/lib/Dialect/Vector/Transforms/LowerVectorBroadcast.cpp
+49-153 files

LLVM/project 0c2d34dflang/lib/Optimizer/Transforms CMakeLists.txt, mlir/include/mlir/Dialect/LLVMIR/Transforms InlinerInterfaceImpl.h

Reland "[mlir][nvvm] extract NVVM inliner interface from LLVM dialect" with flang fixes (#206782)
DeltaFile
+11-0mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
+0-7mlir/lib/Dialect/LLVMIR/Transforms/InlinerInterfaceImpl.cpp
+0-6mlir/include/mlir/Dialect/LLVMIR/Transforms/InlinerInterfaceImpl.h
+1-1utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+1-0flang/lib/Optimizer/Transforms/CMakeLists.txt
+0-1mlir/lib/Dialect/LLVMIR/Transforms/CMakeLists.txt
+13-151 files not shown
+13-167 files

LLVM/project ac9a204lldb/source/Plugins/SymbolFile/DWARF SymbolFileWasm.cpp SymbolFileWasm.h, lldb/test/API/functionalities/breakpoint/cpp TestCPPBreakpointLocations.py

[lldb] Recover mangled symbol names from DWARF on WebAssembly (#206832)

The Wasm "name" section stores only demangled names, so the symbols
ObjectFileWasm builds from it have no mangled name. Without one, the
symbol table indexes neither the mangled name nor the C++ base and
method name variants derived from it, so looking up a symbol by mangled
name fails and breakpoints set by a template or operator name find no
locations.

Override SymbolFileWasm::AddSymbols to copy each function's mangled name
from its DWARF DW_AT_linkage_name onto the matching symbol, matched by
file address. This is confined to the Wasm symbol file, so other targets
are unaffected.
DeltaFile
+40-0lldb/source/Plugins/SymbolFile/DWARF/SymbolFileWasm.cpp
+5-0lldb/source/Plugins/SymbolFile/DWARF/SymbolFileWasm.h
+3-0lldb/test/API/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py
+48-03 files

LLVM/project 0c69421lldb/packages/Python/lldbsuite/test/tools/lldb_dap dap_types.py session_helpers.py, lldb/test/API/tools/lldb-dap/utils TestDAPUtils_Types.py

[lldb-dap] Add a new lldb-dap test infrastructure (#203978)

Introduce a new test infrastructure under lldbsuite/test/tools/lldb_dap
that replaces the dict-based dap_server. Initially the new and legacy
version will live side by side.
Once all tests are ported, the legacy version will be removed. The new
infrastructure has four files:
- dap_types.py: DAP protocol messages as frozen dataclasses, plus
serializer/deserializer functions to and from JSON.
- utils.py: Helper classes for launching and managing lldb-dap process
and its connection.
- session.py: DAP session layer. Owns the per-session state.
- session_helpers.py: Higher-level helpers for writing tests.

Using dataclasses for protocol types lets us catch unexpected or missing
fields at deserialization time instead of at use-site.

Adds a new environment flag, LLDBDAP_RUN_AS_SERVER, that runs the test
suite against lldb-dap in server mode for test cases with

    [10 lines not shown]
DeltaFile
+2,026-0lldb/packages/Python/lldbsuite/test/tools/lldb_dap/dap_types.py
+1,698-0lldb/packages/Python/lldbsuite/test/tools/lldb_dap/session_helpers.py
+847-0lldb/packages/Python/lldbsuite/test/tools/lldb_dap/utils.py
+492-0lldb/packages/Python/lldbsuite/test/tools/lldb_dap/session.py
+452-0lldb/test/API/tools/lldb-dap/utils/TestDAPUtils_Types.py
+209-0lldb/packages/Python/lldbsuite/test/tools/lldb_dap/lldb_dap_testcase.py
+5,724-02 files not shown
+5,738-78 files

LLVM/project fc5798ellvm/lib/Analysis ScalarEvolution.cpp, llvm/test/Analysis/ScalarEvolution add-like-or.ll

[SCEV] Cancel common addend/multiplier in SimplifyICmpOperands (#205014)

Simplify:
```
  (K + A) pred (K + B)  ->  A pred B
  (C * A) pred (C * B)  ->  A pred B
```

when no-wrap flags allow it: NSW for signed predicates, NUW for
unsigned. Also requires C > 0 for signed in the multiplication case.

For equality comparisons, `(K + A) eq/ne (K + B)` simplifies to `A eq/ne
B` without requiring any no-wrap flags.

Alive2 proofs: https://alive2.llvm.org/ce/z/KmyqsD
DeltaFile
+121-0llvm/unittests/Analysis/ScalarEvolutionTest.cpp
+46-0llvm/lib/Analysis/ScalarEvolution.cpp
+30-3llvm/test/Transforms/LoopUnroll/X86/high-cost-expansion.ll
+4-4llvm/test/Analysis/ScalarEvolution/add-like-or.ll
+201-74 files

LLVM/project 5f282celibcxx/include wchar.h

[libc++] Assume that <wchar.h> in llvm-libc has const-overloads. (#206805)

See discussion in https://github.com/llvm/llvm-project/pull/201236 -
we're close to enabling wide characters in libc++ when it's built on top
of llvm-libc.

llvm-libc headers use `const wchar_t*` return type for selected wchar
functions, so we need to configure libc++ to assume that const-overloads
for these functions are available in this case, and the implementations
in libc++ wrapper around `<wchar.h>` are not needed.
DeltaFile
+2-0libcxx/include/wchar.h
+2-01 files

LLVM/project 3b0c457libc/shared builtins.h, libc/shared/builtins divdf3.h

[libc] add shared divdf3 builtin (#205675)

Re-exposes LLVM-libc's `__divdf3` as `shared::divdf3` for reuse by
compiler-rt's builtins.

Stacked change - merge these first:
- #200094
- #205669
- #205670
- #205671
- #205672
- #205673
- #205674

Part of #197824
DeltaFile
+32-0libc/src/__support/builtins/divdf3.h
+29-0libc/shared/builtins/divdf3.h
+9-0libc/src/__support/builtins/CMakeLists.txt
+1-0libc/test/shared/CMakeLists.txt
+1-0libc/shared/builtins.h
+1-0libc/test/shared/shared_builtins_test.cpp
+73-06 files

LLVM/project 8a3b715llvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 combine-fcmp-uno-self.ll bitcast-vector-bool.ll

[X86] Fold FP UNORD/ORD compare against known-non-NaN to self-compare (#206943)

Replace a known-non-NaN operand of an UNORD/ORD FP compare with the
other operand, so we emit `cmpp a, a` instead of materializing the
constant with `vxorpd`. Matches GCC.

Added combine-fcmp-uno-self.ll which covers the folding and a negative
case.

Fixes #202756
DeltaFile
+83-0llvm/test/CodeGen/X86/combine-fcmp-uno-self.ll
+11-15llvm/test/CodeGen/X86/bitcast-vector-bool.ll
+6-0llvm/lib/Target/X86/X86ISelLowering.cpp
+100-153 files

LLVM/project 4ddf664mlir/lib/ABI ABITypeMapper.cpp, mlir/unittests/ABI ABITypeMapperTest.cpp

[mlir][ABI] Fix scalable vector mapping in ABITypeMapper (#206617)

mapVectorType in ABITypeMapper incorrectly used ElementCount::getFixed
for all vector types, including scalable ones (e.g. vector<[4]xf32>).
This results in scalable vectors being mapped as fixed-size vectors,
which produces incorrect ABI lowering for SVE and RISC-V V targets.
DeltaFile
+30-0mlir/unittests/ABI/ABITypeMapperTest.cpp
+8-1mlir/lib/ABI/ABITypeMapper.cpp
+38-12 files

LLVM/project bb6868alibcxx/include/__memory temporary_buffer.h, libcxx/test/std/utilities/memory/temporary.buffer temporary_buffer.pass.cpp overaligned.pass.cpp

[libc++] Fix behavior for `get_temporary_buffer` with non-positive size (#206871)

Per C++17 [depr.temporary.buffer]/4, `get_temporary_buffer` is required
to return `{nullptr, 0}` when the size argument is zero or negative.
libc++ used to correctly handle this, but the refactoring in
94e7c0b051c79fd56205f115771980f2e7812306 got this wrong.

GCC generally warns on negative size due to `-Walloc-size-larger-than=`,
which is false positive due to incomplete control flow analysis. The
warning is coupled with optimizations, and this patch make tests
suppress it instead.
DeltaFile
+30-0libcxx/test/std/utilities/memory/temporary.buffer/temporary_buffer.pass.cpp
+21-0libcxx/test/std/utilities/memory/temporary.buffer/overaligned.pass.cpp
+3-0libcxx/include/__memory/temporary_buffer.h
+54-03 files

LLVM/project 525f5a1clang/lib/Driver/ToolChains Clang.cpp, clang/test/Driver hip-toolchain-no-rdc.hip

Revert "[HIP][AMDGPU] Use non-LTO pipeline for non-RDC in the linker wrapper (#201135)" (#206961)

I believe I fixed the immediate issues that were causing regressions
with this, and now this is leading to its own regressions in building
Pytorch apparently. This was explicitly marked as a hack, and this
should resolve an ongoing issue so we should revert this for now.

Should fix LCOMPILER-2396

This reverts commit eaff67c9838f98d221aa563c9e5d4e714d636674.
DeltaFile
+0-23clang/test/OffloadTools/clang-linker-wrapper/linker-wrapper-hip-no-rdc-amdgcnspirv.c
+0-17clang/test/Driver/hip-toolchain-no-rdc.hip
+0-13clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
+0-13clang/lib/Driver/ToolChains/Clang.cpp
+0-12clang/test/OffloadTools/clang-linker-wrapper/linker-wrapper-hip-no-rdc.c
+0-3clang/tools/clang-linker-wrapper/LinkerWrapperOpts.td
+0-816 files

LLVM/project b54d6aflibc/config/darwin/aarch64 entrypoints.txt, libc/config/darwin/x86_64 entrypoints.txt

Protect overlap check against overflow and add some missing entrypoints
DeltaFile
+4-3libc/src/string/strcpy_s.cpp
+1-0libc/config/darwin/aarch64/entrypoints.txt
+1-0libc/config/darwin/x86_64/entrypoints.txt
+6-33 files

LLVM/project c9ae130offload/test/ompt get_num_devices.c, openmp/runtime/src ompt-general.cpp

[OpenMP][OMPT] Map `ompt_get_num_devices` to runtime function (#200790)

Since 82e94a593433f36734e2d34898d353a2ecb65b8b, `ompt_get_num_devices`
was hard coded to always provide a return value of `1`, regardless of
the actual number of devices. Tools relying on this return value were
henced forced to use other approaches to estimate the number of
available devices.

To improve the situtation, map the returned value to the one provided by
`omp_get_num_devices()`. This does not resolve the issue completely
though. When OMPT is initialized through `libomptarget.so`, the
PluginManager, providing the number of devices, is not initialized until
after OMPT has been fully set up. This means that tools, trying to
retrieve the number of devices during the _initialize_ callback, will
still receive the incorrect number of devices.

Still, this is a significant improvement compared to the prior state
which provided an incorrect result for most of the program runtime.


    [4 lines not shown]
DeltaFile
+57-0offload/test/ompt/get_num_devices.c
+3-1openmp/runtime/src/ompt-general.cpp
+60-12 files

LLVM/project 41f826fcross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerControllers ScriptDebuggerController.py, cross-project-tests/debuginfo-tests/dexter/dex/evaluation StateMatch.py ExpectRewriter.py

[Dexter] Add condition check to state nodes (#203847)

This patch enables the ability for state nodes to check conditions,
meaning they will be active only if the condition is met.

Condition evaluation is somewhat language specific; we directly check
whether the value of the evaluated expression is "true"
(case-insensitive), which works for the languages we actually use Dexter
with, but may require generalizing in future.

We also cache conditions as they are evaluated; each time we step, we
clear all cached conditions for the current frame and any expired
frames, but we keep the cached conditions for any frames rootwards from
the current frame; this prevents us from unexpectedly exiting out of a
callee frame because of debug info not surviving a stack unwind; if the
early exit is desired, an !and{at_frame_idx, condition} under the lower
frame may suffice.
DeltaFile
+55-10cross-project-tests/debuginfo-tests/dexter/dex/evaluation/StateMatch.py
+54-0cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/conditions.cpp
+18-1cross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerControllers/ScriptDebuggerController.py
+7-3cross-project-tests/debuginfo-tests/dexter/dex/evaluation/ExpectRewriter.py
+6-1cross-project-tests/debuginfo-tests/dexter/dex/evaluation/RunMatch.py
+1-1cross-project-tests/debuginfo-tests/dexter/dex/test_script/Nodes.py
+141-166 files

LLVM/project 6087989llvm/lib/Target/AMDGPU/Disassembler AMDGPUDisassembler.cpp

[NFC][AMDGPU] Use SIInstrFlags predicates in Disassembler (#206762)

Replace raw TSFlags accesses with SIInstrFlags predicate calls in
AMDGPUDisassembler.

Part of a series following the introduction of SIInstrFlags predicates.
DeltaFile
+25-33llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
+25-331 files

LLVM/project 517e48dlldb/include/lldb/Utility Log.h, lldb/source/Commands CommandObjectLog.cpp

[lldb] Return llvm::Error from EnableLogChannel (#206479)

Instead of a boolean plus writing errors to a stream.

llvm::Error is either success or an error message, unlike
before where we could (and did sometimes) succeed but 
also have an error message.

We can do this for DisableLogChannel too but 
I'll do that in a follow up.
DeltaFile
+64-54lldb/unittests/Utility/LogTest.cpp
+38-33lldb/source/Utility/Log.cpp
+12-12lldb/source/Core/Debugger.cpp
+9-10lldb/source/Commands/CommandObjectLog.cpp
+6-7lldb/include/lldb/Utility/Log.h
+6-7lldb/tools/lldb-server/LLDBServerUtilities.cpp
+135-1234 files not shown
+150-13510 files

LLVM/project 202ed9across-project-tests/debuginfo-tests/dexter/dex/test_script Nodes.py, cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts floats.cpp

Address review comments: extend docs, add test comment
DeltaFile
+7-7cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/floats.cpp
+2-1cross-project-tests/debuginfo-tests/dexter/dex/test_script/Nodes.py
+9-82 files

LLVM/project 20e2baacross-project-tests/debuginfo-tests/dexter/dex/evaluation ExpectMatch.py, cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/evaluation eval_sublist_aggregates.cpp eval_sublist_aggregates_addresses.cpp

[Dexter] Allow matching lists of values for aggregate members

This patch slightly extends the matching of aggregate members to allow for
lists of expected values for individual members, functioning the same as
lists of expected values for scalar values.
DeltaFile
+136-0cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/evaluation/eval_sublist_aggregates.cpp
+54-0cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/evaluation/eval_sublist_aggregates_addresses.cpp
+8-4cross-project-tests/debuginfo-tests/dexter/dex/evaluation/ExpectMatch.py
+198-43 files

LLVM/project 2a489e5cross-project-tests/debuginfo-tests/dexter-tests optnone-vectors-and-functions.cpp optnone-simple-functions.cpp, cross-project-tests/debuginfo-tests/dexter-tests/memvars inlining-dse.c

[Dexter] Update lldb-based dexter-tests to use script-mode

This patch replaces uses of heuristic-mode Dexter in the dexter-tests suite
with uses of the script-mode, for tests that use DAP (via lldb-dap). The
updates are largely straightforward but occasionally non-trivial, and in
some cases some slight modifications have been made to keep the "spirit" of
the test intact.
DeltaFile
+93-73cross-project-tests/debuginfo-tests/dexter-tests/optnone-vectors-and-functions.cpp
+98-51cross-project-tests/debuginfo-tests/dexter-tests/optnone-simple-functions.cpp
+68-54cross-project-tests/debuginfo-tests/dexter-tests/optnone-loops.cpp
+57-33cross-project-tests/debuginfo-tests/dexter-tests/optnone-fastmath.cpp
+30-19cross-project-tests/debuginfo-tests/dexter-tests/optnone-struct-and-methods.cpp
+19-22cross-project-tests/debuginfo-tests/dexter-tests/memvars/inlining-dse.c
+365-25221 files not shown
+669-39227 files

LLVM/project 4663ef9cross-project-tests/debuginfo-tests/dexter Script.md

order->at_least
DeltaFile
+1-1cross-project-tests/debuginfo-tests/dexter/Script.md
+1-11 files

LLVM/project fda5145cross-project-tests/debuginfo-tests/dexter/dex/evaluation ExpectMatch.py, cross-project-tests/debuginfo-tests/dexter/dex/test_script Nodes.py

[Dexter] Add ability to check float values within a range

Adds a new node type, !float, which can be used to match debugger ouptut as
float values rather than as strings, optionally allowing a range to be
specified for inexact matches. This new node allows a list of values to be
given, effectively a shorthand for a list of individual !float nodes.
DeltaFile
+109-1cross-project-tests/debuginfo-tests/dexter/dex/test_script/Nodes.py
+68-0cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/floats.cpp
+12-1cross-project-tests/debuginfo-tests/dexter/dex/evaluation/ExpectMatch.py
+189-23 files

LLVM/project 0e89ca4cross-project-tests/debuginfo-tests/dexter Script.md, cross-project-tests/debuginfo-tests/dexter-tests global-constant.cpp

review comments
DeltaFile
+2-1cross-project-tests/debuginfo-tests/dexter-tests/global-constant.cpp
+2-0cross-project-tests/debuginfo-tests/dexter/Script.md
+4-12 files

LLVM/project 3b60f1across-project-tests/debuginfo-tests/dexter/dex/evaluation Metrics.py

Add irretrievable metric
DeltaFile
+5-0cross-project-tests/debuginfo-tests/dexter/dex/evaluation/Metrics.py
+5-01 files

LLVM/project 4c211b6cross-project-tests/debuginfo-tests/dexter README.md Heuristic.md

[Dexter] Document the structured script model

This patch adds documentation for the script model to the Dexter README,
shunting heuristic-mode information into a separate doc, creating a new
doc for script-mode, and linking to both (with a brief summary of the
differences) from the base README.
DeltaFile
+6-232cross-project-tests/debuginfo-tests/dexter/README.md
+231-0cross-project-tests/debuginfo-tests/dexter/Heuristic.md
+213-0cross-project-tests/debuginfo-tests/dexter/Script.md
+450-2323 files

LLVM/project 0ce428ecross-project-tests/debuginfo-tests/dexter/dex/test_script Nodes.py

Add docstring for type (and value)
DeltaFile
+16-0cross-project-tests/debuginfo-tests/dexter/dex/test_script/Nodes.py
+16-01 files

LLVM/project 5a7bafdcross-project-tests/debuginfo-tests/dexter-tests optnone-struct-and-methods.cpp optnone-vectors-and-functions.cpp, cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio VisualStudio.py

[Dexter] Switch to using script-mode by default

This patch changes the default mode of Dexter from heuristic-mode to
script-mode. The --use-script argument is replaced with --use-heuristic,
some comments/docs/error messages are updated accordingly, and tests have
their flags switched accordingly.
DeltaFile
+2-6cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio.py
+3-4cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/view.cpp
+3-3cross-project-tests/debuginfo-tests/dexter/dex/tools/test/Tool.py
+2-2cross-project-tests/debuginfo-tests/dexter-tests/optnone-struct-and-methods.cpp
+2-2cross-project-tests/debuginfo-tests/dexter-tests/optnone-vectors-and-functions.cpp
+2-2cross-project-tests/debuginfo-tests/dexter-tests/optnone-simple-functions.cpp
+14-19168 files not shown
+188-208174 files

LLVM/project fd57ddacross-project-tests/debuginfo-tests/dexter/dex/debugger/lldb LLDB.py

Remove all tags that LLDB may add
DeltaFile
+5-2cross-project-tests/debuginfo-tests/dexter/dex/debugger/lldb/LLDB.py
+5-21 files

LLVM/project 066d459cross-project-tests/debuginfo-tests/dexter/dex/debugger/lldb LLDB.py

Fix: Account for weird function name endings in lldb-dap
DeltaFile
+5-0cross-project-tests/debuginfo-tests/dexter/dex/debugger/lldb/LLDB.py
+5-01 files