LLVM/project 5cbd57dclang/include/clang/AST ExprCXX.h, clang/include/clang/Sema Sema.h

[clang] fix transformation of SubstNonTypeTemplateParmExpr nodes from typealiases and concepts

This makes sure SubstNonTypeTemplateParmExpr produced from non-specialization
decls (Type alias templates and concepts) are correctly transformed.

This makes the SubstNonTypeTemplateParmExpr store the parameter type directly,
and uses that instead of relying on the AssociatedDecl.

Fixes #191738
Fixes #196375
DeltaFile
+17-36clang/lib/Sema/SemaTemplate.cpp
+18-31clang/lib/Sema/TreeTransform.h
+13-13clang/include/clang/AST/ExprCXX.h
+14-10clang/lib/Sema/SemaTemplateInstantiate.cpp
+9-10clang/include/clang/Sema/Sema.h
+0-12clang/lib/AST/ExprCXX.cpp
+71-11214 files not shown
+127-13720 files

LLVM/project 234e46aflang/include/flang/Semantics semantics.h, flang/lib/Semantics semantics.cpp resolve-names.cpp

[cuda][flang] Diagnose missing CUDA intrinsic modules in Flang semantics (#200509)

- Replace CUDA intrinsic module `CHECK`s with actionable diagnostics
when `cudadevice` or `__cuda_builtins` cannot be read.
- Avoid dereferencing missing CUDA module scopes during implicit CUDA
symbol import.
- Add a semantics test covering the missing CUDA intrinsic module
diagnostic.
DeltaFile
+20-9flang/lib/Semantics/semantics.cpp
+14-11flang/lib/Semantics/resolve-names.cpp
+10-0flang/test/Semantics/cuf-missing-intrinsic-modules.cuf
+4-2flang/include/flang/Semantics/semantics.h
+48-224 files

LLVM/project 45660cblldb/source/Host/windows ConnectionGenericFileWindows.cpp

[lldb][Windows] Use captured error in ConnectionGenericFile::Read (#200803)

Use the captured value on both branches so the reported error matches
the one that was tested against.
DeltaFile
+1-1lldb/source/Host/windows/ConnectionGenericFileWindows.cpp
+1-11 files

LLVM/project 96f5b17libc/hdr/types struct_udphdr.h CMakeLists.txt, libc/include/llvm-libc-types struct_udphdr.h

[libc] Add netinet/udp.h containing struct udphdr (#200839)

This patch adds a generated <netinet/udp.h> containing the `udphdr`
structure definition.

There are two styles ("linux" and "BSD") of udphdr field names (and both
of them can be found in the wild), so I follow the glibc and bionic
approach of using an anonymous union. (musl uses a #define on the field
names, which doesn't seem that great).

I've added the target to `include/CMakeLists.txt` and registered it
under target lists in `headers.txt` for the supported Linux platforms
(x86_64, aarch64, and riscv).

To verify layout and alignment correctness, I've added a layout and
field compatibility unit test under `test/src/netinet/udp_test.cpp`.

Assisted by Gemini.
DeltaFile
+43-0libc/test/src/netinet/udp_test.cpp
+37-0libc/include/llvm-libc-types/struct_udphdr.h
+27-0libc/hdr/types/struct_udphdr.h
+13-0libc/test/src/netinet/CMakeLists.txt
+10-0libc/hdr/types/CMakeLists.txt
+9-0libc/include/netinet/udp.yaml
+139-06 files not shown
+153-012 files

LLVM/project a5a3398clang/lib/Driver Driver.cpp, clang/test/Driver offload-arch-translation-amdgpu.cu hip-toolchain-no-rdc.hip

[Clang][AMDGPU] Restore the non-RDC compilation pipeline

The new offload driver uses the LTO compilation pipeline even for non-RDC
compilation. This PR restores the conventional non-RDC flow, where the backend
generates executable code directly, which is then bundled into the HIP fat
binary.

We can revert this change in the future if we decide to deprecate the
distinction between non-RDC and RDC compilation and unify the compilation flow.
DeltaFile
+60-60clang/test/Driver/offload-arch-translation-amdgpu.cu
+74-26clang/lib/Driver/Driver.cpp
+26-45clang/test/Driver/hip-toolchain-no-rdc.hip
+21-13clang/test/Driver/hip-phases.hip
+3-11clang/test/Driver/hip-toolchain-opt.hip
+4-3clang/test/Driver/hip-save-temps.hip
+188-1582 files not shown
+190-1608 files

LLVM/project 82b4ef5llvm/lib/Transforms/Vectorize VPlan.h VPlanRecipes.cpp, llvm/test/Transforms/LoopVectorize/AArch64 sve2-histcnt.ll

[LV] Fix missing MetaData for histogram instructions (#134241)
DeltaFile
+56-0llvm/test/Transforms/LoopVectorize/AArch64/sve2-histcnt.ll
+32-0llvm/test/Transforms/LoopVectorize/VPlan/AArch64/sve2-histcnt-vplan.ll
+8-7llvm/lib/Transforms/Vectorize/VPlan.h
+4-3llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+2-1llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+102-115 files

LLVM/project cf797d6mlir/include/mlir/Interfaces MemorySlotInterfaces.td, mlir/lib/Transforms Mem2Reg.cpp

set insertion point before memOp in promoteInBlock
DeltaFile
+23-0mlir/test/Dialect/LLVMIR/mem2reg-dbginfo.mlir
+6-4mlir/include/mlir/Interfaces/MemorySlotInterfaces.td
+4-1mlir/lib/Transforms/Mem2Reg.cpp
+33-53 files

LLVM/project 16dc82cllvm/lib/Transforms/Scalar LoopInterchange.cpp, llvm/test/Transforms/LoopInterchange memory-attr.ll

[LoopInterchange] Prevent to interchange when memory-related calls exist
DeltaFile
+7-19llvm/test/Transforms/LoopInterchange/memory-attr.ll
+4-2llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+11-212 files

LLVM/project ef7cbc5mlir/lib/Conversion/TosaToSPIRVTosa TosaToSPIRVTosaOps.cpp, mlir/test/Conversion/TosaToSPIRVTosa tosa-to-spirv.mlir

[mlir][spirv][tosa] Add remaining TOSA 1.0 SPIR-V TOSA ops (#200383)

Add conversion patterns for additional TOSA 1.0 operations targeting the
SPIR-V TOSA extended instruction set.

This covers pooling and convolution ops, FFT/RFFT, matmul, concat, pad,
rescale, const, const_shape, and identity. Concat is split into
conservative chunks to avoid producing SPIR-V instructions with too many
operands.

Add a multi-result conversion pattern for FFT/RFFT and share the
convolution replacement logic for conv2d, conv3d, and depthwise_conv2d
while keeping transpose_conv2d explicit because it has different
attributes.

Also share constant attribute conversion for const and const_shape,
including integer element type conversions such as index to i32, i4 to
i8, and i48 to i64, and preserve the empty const_shape edge case.


    [2 lines not shown]
DeltaFile
+288-0mlir/test/Conversion/TosaToSPIRVTosa/tosa-to-spirv.mlir
+275-10mlir/lib/Conversion/TosaToSPIRVTosa/TosaToSPIRVTosaOps.cpp
+563-102 files

LLVM/project b052222llvm/test/tools/llubi intr_vector_manip.ll, llvm/tools/llubi/lib Interpreter.cpp Value.h

[llubi] Fix the storage kind of poison results (#200830)

`AnyValue::poison()` only represents scalar integer/fp/pointer values.
DeltaFile
+15-13llvm/tools/llubi/lib/Interpreter.cpp
+12-12llvm/test/tools/llubi/intr_vector_manip.ll
+19-0llvm/tools/llubi/lib/Value.h
+4-4llvm/tools/llubi/lib/Library.cpp
+50-294 files

LLVM/project 027053cllvm/lib/IR AsmWriter.cpp, llvm/test/Assembler dilabel.ll

[LLVM][IR] Make sure that DILabel's line is always printed

This commit ensures that the textual IR of the DILabel always contains
the `line` information. This is required as the absence of a line causes
a parsing failure, i.e., this change fixes the print + parse roundtrip.
DeltaFile
+22-0llvm/test/Assembler/dilabel.ll
+2-2llvm/lib/IR/AsmWriter.cpp
+24-22 files

LLVM/project 5fa7b55lldb/source/Host/windows ProcessLauncherWindows.cpp

[NFC][lldb][windows] cleanup ProcessLauncherWindows result check (#200804)
DeltaFile
+8-12lldb/source/Host/windows/ProcessLauncherWindows.cpp
+8-121 files

LLVM/project 53133f6llvm/lib/CodeGen PeepholeOptimizer.cpp, llvm/test/CodeGen/X86 bitcnt-load-with-cmov.ll

[Peephole] Do not fold load if any clobber exists (#198238)

Fixes #198173, which is introduced by
https://github.com/llvm/llvm-project/commit/9525bcc3e06e6c0bff3a85f503e47b06a63d6dcc.
The original patch missed the case where there is a clobber between
`LoadMI` and `FlagProducer`.
DeltaFile
+45-0llvm/test/CodeGen/X86/bitcnt-load-with-cmov.ll
+6-1llvm/lib/CodeGen/PeepholeOptimizer.cpp
+51-12 files

LLVM/project e68990blldb/source/Plugins/Process/Windows/Common NativeProcessWindows.cpp NativeProcessWindows.h

[NFC][lldb][windows] break down NativeProcessWindows::OnDebugException (#200832)

This patch breaks down `NativeProcessWindows::OnDebugException` into 3
different handlers (one for each exception) for readability.
DeltaFile
+141-136lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
+9-0lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.h
+150-1362 files

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

[BOLT] Support multiple perf data inputs

Allow multiple -p/-perfdata args (comma-separated and repeated).
Process them in parallel with `--perfdata-jobs/-pj` (default 4,
0 for all available hardware threads). Keep YAML/DataReader
inputs single-profile only.

This also enables density computation with multiple perf files.
Prior to that, it was impossible to compute total density as
it wasn't computed from symbolized profiles.

Depends on
#199323
#199322
#199321
#199320

Test Plan:
Updated pre-aggregated-perf.test and perf_test

    [11 lines not shown]
DeltaFile
+54-5bolt/lib/Profile/DataAggregator.cpp
+12-3bolt/include/bolt/Profile/DataAggregator.h
+7-8bolt/lib/Utils/CommandLineOpts.cpp
+12-0bolt/test/perf2bolt/perf_test.test
+7-0bolt/lib/Rewrite/RewriteInstance.cpp
+5-0bolt/test/X86/pre-aggregated-perf.test
+97-163 files not shown
+104-219 files

LLVM/project 9f1568aflang/test/Integration/OpenMP atomic-capture-release.f90

[flang][OpenMP] Restricting Integration test atomic-capture-release.f90 run to x86 and aarch64 (#200770)

Similar to the the change in
`flang/test/Integration/OpenMP/atomic-compare.f90`, restricting the test
case `flang/test/Integration/OpenMP/atomic-capture-release.f90` to run
on
`x86-registered-target & aarch64-registered-target`

This also Fixes
[#200729](https://github.com/llvm/llvm-project/issues/200729)

A comment has been added to the merge in
[[Flang][OpenMP]Handling restrictions of using Memory-Order-Clause with
Atomic-Clause](https://github.com/llvm/llvm-project/pull/199636)

>LLVM Buildbot has detected a new failure on builder
ppc64le-mlir-rhel-clang running on ppc64le-mlir-rhel-test while building
flang,llvm,mlir at step 4 "cmake-configure".
Full details are available at:

    [4 lines not shown]
DeltaFile
+2-1flang/test/Integration/OpenMP/atomic-capture-release.f90
+2-11 files

LLVM/project 6535731llvm/test/Transforms/LoopInterchange memory-attr.ll

[LoopInterchange] Add test where loop has memory-affected calls (NFC) (#200827)

This patch adds the following two test cases:

- There is a call to a function with `memory(write)` in the loop nest,
which is taken from #200796.
- There is a call to a function with `memory(none)` in the loop nest.

For the former case, we are not allowed to interchange the loops because
the function call may write to an unknown memory location, but the
transformation is still applied, i.e., a miscompilation. As for the
latter case, the call should not prevent the loops from being
interchanged, which seems to be the original intention of the code.
DeltaFile
+140-0llvm/test/Transforms/LoopInterchange/memory-attr.ll
+140-01 files

LLVM/project dbeea29llvm/lib/ObjCopy/DXContainer DXContainerObjcopy.cpp, llvm/test/tools/llvm-objcopy/DXContainer dump-section.yaml copy-headers.yaml

[llvm-objcopy] Strip header from DXContainer's ILDB part during `--dump-section` (#198578)

This strips the header from ILDB part of DXContainer during
`llvm-objcopy --dump-section`, so that the output contains bitcode only.
DeltaFile
+20-220llvm/test/tools/llvm-objcopy/DXContainer/dump-section.yaml
+12-3llvm/test/tools/llvm-objcopy/DXContainer/copy-headers.yaml
+1-1llvm/lib/ObjCopy/DXContainer/DXContainerObjcopy.cpp
+33-2243 files

LLVM/project 25ebed5lldb/source/Plugins/DynamicLoader/Windows-DYLD DynamicLoaderWindowsDYLD.cpp

[lldb][windows] refactor null handling in DynamicLoaderWindowsDYLD (#200821)

This patch thightens the null guards.

---------

Co-authored-by: Nerixyz <nero.9 at hotmail.de>
DeltaFile
+18-13lldb/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp
+18-131 files

LLVM/project 87f09d3clang/docs ReleaseNotes.rst, clang/lib/Parse ParseTentative.cpp ParseExpr.cpp

[clang] Parse `__typeof_unqual__` consistently with `__typeof__` (#198948)

C23 `__typeof_unqual` and `__typeof_unqual__` are supported in all
language modes as an extension.
However, existing tests missed this form:
```cpp
int main() {
   __typeof_unqual(int) x = 0;
}
```
That doesn't compile today.
```
<source>:2:4: error: expected expression
    2 |    __typeof_unqual(int) x = 0;
      |    ^
1 error generated.
Compiler returned: 1
```
I think the fix is to parse `tok::kw_typeof_unqual` everywhere that we

    [14 lines not shown]
DeltaFile
+6-2clang/lib/Parse/ParseTentative.cpp
+8-0clang/test/SemaCXX/typeof.cpp
+1-0clang/lib/Parse/ParseExpr.cpp
+1-0clang/docs/ReleaseNotes.rst
+1-0clang/lib/Parse/ParseExprCXX.cpp
+17-25 files

LLVM/project 5c9b578llvm/test/MC/AArch64/SME2 uqcvt-diagnostics.s

[AArch64][SME2] Fix mnemonic in uqcvt-diagnostics.s test (NFC) (#200824)
DeltaFile
+8-8llvm/test/MC/AArch64/SME2/uqcvt-diagnostics.s
+8-81 files

LLVM/project 8994480llvm/lib/Transforms/Vectorize LoopVectorize.cpp VPlanTransforms.cpp

[LV] Remove legacy setVectorizedCallDecision & co (NFC). (#195519)

Remove setVectorizedCallDecision & co after being superseded by
https://github.com/llvm/llvm-project/pull/195518.

Note that we still need to retain some of the call cost logic in the
legacy cost model, to compute if scalarization is profitable.

Depends on https://github.com/llvm/llvm-project/pull/195518.

PR: https://github.com/llvm/llvm-project/pull/195519
DeltaFile
+37-242llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+1-12llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+0-8llvm/lib/Transforms/Vectorize/VPlanHelpers.h
+38-2623 files

LLVM/project 081e8a7flang/lib/Semantics resolve-names.cpp, libsycl/include/sycl/__impl index_space_classes.hpp queue.hpp

Merge branch 'main' into users/kasuga-fj/interchange-test-mem-call
DeltaFile
+220-334llvm/test/CodeGen/SPIRV/transcoding/enqueue_kernel.ll
+412-0libsycl/include/sycl/__impl/index_space_classes.hpp
+141-84llvm/lib/Target/SPIRV/SPIRVBuiltins.cpp
+195-9libsycl/include/sycl/__impl/queue.hpp
+188-0libsycl/include/sycl/__impl/detail/kernel_arg_helpers.hpp
+165-0flang/lib/Semantics/resolve-names.cpp
+1,321-42770 files not shown
+2,331-82076 files

LLVM/project e6ab63ellvm/lib/Target/SPIRV SPIRVBuiltins.cpp SPIRVModuleAnalysis.cpp, llvm/test/CodeGen/SPIRV EnqueueEmptyKernel.ll

[SPIRV] Fix enqueue empty kernel (#187671)

Function reference arguments don't get spv_bitcast after opaque pointer
migration, while data pointer arguments still might. Therefore:
a. getBlockStructInstr() got updated to check G_GLOBAL_VALUE ->
G_ADDRSPACE_CAST pattern for function reference arguments;
b. buildEnqueueKernel() got updated to add bitcast the block literal
pointer from struct* to i8*, as required by OpEnqueueKernel.

---------

Co-authored-by: Arseniy Obolenskiy <gooddoog at student.su>
Co-authored-by: Marcos Maronas <mmaronas at amd.com>
Co-authored-by: Dmitry Sidorov <dsidorov at amd.com>
DeltaFile
+220-334llvm/test/CodeGen/SPIRV/transcoding/enqueue_kernel.ll
+141-84llvm/lib/Target/SPIRV/SPIRVBuiltins.cpp
+0-67llvm/test/CodeGen/SPIRV/EnqueueEmptyKernel.ll
+37-0llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
+3-1llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
+401-4865 files

LLVM/project c07f4eeclang/lib/AST/ByteCode Pointer.cpp, clang/test/SemaCXX constant-expression-p2280r4.cpp

[clang][bytecode] Remove unknown-size-array special handling (#200789)

from `Pointer::toAPValue()`.
DeltaFile
+2-4clang/test/SemaCXX/constant-expression-p2280r4.cpp
+0-4clang/lib/AST/ByteCode/Pointer.cpp
+2-82 files

LLVM/project b05c5e4lldb/source/Plugins/Process/Windows/Common NativeProcessWindows.cpp

[lldb][Windows] Don't kill lldb when a thread fails to stop (#200805)

Replace `exit(1)` in `NativeProcessWindows::StopThread` with logging so
a single thread suspend failure no longer terminates lldb itself.
DeltaFile
+3-3lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
+3-31 files

LLVM/project d2bea40lldb/source/Plugins/Process/Windows/Common DebuggerThread.cpp

[NFC][lldb][windows] follow styling guidelines for hProcess (#200812)

`hProcess` does not follow the LLVM styling guidelines. Rename it to
`process`.
DeltaFile
+19-20lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
+19-201 files

LLVM/project 387994cmlir/include/mlir/Interfaces MemorySlotInterfaces.td, mlir/lib/Transforms Mem2Reg.cpp

visit all regions
DeltaFile
+60-51mlir/lib/Transforms/Mem2Reg.cpp
+32-21mlir/test/Transforms/mem2reg.mlir
+9-7mlir/include/mlir/Interfaces/MemorySlotInterfaces.td
+1-4mlir/test/lib/Dialect/Test/TestOps.td
+102-834 files

LLVM/project cedd8d9lldb/source/Plugins/Process/Windows/Common NativeProcessWindows.cpp

[NFC][lldb][windows] simplify NativeProcessWindows::FindSoftwareBreakpoint (#200820)
DeltaFile
+1-4lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
+1-41 files

LLVM/project 6a80387lldb/source/Plugins/Platform/Windows PlatformWindows.cpp

[NFC][lldb][windows] Simplify PlatformWindows::ConnectRemote (#200823)
DeltaFile
+13-23lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
+13-231 files