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

Revert "[clang] Reland: fix getTemplateInstantiationArgs (#207825)"

This reverts commit ff11bbce9e87ab4ef59a789cff1c9b9d771adc1e.
DeltaFile
+429-194clang/lib/Sema/SemaTemplateInstantiate.cpp
+165-291clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+146-150clang/lib/Sema/SemaTemplate.cpp
+95-96clang/include/clang/AST/DeclTemplate.h
+129-59clang/lib/Sema/SemaConcept.cpp
+92-60clang/lib/AST/DeclTemplate.cpp
+1,056-85062 files not shown
+1,729-1,55668 files

LLVM/project 5da6b3clldb/include/lldb/Target DynamicRegisterInfo.h, lldb/source/Target DynamicRegisterInfo.cpp

[lldb] DynamicRegisterInfo::Dump should take a Stream argument (#207863)

Otherwise, it creates its own Stream dumping to stdout.
DeltaFile
+2-1lldb/include/lldb/Target/DynamicRegisterInfo.h
+1-2lldb/source/Target/DynamicRegisterInfo.cpp
+3-32 files

LLVM/project 100a1fbflang/include/flang/Semantics openmp-dsa.h, flang/lib/Semantics openmp-dsa.cpp resolve-directives.cpp

[flang][OpenMP][NFC] Share SetSymbolDSA between semantics and lowering (#207826)

Move the DSA helper from the private OmpAttributeVisitor::SetSymbolDSA
into the public openmp-dsa header next to GetSymbolDSA, and share the
DSA flag set through a single GetDataSharingAttributeFlags().

This lets an upcoming metadirective lowering change reuse the helper to
set the predetermined DSA of the loop induction variables of a selected
variant. A loop-associated variant is resolved during lowering, so the
usual semantic DSA resolution never runs on its loop nest and lowering
must set those flags itself.

Assisted with Copilot.
DeltaFile
+17-5flang/lib/Semantics/openmp-dsa.cpp
+1-14flang/lib/Semantics/resolve-directives.cpp
+4-0flang/include/flang/Semantics/openmp-dsa.h
+22-193 files

LLVM/project e8402ddlibc/src/__support/CPP string.h, libc/test/src/__support/CPP string_test.cpp

[libc][cpp::string] Fix off-by-one bug in resize and a memory leak
DeltaFile
+9-1libc/src/__support/CPP/string.h
+9-0libc/test/src/__support/CPP/string_test.cpp
+18-12 files

LLVM/project f3f427fllvm/lib/Transforms/IPO AttributorAttributes.cpp, llvm/test/Transforms/Attributor AddrSpaceIndirect.ll

[Attributor] AAAddressSpace should use the AA for recursive lookups

If we stripped some values, we can use the AAAddressSpace again for
an optimistic AS value. If we didn't strip any value, we can still use
the TLI.
DeltaFile
+171-0llvm/test/Transforms/Attributor/AddrSpaceIndirect.ll
+10-4llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+181-42 files

LLVM/project 0fba09cllvm/test/Transforms/SLPVectorizer/X86 ashr-main-opcode-copyables.ll

[SLP][NFC]Add an extra test with ashr vectorization, NFC



Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/208057
DeltaFile
+65-0llvm/test/Transforms/SLPVectorizer/X86/ashr-main-opcode-copyables.ll
+65-01 files

LLVM/project dda9dc5.github/workflows libcxx-run-benchmarks.yml

[libc++] Use a median-of-3 for the A/B comparison benchmarking job (#208023)

After a bit of testing, I think this provides a good tradeoff between
resource utilization and noise reduction. Furthermore, the comparison
script (which produces the output) will be augmented to surface the
variability of the results in a separate PR.
DeltaFile
+16-7.github/workflows/libcxx-run-benchmarks.yml
+16-71 files

LLVM/project d0b4540

Rebase

Created using spr 1.3.7
DeltaFile
+0-00 files

LLVM/project 7e85d7ellvm/test/Transforms/SLPVectorizer/X86 ashr-main-opcode-copyables.ll

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+65-0llvm/test/Transforms/SLPVectorizer/X86/ashr-main-opcode-copyables.ll
+65-01 files

LLVM/project b837964llvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll lower-buffer-fat-pointers-contents-legalization-alignment.ll

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+2,553-2,687llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+3,280-0llvm/test/CodeGen/AMDGPU/lower-buffer-fat-pointers-contents-legalization-alignment.ll
+0-2,870llvm/test/CodeGen/AMDGPU/regalloc-hoist-spill-live-range-upd.ll
+1,886-936llvm/test/CodeGen/AMDGPU/buffer-fat-pointer-atomicrmw-fadd.ll
+1,542-724llvm/test/CodeGen/AMDGPU/buffer-fat-pointer-atomicrmw-fmin.ll
+1,542-724llvm/test/CodeGen/AMDGPU/buffer-fat-pointer-atomicrmw-fmax.ll
+10,803-7,9411,496 files not shown
+60,709-34,9331,502 files

LLVM/project 0170a9ellvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll lower-buffer-fat-pointers-contents-legalization-alignment.ll

Rebase

Created using spr 1.3.7
DeltaFile
+2,553-2,687llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+3,280-0llvm/test/CodeGen/AMDGPU/lower-buffer-fat-pointers-contents-legalization-alignment.ll
+0-2,870llvm/test/CodeGen/AMDGPU/regalloc-hoist-spill-live-range-upd.ll
+1,886-936llvm/test/CodeGen/AMDGPU/buffer-fat-pointer-atomicrmw-fadd.ll
+1,542-724llvm/test/CodeGen/AMDGPU/buffer-fat-pointer-atomicrmw-fmin.ll
+1,542-724llvm/test/CodeGen/AMDGPU/buffer-fat-pointer-atomicrmw-fmax.ll
+10,803-7,9411,497 files not shown
+60,678-34,9431,503 files

LLVM/project 9bd7ed5llvm/include/llvm/Transforms/IPO Attributor.h, llvm/lib/Transforms/IPO AttributorAttributes.cpp Attributor.cpp

[Attributor] Distinguish COHERENT accesses in addition to exact ones

When we find overlapping accesses, an access is exact when it will hit
the same memory. Otherwise we treated it like an unknown access that
could overwrite any part of the overlapping value. Using size and
alignment we can introduce a new category, COHERENT, which means the
access migth not be at the exact address but if it is affecting the
initial range it will do so with the proper value, e.g., it will not
write part of the range but all or nothing.
DeltaFile
+202-22llvm/test/Transforms/Attributor/nocapture-2.ll
+59-10llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+40-8llvm/test/Transforms/Attributor/multiple-offsets-pointer-info.ll
+9-7llvm/lib/Transforms/IPO/Attributor.cpp
+12-3llvm/include/llvm/Transforms/IPO/Attributor.h
+322-505 files

LLVM/project 9e22a59llvm/docs LangRef.rst, llvm/lib/Analysis MemoryDependenceAnalysis.cpp

[llvm] Support invariant.load on readonly intrinsics (#205916)

Update passes and analyses that look at invariant.load (ex. MemorySSA)
to also consider the possibility that `!invariant.load` may be present
on intrinsic calls.

Updates the verifier to indicate that `!invariant.load` is only legal
for loads and readonly intrinsics (and moves the definition of the
metadata out of the definition of `load`).

This has not been extended to arbitrary function calls since it's less
clear what the semantics of !invariant.load on them would be.
Furthermore, extension to read/write intrinsics like memcpy() is planned
as a followup.

This PR also deletes tests that were pre-committed in
https://github.com/llvm/llvm-project/pull/205894 but that become invalid
with the verifier changes in this PR


    [5 lines not shown]
DeltaFile
+27-13llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
+33-6llvm/docs/LangRef.rst
+4-27llvm/test/Transforms/GVN/invariant-load-intrinsic.ll
+1-28llvm/test/Transforms/InstCombine/invariant-load-like-sink.ll
+4-20llvm/test/Analysis/MemorySSA/invariant-load-intrinsic.ll
+0-24llvm/test/Transforms/Sink/invariant-load.ll
+69-1183 files not shown
+97-1229 files

LLVM/project 24688c6llvm/lib/Target/PowerPC PPCInstrInfo.cpp

PPC: Fix querying TargetRegisterInfo in PPCInstrInfo (#208031)

Use the direct PPCRegisterInfo member
DeltaFile
+33-46llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
+33-461 files

LLVM/project afb5846llvm/test/Transforms/SLPVectorizer/X86 ashr-main-opcode-copyables.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+65-0llvm/test/Transforms/SLPVectorizer/X86/ashr-main-opcode-copyables.ll
+65-01 files

LLVM/project 65510baflang/include/flang/Semantics openmp-dsa.h, flang/lib/Semantics openmp-dsa.cpp resolve-directives.cpp

[flang][OpenMP][NFC] Share SetSymbolDSA between semantics and lowering

Move the DSA helper from the private OmpAttributeVisitor::SetSymbolDSA into the
public openmp-dsa header next to GetSymbolDSA, and share the DSA flag set
through a single GetDataSharingAttributeFlags().

This lets an upcoming metadirective lowering change reuse the helper to set the
predetermined DSA of the loop induction variables of a selected variant. A
loop-associated variant is resolved during lowering, so the usual semantic DSA
resolution never runs on its loop nest and lowering must set those flags itself.

Assisted with Copilot.
DeltaFile
+17-5flang/lib/Semantics/openmp-dsa.cpp
+1-14flang/lib/Semantics/resolve-directives.cpp
+4-0flang/include/flang/Semantics/openmp-dsa.h
+22-193 files

LLVM/project 221cd62llvm/lib/Target/WebAssembly WebAssemblyISelLowering.cpp WebAssemblyRuntimeLibcallSignatures.cpp, llvm/test/CodeGen/WebAssembly f128-minmax.ll

[WebAssembly] support `f{min, max}imum.f128` and `f{min, max}imumnum.f128` (#207160)

fixes https://github.com/llvm/llvm-project/issues/207100

As far as I can see `wasi-libc` does not currently export the dedicated
libcalls, so I went with a custom expansion. It emits more code, but
will work without any linker errors etc.

The `long double` type is actually `f128` for webassembly, so at least
the libcalls should work.
DeltaFile
+292-0llvm/test/CodeGen/WebAssembly/f128-minmax.ll
+33-0llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
+6-0llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
+331-03 files

LLVM/project 87a5682llvm/test/Transforms/SLPVectorizer/X86 vect_copyable_in_binops.ll

[SLP][NFC]Update test checks, add some more tests, NFC



Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/208048
DeltaFile
+268-99llvm/test/Transforms/SLPVectorizer/X86/vect_copyable_in_binops.ll
+268-991 files

LLVM/project 3b5b860llvm/lib/Target/PowerPC PPCMIPeephole.cpp, llvm/test/CodeGen/PowerPC peephole-elim-extsw-subreg-input.mir

PPC: Fix extsw elimination when the input reads a subregister

The EXTSW_32_64 sign-extend elimination previously assumed its input
was a full register value. It would then try using that value as the
source of the new (unnecessary) INSERT_SUBREG.

The new test would then hit this verifier error:

```
bb.0:
  liveins: $x3
  %0:g8rc = COPY killed $x3
  %1:g8rc = RLDICL killed %0:g8rc, 0, 33
  %3:g8rc = IMPLICIT_DEF
  %2:g8rc = INSERT_SUBREG %3:g8rc(tied-def 0), %1:g8rc, %subreg.sub_32
  $x3 = COPY killed %2:g8rc
  BLR8 implicit $lr8, implicit $rm, implicit killed $x3

*** Bad machine code: INSERT_SUBREG expected inserted value to have equal or lesser size than the subreg it was inserted into ***

    [8 lines not shown]
DeltaFile
+27-12llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
+30-0llvm/test/CodeGen/PowerPC/peephole-elim-extsw-subreg-input.mir
+57-122 files

LLVM/project 70a2918llvm/lib/Target/PowerPC PPCInstrInfo.cpp, llvm/test/CodeGen/PowerPC sext_elimination.mir

PPC: Fix EXTSW elimination promoting a subregister operand

promoteInstr32To64ForElimEXTSW copies operands from the 32-bit
instruction verbatim into its promoted 64-bit form. When an operand
reads the sub_32 subregister of a 64-bit register, the promoted
instruction (which takes a full register) ended up with an illegal
subregister use and failed the machine verifier.

Drop the sub_32 subregister and use the original full register, which
provides the low 32 bits the promoted instruction operates on. This
avoids  verifier error regressions in a future change.

Co-Authored-By: Claude <noreply at anthropic.com> (Claude Opus 4.8, claude-opus-4-8)
DeltaFile
+41-1llvm/test/CodeGen/PowerPC/sext_elimination.mir
+7-0llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
+48-12 files

LLVM/project c5eb638clang/docs ReleaseNotes.rst, clang/include/clang/Basic DiagnosticCommonKinds.td

[Clang] [C++26] Expansion Statements (Part 11)
DeltaFile
+113-0clang/test/AST/ast-print-expansion-stmts.cpp
+54-0clang/test/AST/ast-dump-expansion-stmt.cpp
+7-1clang/www/cxx_status.html
+0-4clang/include/clang/Basic/DiagnosticCommonKinds.td
+2-0clang/docs/ReleaseNotes.rst
+176-55 files

LLVM/project c95f909clang/include/clang/Basic DiagnosticSemaKinds.td, clang/include/clang/Sema ScopeInfo.h

[Clang] [C++26] Expansion Statements (Part 9)
DeltaFile
+135-0clang/test/SemaCXX/cxx2c-expansion-stmts-control-flow.cpp
+38-9clang/lib/Sema/SemaLookup.cpp
+28-2clang/lib/Sema/SemaStmt.cpp
+9-2clang/lib/Parse/ParseStmt.cpp
+6-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+5-1clang/include/clang/Sema/ScopeInfo.h
+221-141 files not shown
+225-167 files

LLVM/project d15eb73clang/test/CodeGenCXX cxx2c-enumerating-expansion-statements.cpp cxx2c-iterating-expansion-stmt.cpp

[Clang] [C++26] Expansion Statements (Part 8)
DeltaFile
+1,518-0clang/test/CodeGenCXX/cxx2c-enumerating-expansion-statements.cpp
+551-0clang/test/CodeGenCXX/cxx2c-iterating-expansion-stmt.cpp
+493-0clang/test/CodeGenCXX/cxx2c-destructuring-expansion-stmt.cpp
+430-0clang/test/CodeGenCXX/cxx2c-expansion-stmts-control-flow.cpp
+208-0clang/test/CodeGenCXX/cxx2c-expansion-stmts-templates.cpp
+134-0clang/test/CodeGenCXX/cxx2c-expansion-stmts-mangling.cpp
+3,334-03 files not shown
+3,375-39 files

LLVM/project 2a8580bclang/include/clang/Basic DiagnosticSemaKinds.td LangOptions.def, clang/include/clang/Options Options.td

[Clang] [C++26] Expansion Statements (Part 10)
DeltaFile
+73-0clang/test/SemaCXX/cxx2c-expansion-stmts-limit.cpp
+18-0clang/lib/Sema/SemaExpand.cpp
+9-0clang/test/SemaCXX/cxx2c-fexpansion-statements.cpp
+4-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+4-0clang/include/clang/Options/Options.td
+1-0clang/include/clang/Basic/LangOptions.def
+109-01 files not shown
+110-07 files

LLVM/project 6e9cbcfclang/include/clang/Sema Sema.h, clang/lib/Sema SemaStmt.cpp

[Clang] [C++26] Expansion Statements (Part 4)
DeltaFile
+276-227clang/lib/Sema/SemaStmt.cpp
+40-0clang/include/clang/Sema/Sema.h
+316-2272 files

LLVM/project eba505eclang/include/clang/Sema Sema.h, clang/lib/Sema SemaExpand.cpp TreeTransform.h

[Clang] [C++26] Expansion Statements (Part 3)
DeltaFile
+169-0clang/lib/Sema/SemaExpand.cpp
+92-4clang/lib/Sema/TreeTransform.h
+42-42clang/test/Parser/cxx2c-expansion-statements.cpp
+37-1clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+26-3clang/lib/Sema/SemaTemplateInstantiate.cpp
+20-0clang/include/clang/Sema/Sema.h
+386-504 files not shown
+401-6710 files

LLVM/project 76f82d7clang/include/clang/Basic DiagnosticSemaKinds.td, clang/lib/Sema SemaExpand.cpp TreeTransform.h

[Clang] [C++26] Expansion Statements (Part 6)
DeltaFile
+106-6clang/lib/Sema/SemaExpand.cpp
+23-3clang/lib/Sema/TreeTransform.h
+2-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+131-93 files

LLVM/project f8f1471clang/lib/AST ExprConstant.cpp, clang/lib/AST/ByteCode Compiler.cpp Compiler.h

[Clang] [C++26] Expansion Statements (Part 7)
DeltaFile
+1,506-0clang/test/SemaCXX/cxx2c-expansion-stmts.cpp
+42-0clang/lib/AST/ByteCode/Compiler.cpp
+40-0clang/lib/AST/ExprConstant.cpp
+3-0clang/lib/Sema/SemaDeclCXX.cpp
+2-1clang/lib/AST/ByteCode/Compiler.h
+1,593-15 files

LLVM/project ab3cb94clang/include/clang/Basic DiagnosticSemaKinds.td, clang/include/clang/Sema Sema.h

[Clang] [C++26] Expansion Statements (Part 5)
DeltaFile
+299-14clang/lib/Sema/SemaExpand.cpp
+71-0clang/lib/Sema/TreeTransform.h
+11-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+11-0clang/include/clang/Sema/Sema.h
+8-0clang/lib/Sema/SemaStmt.cpp
+400-145 files

LLVM/project 17e8068clang/docs ReleaseNotes.md, clang/lib/AST ASTContext.cpp

[clang][Modules] Support ODR merging of `UsingEnumDecl` (#207071)

Fixes https://github.com/llvm/llvm-project/issues/207066.

`UsingEnumDecl` (representing C++20 `using enum` declarations)
was not handled in `ASTContext::isSameEntity`. 
Consequently, identical class definitions containing
a `using enum` statement failed to merge, resulting in spurious ODR
mismatch errors such as: `error: 'MyStruct::MyEnum' from module
'ModuleB' is not present in definition of 'MyStruct' in module
'ModuleA'`.

This patch implements merging support for `UsingEnumDecl` in
`ASTContext::isSameEntity` by comparing the nested-name-specifier
qualifiers and the underlying `EnumDecl` target.

---------

Co-authored-by: ipopov <ipopov at google.com>
DeltaFile
+53-0clang/test/Modules/modules-using-enum-class-scope.cppm
+6-0clang/lib/AST/ASTContext.cpp
+2-0clang/docs/ReleaseNotes.md
+61-03 files