LLVM/project 3b70638clang/include/clang/AST DeclTemplate.h, clang/lib/AST DeclTemplate.cpp ASTContext.cpp

[clang] NFC: add asserts enforcing template parameters have valid positions

Some tests are violating these assertions, so they are commented out.

Most of these are alias CTAD tests, with a couple of lambda in concepts tests on
top of that.

For the test in `clang/test/SemaTemplate/concepts.cpp`, that was broken by #195995
and needs a partial revert at least.
DeltaFile
+134-23clang/lib/Sema/SemaTemplateDeductionGuide.cpp
+65-60clang/test/SemaTemplate/deduction-guide.cpp
+25-34clang/include/clang/AST/DeclTemplate.h
+14-15clang/lib/AST/DeclTemplate.cpp
+8-5clang/test/AST/ast-dump-ctad-alias.cpp
+6-3clang/lib/AST/ASTContext.cpp
+252-1406 files not shown
+274-14912 files

LLVM/project 36ce871llvm/include/llvm/Transforms/IPO Instrumentor.h, llvm/lib/Transforms/IPO Instrumentor.cpp

[Instrumentor] Add support for modules and globals

We can emit callbacks when a module is loaded/unloaded and before
globals are initialized. Both happens in newly introduced constructors
and destructors.
DeltaFile
+316-0llvm/lib/Transforms/IPO/Instrumentor.cpp
+93-0llvm/include/llvm/Transforms/IPO/Instrumentor.h
+64-0llvm/test/Instrumentation/Instrumentor/module_and_globals.ll
+46-0llvm/test/Instrumentation/Instrumentor/default_config.json
+11-8llvm/test/Instrumentation/Instrumentor/alloca_and_function.ll
+3-3llvm/test/Instrumentation/Instrumentor/unreachable.ll
+533-116 files

LLVM/project 940242ellvm/test/tools/llvm-cov directory_coverage.linux.test directory_coverage.test, llvm/test/tools/llvm-objdump/X86 source-interleave-prefix-windows.test

[Windows][test] Fix "LLVM" test failures when LLVM_WINDOWS_PREFER_FORWARD_SLASH is ON (#184556)

This patch fixes several LLVM test failures on Windows that occur when
the LLVM_WINDOWS_PREFER_FORWARD_SLASH CMake option is enabled.

The failures were caused by tests either hardcoding backslash
expectations in FileCheck or constructing paths with strict backslashes
in C++ unit tests, both of which break when the environment is
configured to prefer forward slashes.

Specific changes:
- `llvm-cov` lit tests: Changed the path separators with
`-DSEP=%{fs-sep}`.
- `llvm-objdump` lit test: Relaxed
`source-interleave-prefix-windows.test` to accept either forward or
backward slashes using the `{{[/\\]}}` regex. This makes the path
matching resilient to the underlying separator preference without losing
precision.
- CommandLineTest.cpp: Conditionalized the TestRoot variable to use

    [5 lines not shown]
DeltaFile
+0-53llvm/test/tools/llvm-cov/directory_coverage.linux.test
+52-0llvm/test/tools/llvm-cov/directory_coverage.test
+0-44llvm/test/tools/llvm-cov/directory_coverage.win.test
+9-8llvm/test/tools/llvm-cov/native_separators.c
+10-2llvm/test/tools/llvm-objdump/X86/source-interleave-prefix-windows.test
+6-1llvm/unittests/Support/Path.cpp
+77-1081 files not shown
+79-1107 files

LLVM/project ba31b6dllvm/docs Instrumentor.rst, llvm/lib/Transforms/IPO InstrumentorUtils.cpp

[Instrumentor] Add a property filter for static properties

The user can define static filters in the json to limit instrumentation
to opportunities that match the static expression, e.g., is_volatile==1.
The matcher logic is pretty basic for now. Integer comparisons, pointer
null checks, string equalities and startswith are supported.

The commit was prepared with Claude (AI) and modified/tested by me.
DeltaFile
+475-0llvm/lib/Transforms/IPO/InstrumentorUtils.cpp
+153-0llvm/docs/Instrumentor.rst
+114-0llvm/test/Instrumentation/Instrumentor/test_filter_parentheses.ll
+69-0llvm/test/Instrumentation/Instrumentor/test_filter.ll
+58-0llvm/test/Instrumentation/Instrumentor/test_filter_parentheses_config.json
+56-0llvm/test/Instrumentation/Instrumentor/test_filter_config.json
+925-013 files not shown
+1,223-219 files

LLVM/project 1530593llvm/include/llvm/Target Target.td, llvm/test/TableGen aarch64-apple-tuning-features.td

[llvm] Sort the Subtarget feature implies list by name (#197302)
DeltaFile
+11-11llvm/test/TableGen/aarch64-apple-tuning-features.td
+1-1llvm/include/llvm/Target/Target.td
+12-122 files

LLVM/project 18e73eellvm/docs/TableGen ProgRef.rst, llvm/lib/TableGen TGParser.cpp Record.cpp

[llvm] Add a tablegen !sort operator (#197303)

This operator creates a new ``list`` containing the same elements as
*list*
but in sorted order. To determine the order, TableGen binds the variable
*var* to each element and evaluates the *key* expression, which
presumably
refers to *var*. The key must produce a ``string`` or integer value
(``bit``, ``bits``, or ``int``); all keys must be of the same type.
Elements
with equal keys preserve their original relative order, resulting in a
stable
sort.

For example, to sort a list of records by their ``Name`` field::

`  list<Thing> sorted = !sort(t, Things, t.Name);`
DeltaFile
+66-26llvm/lib/TableGen/TGParser.cpp
+71-0llvm/test/TableGen/sort.td
+62-1llvm/lib/TableGen/Record.cpp
+15-0llvm/docs/TableGen/ProgRef.rst
+2-2llvm/lib/TableGen/TGParser.h
+1-0llvm/lib/TableGen/TGLexer.cpp
+217-292 files not shown
+219-298 files

LLVM/project 93bfabbllvm/tools/llvm-offload-binary llvm-offload-binary.cpp

[Offload] Make 'llvm-offload-binary' use multi-binaries (#197456)

Summary:
There's two ways you can put multiple binaries in the section. Either
use the version two multi-binary support or just concatenate them. This
PR changes the llvm-offload-binary tool to use the multi-support rather
than directly concatenating them.

The motivation for this is to save space and make it easier to support
compression in the future. Compression would be a flag in the header and
the compression is only really valuable if it can combine the
architecture variants. ELF section compression is a little spotty but
would be another good solution.
DeltaFile
+8-9llvm/tools/llvm-offload-binary/llvm-offload-binary.cpp
+8-91 files

LLVM/project 5549c1bclang/lib/ScalableStaticAnalysisFramework/Analyses/EntityPointerLevel EntityPointerLevel.cpp

address comments
DeltaFile
+5-4clang/lib/ScalableStaticAnalysisFramework/Analyses/EntityPointerLevel/EntityPointerLevel.cpp
+5-41 files

LLVM/project 0051700llvm/lib/Target/AMDGPU/Disassembler AMDGPUDisassembler.cpp, llvm/test/MC/AMDGPU literals.s

[AMDGPU] Fix disasm roundtrip for forced fp64 literal
DeltaFile
+3-1llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
+1-3llvm/test/MC/AMDGPU/literals.s
+4-42 files

LLVM/project 16a1e05lldb/packages/Python/lldbsuite/test/builders builder.py, lldb/packages/Python/lldbsuite/test/make Makefile.rules

[lldb] Support building test inferiors without debug info (#197002)

Add first class support for building test inferiors without debug info,
instead of having to pass `-g0` in the Makefile or the build dictionary.

```
def test(self):
    self.build(debug_info="none")
```

rdar://164923931
DeltaFile
+4-1lldb/test/API/lang/objcxx/objc-from-cpp-frames-without-debuginfo/TestObjCFromCppFramesWithoutDebugInfo.py
+4-0lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+2-1lldb/test/API/commands/frame/var-dil/basics/NoDebugInfo/TestFrameVarDILNoDebugInfo.py
+0-1lldb/test/API/lang/objcxx/objc-from-cpp-frames-without-debuginfo/Makefile
+0-1lldb/test/API/commands/frame/var-dil/basics/NoDebugInfo/Makefile
+1-0lldb/packages/Python/lldbsuite/test/builders/builder.py
+11-46 files

LLVM/project c5c9fd3llvm/lib/Target/AMDGPU/AsmParser AMDGPUAsmParser.cpp, llvm/test/MC/AMDGPU literals.s

[AMDGPU] Validate forced lit() immediate

Right now it takes validation path of an inline constant if fits
even though it is forced to literal encoding.
DeltaFile
+7-8llvm/test/MC/AMDGPU/literals.s
+7-1llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
+14-92 files

LLVM/project 009fbc9clang/test/Driver clang-sycl-linker-test.cpp, clang/test/Driver/Inputs/SYCL two-kernels.ll

[clang-sycl-linker] Migrate tests from Driver/ to Tooling/ and use LLVM IR input (#197566)

1. Replace the C++ source test that required compiling with %clangxx and
separate Input files with self-contained .ll tests using split-file.

2. Split the test into two files:
- clang-sycl-linker.ll: basic tool behavior (link, dev libs, AOT,
errors)
  - clang-sycl-linker-split-mode.ll: device code split mode handling

Co-Authored-By: Claude
DeltaFile
+0-99clang/test/Driver/clang-sycl-linker-test.cpp
+97-0clang/test/Tooling/clang-sycl-linker.ll
+51-0clang/test/Tooling/clang-sycl-linker-split-mode.ll
+0-23clang/test/Driver/Inputs/SYCL/two-kernels.ll
+148-1224 files

LLVM/project 5208f2eclang/include/clang/AST DeclTemplate.h, clang/lib/AST DeclTemplate.cpp

[clang] NFC: add asserts enforcing template parameters have valid positions

Some tests are violating these assertions, so they are commented out.

Most of these are alias CTAD tests, with a couple of lambda in concepts tests on
top of that.

For the test in `clang/test/SemaTemplate/concepts.cpp`, that was broken by #195995
and needs a partial revert at least.
DeltaFile
+103-97clang/test/SemaTemplate/deduction-guide.cpp
+25-34clang/include/clang/AST/DeclTemplate.h
+14-15clang/lib/AST/DeclTemplate.cpp
+12-6clang/test/SemaCXX/ctad.cpp
+15-1clang/test/SemaCXX/cxx20-ctad-type-alias.cpp
+8-5clang/test/AST/ast-dump-ctad-alias.cpp
+177-1586 files not shown
+202-17012 files

LLVM/project d2a57ecllvm/lib/Target/AMDGPU SIInstrInfo.cpp, llvm/test/MachineVerifier/AMDGPU lit64.mir

[AMDGPU] Add lit64 machine verifier (#196457)
DeltaFile
+13-4llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+9-0llvm/test/MachineVerifier/AMDGPU/lit64.mir
+22-42 files

LLVM/project 8ebd857clang/lib/Format ContinuationIndenter.cpp

[clang-format][NFC] Correct comment (#197592)
DeltaFile
+1-1clang/lib/Format/ContinuationIndenter.cpp
+1-11 files

LLVM/project c5f8414compiler-rt/lib/scudo/standalone/tests flags_test.cpp

[scudo] Add test for initFlags()

Add a test case to verify that initFlags() correctly reads the
SCUDO_ALLOCATION_RING_BUFFER_SIZE environment variable and updates the
corresponding flag. This increases line coverage for flags.cpp to 100%.
DeltaFile
+13-0compiler-rt/lib/scudo/standalone/tests/flags_test.cpp
+13-01 files

LLVM/project 37c5916bolt/include/bolt/Profile DataAggregator.h, bolt/lib/Profile DataAggregator.cpp

[BOLT][NFCI] Drop CFG profile attachment in DataAggregator (#195986)
DeltaFile
+14-57bolt/lib/Profile/DataAggregator.cpp
+1-13bolt/include/bolt/Profile/DataAggregator.h
+15-702 files

LLVM/project fe787a8utils/bazel/llvm-project-overlay/lldb/source/Plugins BUILD.bazel

[Bazel] Fixes 882d025 (#197593)

This fixes 882d0251d44fa2db8dd6e5817a8baa72237f77c7.

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+1-0utils/bazel/llvm-project-overlay/lldb/source/Plugins/BUILD.bazel
+1-01 files

LLVM/project aabf2aallvm/lib/Target/RISCV RISCVTargetTransformInfo.cpp, llvm/lib/Transforms/Vectorize LoopVectorizationPlanner.cpp

[LV] moved call site to new location in VFSelectionContext::computeFeasibleMaxVF after a recent change
DeltaFile
+5-14llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
+12-3llvm/test/Transforms/LoopVectorize/RISCV/reg-usage-maxbandwidth.ll
+6-0llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.cpp
+1-1llvm/test/Transforms/LoopVectorize/RISCV/reg-usage.ll
+1-1llvm/test/Transforms/LoopVectorize/RISCV/lmul.ll
+25-195 files

LLVM/project ccc9038clang/lib/Format UnwrappedLineParser.cpp, clang/unittests/Format FormatTestVerilog.cpp

[clang-format] Handle more Verilog attributes (#196455)

before

```SystemVerilog
(* x = "x" *) foreach(x[x]) x = x;
```

after

```SystemVerilog
(* x = "x" *) foreach (x[x])
  x = x;
```

The code for handling statements like the `foreach` preceded the part
for handling the attributes inside `(* *)`. So there was a problem with
some of the statements following attributes. The patch moves the part
for the statements down. The loop in the code was also unnecessary.
DeltaFile
+11-13clang/lib/Format/UnwrappedLineParser.cpp
+2-0clang/unittests/Format/FormatTestVerilog.cpp
+13-132 files

LLVM/project 3ccc276llvm/docs Instrumentor.rst

[Instrumentor][FIX] Fix oversight in docs heading (#197594)
DeltaFile
+1-1llvm/docs/Instrumentor.rst
+1-11 files

LLVM/project 7e735eacompiler-rt/cmake config-ix.cmake

[compiler-rt][cmake] Fix check_cxx_compiler_flag calls (#197529)

check_cxx_compiler_flag, when passing multiple flags, we must separate
them using a SEMICOLON-separated list. Not spaces. These checks
succeed incorrectly sometimes because "-Werror -mcrc" has a different
return value than "-Werror" "-mcrc" on some systems.

This issue was verified with LLVM_ENABLE_PROJECTS=llvm;compiler-rt,
and I'm uncertain whether it exists in runtime CMake builds.
Nonetheless, it's still a bug.

See:
https://cmake.org/cmake/help/latest/module/CheckCXXCompilerFlag.html

This issue was identified downstream in ChromiumOS.

ChromiumOS Bug:
https://issuetracker.google.com/507177988
DeltaFile
+34-34compiler-rt/cmake/config-ix.cmake
+34-341 files

LLVM/project b46eae5llvm/lib/Target/AMDGPU/AsmParser AMDGPUAsmParser.cpp, llvm/test/MC/AMDGPU gfx1250_asm_vop2_err.s

Revert "[AMDGPU] Only src0 and mandatory literals can use literal64 (#196456)"

This reverts commit df6af482fc97cdb85749fc3872e702ba42f115b7.
DeltaFile
+0-15llvm/test/MC/AMDGPU/gfx1250_asm_vop2_err.s
+0-8llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
+0-232 files

LLVM/project 882d025lldb/source/Plugins/Process/elf-core ProcessElfCore.cpp ProcessElfCore.h, lldb/test/API/functionalities/postmortem/elf-core TestLinuxCore.py elf-NT_FILE-NT_PRPSINFO-AT_EXECFN.yaml

Improve the executable name detection in ELF core files. (#197341)

A previous commit switched us to use the value of the AT_EXECFN, which
is an entry in the aux vector, as the executable path. As it turns out,
if a symlink is used to launch a program, the symlink path will be in
the AT_EXECFN string in core file memory. The PRPSINFO also contains a
basename of the program, and it will also be the symlink basename. The
best source of information to figure out the executable name is from the
NT_FILE note. This always has the resolved path to the executable.

Now the executable name is found in a reliable way starting with finding
the NT_FILE entry for the main executable. This can reliably be done by
finding the NT_FILE entry whose address contains the AT_PHDR aux vector
value. This value is the address of the program headers for the main
executable. If there is no NT_FILE entry we can find, we fall back to
the AT_EXECFN entry from memory and then fallback to the basename in the
PRPSINFO. This patch also creates a placeholder as the main executable
when the executable can't be found to ensure users can see which
executable they will need to track down in order to load the core file.

    [8 lines not shown]
DeltaFile
+144-55lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
+51-2lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py
+29-0lldb/test/API/functionalities/postmortem/elf-core/elf-NT_FILE-NT_PRPSINFO-AT_EXECFN.yaml
+29-0lldb/test/API/functionalities/postmortem/elf-core/elf-NT_PRPSINFO-AT_EXECFN.yaml
+18-0lldb/test/API/functionalities/postmortem/elf-core/elf-NT_PRPSINFO.yaml
+8-2lldb/source/Plugins/Process/elf-core/ProcessElfCore.h
+279-596 files

LLVM/project 1bb237allvm/docs Instrumentor.rst UserGuides.rst, llvm/utils instrumentor-config-wizard.py

[Instrumentor][NFC] Add docs and config-wizard script (#197066)

This commit adds initial documentation for the instrumentor to the
html/man pages and provides a script that helps new users to setup the
config and stubs file interactively.

The script and docs have been created with Claude (AI) but
proofread/tested and modified afterwards.
DeltaFile
+834-0llvm/utils/instrumentor-config-wizard.py
+786-0llvm/docs/Instrumentor.rst
+5-0llvm/docs/UserGuides.rst
+1,625-03 files

LLVM/project 111ec2fllvm/test/MC/AMDGPU literals.s

[AMDGPU] Fix conflicted literal test. NFC. (#197587)
DeltaFile
+5-7llvm/test/MC/AMDGPU/literals.s
+5-71 files

LLVM/project df6af48llvm/lib/Target/AMDGPU/AsmParser AMDGPUAsmParser.cpp, llvm/test/MC/AMDGPU gfx1250_asm_vop2_err.s

[AMDGPU] Only src0 and mandatory literals can use literal64 (#196456)
DeltaFile
+15-0llvm/test/MC/AMDGPU/gfx1250_asm_vop2_err.s
+8-0llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
+23-02 files

LLVM/project a7ca414llvm/test/CodeGen/AMDGPU agpr-copy-no-free-registers.ll regpressure_printer.mir

Regenerated tests after rebasing.
DeltaFile
+140-44llvm/test/CodeGen/AMDGPU/agpr-copy-no-free-registers.ll
+15-15llvm/test/CodeGen/AMDGPU/regpressure_printer.mir
+155-592 files

LLVM/project 342c669llvm/lib/Target/AMDGPU/AsmParser AMDGPUAsmParser.cpp, llvm/test/MC/AMDGPU literals.s

[AMDGPU] Validate forced lit() immediate

Right now it takes validation path of an inline constant if fits
even though it is forced to literal encoding.
DeltaFile
+7-1llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
+4-4llvm/test/MC/AMDGPU/literals.s
+11-52 files

LLVM/project e02b5c6libc CMakeLists.txt, libc/config/gpu/spirv entrypoints.txt

Fix libc building errors for SPIRV target (#197381)
DeltaFile
+3-0libc/config/gpu/spirv/entrypoints.txt
+1-1libc/CMakeLists.txt
+4-12 files