LLVM/project d2e52eeclang/docs ReleaseNotes.md, clang/lib/Lex Lexer.cpp

[clang][Lex] Preserve physical line start after comments in -C mode (#216556)

When comments are preserved with -C, a comment at the start of a
physical line consumes the PhysicalStartOfLine state. As a result, a
preprocessor directive following the comment is not recognized.

Preserve the PhysicalStartOfLine state when returning a comment token so
that directives following comments are still handled correctly.

Fixes: #48361
DeltaFile
+33-0clang/test/Preprocessor/comment_directive.c
+1-0clang/lib/Lex/Lexer.cpp
+1-0clang/docs/ReleaseNotes.md
+35-03 files

LLVM/project 7855d51llvm/docs LangRef.md, llvm/lib/CodeGen/SelectionDAG TargetLowering.cpp

[APFloat][SelectionDAG] Support Float8E5M3FNU in convert.{to,from}.arbitrary.fp

Float8E5M3FNU was already accepted by the IR verifier, because
isValidArbitraryFPFormat is defined in terms of
getArbitraryFPFormatSizeInBits and that table covers it. It was missing
from getArbitraryFPSemantics, so SelectionDAGBuilder rejected
it with "not implemented format" and the verifier-clean IR failed to
compile. Add the mapping and the corresponding entries in the
expandCONVERT_{TO,FROM}_ARBITRARY_FP format allowlists.

Unlike every other format the expansions handle so far, Float8E5M3FNU is
unsigned: it has no sign bit, so all 8 bits go to a 5-bit exponent and a
3-bit significand.

Since an unsigned format cannot represent a negative value, a negative
input now saturates to zero when the saturate flag is set, and is poison
otherwise. -0.0 is excluded from that and still converts to +0, and the
check is ordered before the NaN case so a negative NaN still produces the
NaN encoding. APFloat treats constructing a negative value in an unsigned

    [7 lines not shown]
DeltaFile
+263-0llvm/test/CodeGen/AMDGPU/float-to-arbitrary-fp-e5m3fnu.ll
+189-0llvm/test/CodeGen/X86/float-to-arbitrary-fp.ll
+37-11llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+7-2llvm/docs/LangRef.md
+2-2llvm/lib/Support/APFloat.cpp
+2-1llvm/unittests/ADT/APFloatTest.cpp
+500-166 files

LLVM/project 30a31c4libc/src/__support/threads thread.cpp, libc/src/stdlib CMakeLists.txt exit.cpp

[libc] Remove (weak) __cxa_thread_finalize (#216081)

Unlike __cxa_thread_atexit(_impl), this function is not a part of the
ABI as the process of calling the thread exit callbacks is an
implementation detail. Additionally, the weak definition gets in the way
of refactoring the thread code as the linker will not extract an object
from the archive if the dependency is already satisfied by a weak
definition.

Instead of a weak definition, I use a preprocessor macro to determine
whether we need to call the thread cleanup function (i.e., whether the
target supports threads).
DeltaFile
+8-17libc/src/stdlib/exit.cpp
+12-0libc/src/stdlib/CMakeLists.txt
+0-2libc/src/__support/threads/thread.cpp
+20-193 files

LLVM/project 5589423utils/bazel/llvm-project-overlay/libc BUILD.bazel

[Bazel] Fixes 1f4574c (#216346)

This fixes 1f4574c6033cae84c88ca69bb2b73c9b029925e3 (#216345).

Buildkite error link:
https://buildkite.com/llvm-project/upstream-bazel/builds?commit=1f4574c6033cae84c88ca69bb2b73c9b029925e3

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

LLVM/project 65e0fe6clang/lib/CodeGen BackendUtil.cpp, clang/lib/Driver/ToolChains Clang.cpp

[dyndbg][Clang] Implement nested-ELF dynamic debugging support (#216307)

Re-land https://github.com/llvm/llvm-project/pull/194860

A clone of the module is compiled without optimisations and embedded into the
to-be-optimised module using `embedBufferInModule`, similarly to how
`-ffat-lto-objects` and `-fembed-offload-object` work.

That unoptimised-code object is embedded in the optimised-code object in a
section called `.debug_llvm_dyndbg`.

The optimised ELF/module may be referred to as the "outer" ELF/module, and the
unoptimized one the "inner" ELF/module.

The outer module holds global data referred to by both modules and all calls in
the inner module are to outer module functions. To facilitate this the outer
module is modified, adding external-linkage aliases for local symbols.

For more detail see RFC https://discourse.llvm.org/t/90113 and documentation at
llvm/docs/DynamicDebugging.md.
DeltaFile
+110-1clang/lib/CodeGen/BackendUtil.cpp
+72-0clang/test/DebugInfo/DynamicDebugging/symbols-globals.cpp
+35-2clang/lib/Driver/ToolChains/Clang.cpp
+37-0clang/test/DebugInfo/DynamicDebugging/compiler-used.cpp
+33-0clang/test/DebugInfo/DynamicDebugging/symbols-functions.cpp
+32-0clang/test/Driver/dynamic-debugging-flags.c
+319-320 files not shown
+540-1126 files

LLVM/project 6a2d309clang/lib/CIR/CodeGen CIRGenStmt.cpp, clang/lib/CodeGen CGStmt.cpp

[Clang] Diagnose conflict between always_inline/noinline attributes (#215173)

This PR aims to diagnose `always_inline` and `noinline` conflicts which
currently could pass silently through `Sema` or cause a crash (with
assertions enabled). Changes include:

- Added `MutualExclusions<[AlwaysInline, NoInline]>` in `Attr.td`
- Prevent `always_inline` and `noinline` from being propagated from
generic to specialized templates in `SemaDecl.cpp`
- Prevent inner attributes from clobbering unrelated outer attributes
(e.g. `noinline` and `nomerge`) in both `CGStmt.cpp` and
`CIRGenStmt.cpp`

Something to consider though: Should we prevent propagating conflicting
attributes when doing explicit template specializations in general, not
just `inline`, e.g. `hot`/`cold`, `convergent`/`noconvergent`, etc.

Fixes #214764


    [2 lines not shown]
DeltaFile
+92-0clang/test/CodeGen/attr-noinline-always-inline.cpp
+34-0clang/test/Sema/attr-noinline.cpp
+22-0clang/test/CodeGenHLSL/HLSLControlFlowHint.hlsl
+13-8clang/lib/CodeGen/CGStmt.cpp
+8-3clang/lib/CIR/CodeGen/CIRGenStmt.cpp
+8-0clang/test/CIR/CodeGen/callsite-inline-attributes.cpp
+177-112 files not shown
+184-138 files

LLVM/project f9f1170llvm/lib/Target/M68k M68kInstrArithmetic.td M68kInstrShiftRotate.td, llvm/test/CodeGen/M68k/Arith divide-by-constant.ll rem.ll

[M68k] Implement `SWAP` instruction encoding, patterns, and tests (#215597)
DeltaFile
+69-0llvm/test/CodeGen/M68k/Arith/rem.ll
+27-11llvm/lib/Target/M68k/M68kISelLowering.cpp
+30-0llvm/lib/Target/M68k/M68kInstrShiftRotate.td
+28-0llvm/test/CodeGen/M68k/ShiftRotate/bswap.ll
+15-12llvm/lib/Target/M68k/M68kInstrArithmetic.td
+4-10llvm/test/CodeGen/M68k/Arith/divide-by-constant.ll
+173-332 files not shown
+195-338 files

LLVM/project ea347c8llvm/include/llvm/ADT FoldingSet.h, llvm/lib/Support FoldingSet.cpp

[ADT] Remove bucket_begin, bucket_end, and FoldingSetBucketIterator (NFC) (#216548)

This patch removes bucket_begin, bucket_end, and the underlying
FoldingSetBucketIterator and FoldingSetBucketIteratorImpl classes in
FoldingSet.

These were added on February 4, 2008 in commit
e2887863563fe5d2fdd8e1219b76fdc1ee9ec37d for ImutAVLTree in
ImmutableSet.h.  The last use was removed on November 30, 2010 in commit
dbd89971ffb3a222dc91513585e8d6b5bc7882db when ImmutableSet switched
from FoldingSet to DenseSet.

Assisted-by: Antigravity
DeltaFile
+1-59llvm/include/llvm/ADT/FoldingSet.h
+0-7llvm/lib/Support/FoldingSet.cpp
+1-662 files

LLVM/project 723b6a6mlir/include/mlir/Dialect/LLVMIR NVVMOps.td, mlir/lib/Dialect/LLVMIR/IR NVVMDialect.cpp

[MLIR][NVVM] Spell strict assembly properties directly

Bind every NVVM inherent property in its operation assembly format and
re-enable strict property parsing for the dialect. Use direct named clauses
for declarative formats and custom MMA parsers while retaining dictionaries
for discardable attributes.

Assisted-by: Codex
DeltaFile
+345-157mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
+415-5mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
+156-156mlir/test/Target/LLVMIR/nvvm/tcgen05-mma-tensor.mlir
+156-156mlir/test/Target/LLVMIR/nvvm/tcgen05-mma-sp-tensor.mlir
+128-128mlir/test/Target/LLVMIR/nvvm/tma_store_reduce.mlir
+29-203mlir/test/Target/LLVMIR/nvvm/mma-sparse-blockscale.mlir
+1,229-805100 files not shown
+3,505-4,033106 files

LLVM/project 82b12a8llvm/test/CodeGen/X86 pdep-vector-128.ll pext-vector-128.ll

[DAG] expandPEXT/PDEP - scalarize vector instructions if the scalar type is legal (#216567)

If the scalar instruction is legal, just unroll (scalarize) - similar to
what a lot of other generic expansions already do.

Helps x86/BMI2 targets at least for vXi32/i64 types - there's more we
can do to address vXi8/i16 types and slow-PDEP/PEXT cases (znver1/2
etc.) but they can be addressed later with x86 specific lowering after
we have the generic base in place.

Fixes #214508
DeltaFile
+226-822llvm/test/CodeGen/X86/pext-vector-512.ll
+227-816llvm/test/CodeGen/X86/pdep-vector-512.ll
+111-460llvm/test/CodeGen/X86/pext-vector-256.ll
+111-453llvm/test/CodeGen/X86/pdep-vector-256.ll
+48-328llvm/test/CodeGen/X86/pext-vector-128.ll
+47-320llvm/test/CodeGen/X86/pdep-vector-128.ll
+770-3,1991 files not shown
+778-3,1997 files

LLVM/project 3d3203aclang/lib/CIR/Dialect/Transforms CIRSimplify.cpp, clang/test/CIR/Transforms constant-load-fold.cpp constant-load-fold.cir

[CIR] Fold load from constant alloca slots (#212284)

This patch folds non-volatile non-atomic `cir.load` operation that loads
from a constant alloca slot into the initial value stored into that
slot, if the initialization dominates the load.

This effectively enables "constant folding" at the C/C++ language level.
Consider the following C/C++ source program:

```cpp
int g();
void use(int);

void h(const int *);   // <-- The body of h is external.
void f() {
  const int x = g();
  h(&x);
  use(x);
}

    [8 lines not shown]
DeltaFile
+140-0clang/test/CIR/Transforms/constant-load-fold.cir
+97-0clang/lib/CIR/Dialect/Transforms/CIRSimplify.cpp
+38-0clang/test/CIR/Transforms/constant-load-fold.cpp
+275-03 files

LLVM/project 4c5182ellvm/include/llvm/Transforms/Vectorize/SandboxVectorizer Scheduler.h DependencyGraph.h, llvm/lib/Transforms/Vectorize/SandboxVectorizer Scheduler.cpp DependencyGraph.cpp

[SandboxVec][DAG][NFC] Replace UnscheduledSuccs/Preds with a single variable (#215364)

This is a cleanup patch that replaces the two DAG node unscheduled
dependency counters (that is UnscheduledSuccs and UnscheduledPreds) with
a single one named UnscheduledDeps.

The reasoning is that scheduling operates on one direction at a time so
if we are scheduling bottom-up then we only need the unscheduled
successors, and if we schedule top-down then we only need the
unscheduled predecessors.
DeltaFile
+218-122llvm/unittests/Transforms/Vectorize/SandboxVectorizer/DependencyGraphTest.cpp
+32-39llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h
+25-17llvm/lib/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.cpp
+10-13llvm/lib/Transforms/Vectorize/SandboxVectorizer/Scheduler.cpp
+6-9llvm/unittests/Transforms/Vectorize/SandboxVectorizer/SchedulerTest.cpp
+1-4llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Scheduler.h
+292-2046 files

LLVM/project 860fcb7clang/test/CodeGen/Sparc variadic-aggregate.c

[Sparc][NFC] test sparc variadic aggregate handling (#216521)

equivalent of https://github.com/llvm/llvm-project/pull/216509 for
sparc. It similarly has some bugs passing aggregates with floats.
DeltaFile
+1,015-0clang/test/CodeGen/Sparc/variadic-aggregate.c
+1,015-01 files

LLVM/project e65f3c1clang/include/clang/Basic DiagnosticSemaKinds.td, clang/lib/Sema SemaExprCXX.cpp

[Clang] Accept auto casts pre-C++23 as an extension (#200675)

GCC already supports this as an extension pre-C++23. It is also useful
for libc++ to replace `_LIBCPP_AUTO_CAST`.

Fixes #115609
DeltaFile
+22-21clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.auto.deduct/p2.cpp
+19-18clang/test/CXX/expr/expr.post/expr.type.conv/p1-2b.cpp
+10-15clang/test/Parser/cxx2b-auto-x.cpp
+3-4clang/lib/Sema/SemaExprCXX.cpp
+4-3clang/test/Parser/cxx1z-decomposition.cpp
+2-3clang/include/clang/Basic/DiagnosticSemaKinds.td
+60-647 files not shown
+68-7213 files

LLVM/project c27a08alibcxx/include tuple, libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply make_from_tuple.pass.cpp

[libc++] Simplify the implementation of std::make_from_tuple (#215067)

This does two major things:
1) It removes conditionals for C++20/pre-C++20. I don't understand why
this has ever been done. This made the implementation significantly more
complicated without any indication that it actually improved anything.
2) std::apply is used for expanding the tuple
DeltaFile
+28-51libcxx/include/tuple
+0-39libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp
+28-902 files

LLVM/project 2d70006compiler-rt/test/asan/TestCases invalid-pointer-pairs-vector-extract.cpp

[ASan] Add xfail test for PR #213546 (#216532)

Add xfail test for PR #213546
DeltaFile
+35-0compiler-rt/test/asan/TestCases/invalid-pointer-pairs-vector-extract.cpp
+35-01 files

LLVM/project df9a00dclang/include/clang/CIR MissingFeatures.h, clang/lib/CIR/CodeGen/Targets NVPTX.cpp

[CIR][NVPTX] Handle CUDALaunchBoundsAttr (#216447)

Source(s):
*
https://github.com/llvm/llvm-project/blob/34cce43ff1918e621ab08411fa7bc0e2ac4165b4/clang/lib/CodeGen/Targets/NVPTX.cpp#L242

*
https://github.com/llvm/llvm-project/blob/34cce43ff1918e621ab08411fa7bc0e2ac4165b4/clang/test/CodeGenCUDA/launch-bounds.cu#L4
DeltaFile
+193-0clang/test/CIR/CodeGenCUDA/launch-bounds.cu
+40-2clang/lib/CIR/CodeGen/Targets/NVPTX.cpp
+0-1clang/include/clang/CIR/MissingFeatures.h
+233-33 files

LLVM/project 09e459bllvm/lib/Target/X86 X86InstrInfo.cpp, llvm/test/CodeGen/X86 optimize-compare-undef.mir

X86: Fix optimizeCompareInstr crash on a compare from an undef register (#216540)
DeltaFile
+23-0llvm/test/CodeGen/X86/optimize-compare-undef.mir
+2-1llvm/lib/Target/X86/X86InstrInfo.cpp
+25-12 files

LLVM/project ee7f9bclldb/source/Utility Log.cpp, lldb/unittests/Utility LogTest.cpp

[lldb] Fix invalid UTF-8 in JSON log message (#216185)

Enabling the JSON packet log part way through a session aborts an
assertions build:

```
(lldb) b f
(lldb) run
(lldb) log enable -j -f /tmp/pk.json gdb-remote packets
(lldb) next
Assertion failed: (false && "Invalid UTF-8 in value used as JSON"), function Value, file JSON.h, line 333.
```

`Log::EmitJSONMessage` passed the message straight to
`llvm::json::Value`,
which asserts on ill-formed UTF-8 and only then falls back to `fixUTF8`.
So a release build repairs the message while an assertions build dies.

The bytes come from the saved packets.  Once logging is turned on,

    [10 lines not shown]
DeltaFile
+29-0lldb/unittests/Utility/LogTest.cpp
+5-1lldb/source/Utility/Log.cpp
+34-12 files

LLVM/project ad7345allvm/lib/CodeGen PeepholeOptimizer.cpp, llvm/test/CodeGen/X86 peephole-valuetracker-undef.mir

PeepholeOpt: Fix crash on copy from an undef register (#216539)
DeltaFile
+17-0llvm/test/CodeGen/X86/peephole-valuetracker-undef.mir
+5-2llvm/lib/CodeGen/PeepholeOptimizer.cpp
+22-22 files

LLVM/project e6b3396clang/lib/AST/ByteCode InterpBuiltin.cpp, clang/test/AST/ByteCode builtin-functions.cpp

[clang][bytecode] check reduce_min element type (#216536)

Only integer types are allowed.
DeltaFile
+5-0clang/test/AST/ByteCode/builtin-functions.cpp
+3-0clang/lib/AST/ByteCode/InterpBuiltin.cpp
+8-02 files

LLVM/project 044118fclang/lib/Sema SemaTemplateDeduction.cpp SemaTemplateInstantiateDecl.cpp, clang/test/CXX/temp/temp.decls/temp.friend p5.cpp

Revert "[Clang] Support friend declarations with a dependent nested-name-specifier" (#216549)

Reverts llvm/llvm-project#208345

---

Revert dependent friend support due to GCC build failure
DeltaFile
+13-1,089clang/test/CXX/temp/temp.decls/temp.friend/p5.cpp
+105-685clang/lib/Sema/SemaAccess.cpp
+122-298clang/lib/Sema/SemaDeclCXX.cpp
+74-336clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+0-263clang/test/SemaTemplate/dependent-friend-constraints.cpp
+37-191clang/lib/Sema/SemaTemplateDeduction.cpp
+351-2,86258 files not shown
+743-3,98564 files

LLVM/project 8c64b15llvm/lib/Transforms/Vectorize VectorCombine.cpp, llvm/test/Transforms/VectorCombine load-insert-store-invariant-group.ll

[VectorCombine] Drop invariant.group from scalarized stores (#212473)

!invariant.group is tied to a pointer SSA value, so it cannot be copied
from a vector store to a scalar store that uses a newly created GEP.
Drop the metadata after copying the remaining store metadata and update
the regression expectations.

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

Assisted-by: Codex
DeltaFile
+62-0llvm/test/Transforms/VectorCombine/load-insert-store-invariant-group.ll
+3-0llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+65-02 files

LLVM/project f63a0e9clang/lib/AST/ByteCode Compiler.cpp, clang/test/AST/ByteCode cxx23.cpp

[clang][bytecode] Fix assertion failure in in valid continue stmt (#216547)

We need to handle the missing TargetLabel here, similarly to what we do
in break statements.
DeltaFile
+13-0clang/test/AST/ByteCode/cxx23.cpp
+3-1clang/lib/AST/ByteCode/Compiler.cpp
+16-12 files

LLVM/project cbd8145mlir/include/mlir/Dialect/LLVMIR LLVMAttrDefs.td, mlir/lib/Dialect/LLVMIR/IR LLVMAttrs.cpp

[MLIR][LLVM] Preserve pointer-valued metadata operands on import (#215743)

convertMetadataToAttrImpl only modelled ConstantInt operands wrapped in
a ConstantAsMetadata, so any metadata node containing a pointer constant
could not be represented and the whole node was rejected.

Add #llvm.md_null and #llvm.md_addrspacecast to model
ConstantPointerNull and addrspacecast constant expressions, keeping the
address space so that `ptr null` and `ptr addrspace(1) null` stay
distinct. MDAddrSpaceCastAttr verifies that its operand is itself
pointer-valued metadata.

Global values are constants, so ValueAsMetadata::get wraps them in a
ConstantAsMetadata and they never reached the ValueAsMetadata case.
Match them in the ConstantAsMetadata case instead, which also
generalizes the existing function-only handling to any named global
value and makes the addrspacecast operand representable.

Mirror both attributes in ModuleTranslation::convertMetadataAttr so the

    [6 lines not shown]
DeltaFile
+70-0mlir/test/Target/LLVMIR/Import/intrinsic-unregistered.ll
+42-3mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td
+22-6mlir/lib/Target/LLVMIR/ModuleImport.cpp
+17-0mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
+16-0mlir/test/Dialect/LLVMIR/invalid.mlir
+16-0mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp
+183-92 files not shown
+203-98 files

LLVM/project 97ef3d4llvm/lib/Transforms/InstCombine InstCombineShifts.cpp, llvm/test/Transforms/InstCombine shift-cttz-ctlz.ll shift.ll

[InstCombine] Fold shl of constant by cttz into multiply of lowest set bit (#214517)

Currently, `C << cttz(X, true)` generates a DeBruijn lookup table on
RV64I (13 instructions).
And this patch adds a fold in InstCombine:
  `C << cttz(X, true)  -->  (-X & X) * C`
This reduces the instruction count from 13 to 3 on RV64I.
The fold requires that cttz has a single use (to avoid increasing
instruction count)

Alive2 proof: https://alive2.llvm.org/ce/z/TmWxrT
DeltaFile
+82-2llvm/test/Transforms/InstCombine/shift.ll
+11-0llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
+6-4llvm/test/Transforms/InstCombine/shift-cttz-ctlz.ll
+99-63 files

LLVM/project 4d18b27clang/lib/Driver/ToolChains CommonArgs.cpp, clang/test/Driver cuda-flush-denormals-to-zero.cu amdgpu-xnack-sramecc-flags.c

clang/AMDGPU: Stop passing redundant -target-cpu to cc1

Now that the exact target is encoded in the triple's subarch field,
-target-cpu is redundant. This avoids polluting the resultant IR with
unwanted "target-cpu" attributes. The net result is the desired codegen
when compiling libraries for a major subarch and linking it into a
program compiled for a specific arch. e.g., compiling for "gfx9-generic"
would pollute the IR with "target-cpu"="gfx9-generic", so codegen
would ultimately be performed for the generic target even after
linking into the concrete gfx9 cpu. The specialization will now be
achieved by merging the triples without the linker or optimization
passes needing to fixup function attributes.
DeltaFile
+62-62clang/test/Driver/amdgpu-mcpu.cl
+26-26clang/test/Driver/hip-sanitize-options.hip
+12-16clang/test/Driver/hip-rdc-device-only.hip
+19-7clang/lib/Driver/ToolChains/CommonArgs.cpp
+10-10clang/test/Driver/amdgpu-xnack-sramecc-flags.c
+6-6clang/test/Driver/cuda-flush-denormals-to-zero.cu
+135-12726 files not shown
+189-20832 files

LLVM/project 74c1dccllvm/include/llvm/TargetParser AMDGPUTargetParser.h, llvm/lib/Target/AMDGPU AMDGPUTargetParser.td GCNProcessors.td

AMDGPU: Start using subarch in attributor instead of subtarget

Avoid querying the subtarget for functions when the relevant
properties are known from the triple. The various subtarget
group size functions should also be decoupled from the subtarget,
but those are trickier to untangle.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+26-18llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp
+9-9llvm/lib/Target/AMDGPU/GCNProcessors.td
+15-1llvm/include/llvm/TargetParser/AMDGPUTargetParser.h
+10-0llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+2-0llvm/lib/Target/AMDGPU/AMDGPUTargetParser.td
+62-285 files

LLVM/project 75e3236clang/lib/Driver Driver.cpp, clang/lib/Driver/ToolChains CommonArgs.cpp

clang: Start using new amdgpu subarch triples

Fixup invocations using --target=amdgcn + -mcpu to introduce
the subarch in the triple.

For offload toolchains, a single toolchain is constructed for the
top level amdgpu architecture, and the effective triple is used for
target specific tool invocations.

The specifics of the resource directory layout are tbd. This does
try to find resources in the subarch named directory. The paths
are searched at toolchain creation time, so that does not work
when there are multiple subarches.

Fixes #154925
DeltaFile
+59-59clang/test/Driver/offload-arch-translation-amdgpu.cu
+43-43clang/test/Driver/hip-phases.hip
+33-33clang/test/Driver/hip-binding.hip
+48-14clang/lib/Driver/ToolChains/CommonArgs.cpp
+43-12clang/lib/Driver/Driver.cpp
+54-0clang/test/CodeGen/amdgpu-builtin-processor-is-subarch.c
+280-161104 files not shown
+992-497110 files

LLVM/project 57a04e1clang/lib/Sema SemaTemplateDeduction.cpp SemaTemplateInstantiateDecl.cpp, clang/test/CXX/temp/temp.decls/temp.friend p5.cpp

Revert "[Clang] Support friend declarations with a dependent nested-name-spec…"

This reverts commit 0b672437c396b700fdb94bd64b176b33f084053b.
DeltaFile
+13-1,089clang/test/CXX/temp/temp.decls/temp.friend/p5.cpp
+105-685clang/lib/Sema/SemaAccess.cpp
+122-298clang/lib/Sema/SemaDeclCXX.cpp
+74-336clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+0-263clang/test/SemaTemplate/dependent-friend-constraints.cpp
+37-191clang/lib/Sema/SemaTemplateDeduction.cpp
+351-2,86258 files not shown
+743-3,98564 files