LLVM/project 95da135libc/config/windows config.json, libc/src/stdio/printf_core char_converter.h parser.h

Revert "[libc] Support %lc in printf (#169983)"

This reverts commit 1327c50ef199b481f5326cf6ca3710fc111b70b1.

The printf headers are intended to be header-only, this introduces
external symbol dependencies.
DeltaFile
+1-97libc/test/src/stdio/sprintf_test.cpp
+6-44libc/src/stdio/printf_core/char_converter.h
+5-27libc/src/stdio/printf_core/parser.h
+0-19libc/src/stdio/printf_core/CMakeLists.txt
+0-10libc/test/src/stdio/CMakeLists.txt
+0-8libc/config/windows/config.json
+12-2056 files not shown
+12-22612 files

LLVM/project b1e4f26bolt/test/AArch64 epilogue-determination.s

[BOLT][AArch64] Fix epilogue-determination test (#175668)

Define jump table for each function, for conformance and better clarity.
DeltaFile
+6-1bolt/test/AArch64/epilogue-determination.s
+6-11 files

LLVM/project d1aaa49clang/lib/AST ExprConstant.cpp, clang/lib/Sema SemaExprCXX.cpp

Use setExprNeedsCleanups in BuildCXXNew and avoid breaking c++98

This approach is much cleaner, but broke checkICE reporting in c++98.
Stepping through a debugger shows that this happend because the
static_assert test didn not recognize ExprWithCleanups as transparent to
constant evaluation. To addresse this, we update CheckICE to recurse
into the sub-expression, and keep the old behavior.
DeltaFile
+4-15clang/lib/Sema/SemaExprCXX.cpp
+4-1clang/lib/AST/ExprConstant.cpp
+8-162 files

LLVM/project 0b783f5clang/lib/CodeGen CoverageMappingGen.cpp

[MC/DC] Refactor MCDCCoverageBuilder. NFC. (#125409)

- Get rid of the old `DecisionStack` and dissolve it into push/pop
`CurCondIDs` in `VisitBin`, since `VisitBin` is recursive.

- Introduce the new `DecisionStack` with `DecisionState` to handle the
current `Decision` in nested `Decision`s.
  - The stack has the sentinel that has `DecisionExpr = nullptr`.
- Split out `checkDecisionRootOrPush` from `pushAndAssignIDs` for
non-BinOp. It assigns `CondID` to `E` (instead of assignment LHS in
`pushAndAssignIDs`).
  - The stack is manupilated at the top Decision operator in `VisitBin`.
- The stack grows at the entrance of the Decision with the initial
state.
- In the same level in `VisitBin`, the stack is popped and the
`Decision` record is emitted.
- Introduce `DecisionEndToSince` to sweep `MCDCBranch`es partially in
`cancelDecision`.
DeltaFile
+185-126clang/lib/CodeGen/CoverageMappingGen.cpp
+185-1261 files

LLVM/project 34cec75llvm/include/llvm/IR GlobalObject.h

LLVM_ABI

Created using spr 1.3.6-beta.1
DeltaFile
+1-1llvm/include/llvm/IR/GlobalObject.h
+1-11 files

LLVM/project 7e3e2c7llvm/include/llvm/IR GlobalObject.h, llvm/lib/CodeGen GlobalMerge.cpp

Format

Created using spr 1.3.6-beta.1
DeltaFile
+1-1llvm/include/llvm/IR/GlobalObject.h
+1-1llvm/lib/CodeGen/GlobalMerge.cpp
+2-22 files

LLVM/project ad71dbdllvm/include/llvm/IR GlobalObject.h, llvm/lib/CodeGen GlobalMerge.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.6-beta.1
DeltaFile
+3-12llvm/lib/Transforms/IPO/ConstantMerge.cpp
+15-0llvm/test/Transforms/GlobalMerge/metadata1.ll
+15-0llvm/test/Transforms/GlobalMerge/metadata2.ll
+10-0llvm/lib/CodeGen/GlobalMerge.cpp
+9-0llvm/lib/IR/Globals.cpp
+2-0llvm/include/llvm/IR/GlobalObject.h
+54-126 files

LLVM/project 7584c28clang/include/clang/CIR/Dialect/IR CIRAttrs.td, clang/lib/CIR/Dialect/IR CIRAttrs.cpp

[CIR] Upstream CIR method attribute handling (#174640)

This adds code for generating cir.method attributes and lowering them to
LLVM IR to implement support the C++ method pointer variables.
DeltaFile
+57-0clang/include/clang/CIR/Dialect/IR/CIRAttrs.td
+52-0clang/lib/CIR/Dialect/Transforms/TargetLowering/LowerItaniumCXXABI.cpp
+45-0clang/lib/CIR/Dialect/IR/CIRAttrs.cpp
+41-0clang/test/CIR/IR/method-attr.cir
+21-20clang/test/CIR/CodeGen/pointer-to-member-func.cpp
+13-6clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+229-266 files not shown
+264-3112 files

LLVM/project beb2e59llvm/docs MemProf.rst

[docs][MemProf]Update compiler options for static data partitioning
DeltaFile
+16-5llvm/docs/MemProf.rst
+16-51 files

LLVM/project 386d939clang/include/clang/Basic OpenCLExtensions.def, clang/lib/Headers opencl-c.h opencl-c-base.h

[OpenCL] Set KHR extensions minimum version to OpenCL 1.0 (#175120)

Motivation is similar to 25cfdaa4e9dc. Their spec don't specify a
required OpenCL version. Targets may expose them before OpenCL 1.2.
Set KHR extensions (depth images, mipmaps, subgroups, kernel clock, dot
product, ext_float_atomics, extended_bit_ops, cles_khr_int64) to
availability 1.0.
Changes to opencl-c.h:
* Relax header and test guards to allow extension macros whenever any
OpenCL C version is defined.
* Relax cl_khr_depth_images guard to allow cl_khr_depth_images, OpenCL
C++, or OpenCL C 2.0+, since image2d_depth_t and image2d_array_depth_t
types require that coverage.
* Guard image1d_t, image1d_array_t and image2d_array_t types with OpenCL
C++ or OpenCL C 1.2+ to match with OpenCL C spec.

Relates to https://github.com/KhronosGroup/OpenCL-CTS/pull/2376.
DeltaFile
+134-85clang/lib/Headers/opencl-c.h
+177-13clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl
+110-60clang/test/Headers/opencl-c-header.cl
+19-21clang/include/clang/Basic/OpenCLExtensions.def
+20-20clang/test/SemaOpenCL/extension-version.cl
+7-0clang/lib/Headers/opencl-c-base.h
+467-1992 files not shown
+470-2028 files

LLVM/project fb0653clldb/source/DataFormatters ValueObjectPrinter.cpp, lldb/test/API/lang/objc/failing-description TestObjCFailingDescription.py

[lldb] Change po fallback messaging (#175847)

When an object description expression fails, instead of emitting an error, mark it as a
warning instead. Additionally, send the more low level details of the failure to the
`expr` log, and show a more user friendly message:

> `po` was unsuccessful, running `p` instead

rdar://165190497
DeltaFile
+19-2lldb/test/API/lang/objc/struct-description/TestObjCStructDescription.py
+16-2lldb/test/API/lang/objc/failing-description/TestObjCFailingDescription.py
+5-2lldb/source/DataFormatters/ValueObjectPrinter.cpp
+40-63 files

LLVM/project 9f7af28llvm/lib/Target/LoongArch LoongArchInstrInfo.td LoongArchExpandPseudoInsts.cpp, llvm/lib/Target/LoongArch/AsmParser LoongArchAsmParser.cpp

[llvm][LoongArch] Add call and tail macro instruction support (#175357)

Link:
https://sourceware.org/pipermail/binutils/2025-December/146091.html
DeltaFile
+43-14llvm/test/MC/LoongArch/Macros/macros-call.s
+21-15llvm/lib/Target/LoongArch/LoongArchInstrInfo.td
+21-10llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp
+7-0llvm/lib/Target/LoongArch/AsmParser/LoongArchAsmParser.cpp
+2-2llvm/lib/Target/LoongArch/LoongArchTargetMachine.cpp
+1-2llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+95-432 files not shown
+97-458 files

LLVM/project 1478d7eclang/lib/CodeGen CGCall.cpp, clang/lib/Sema SemaExprCXX.cpp

[clang] Use uniform lifetime bounds under exceptions

To do this we have to slightly modify how some expressions are handled
in Sema. Principally, we need to ensure that calls to new for
non-trivial types still have their destructors run. Generally this isn't
an issue, since these just get sunk into the surrounding scope. With
more lifetime annotations being produced for the expressions, we found
that some calls to `new` in an unreachable switch arm would not be
wrapped in ExprWithCleanups. As a result, they remain on the EhStack
when processing the default label, and since the dead arm doesn't
dominate the default label, we can end up with a case where the def-use
chain is broken (e.g. the def doesn't dominate all uses). Technically
this path would be impossible to reach due to the active bit, but it
still failed to satisfy a dominance relationship.

With that in place, we can remove the constraint on only using tighter
lifetimes when exceptions are disabled.
DeltaFile
+29-14clang/test/CodeGenCXX/aggregate-lifetime-invoke.cpp
+28-7clang/test/CodeGen/lifetime-bug.cpp
+15-1clang/lib/Sema/SemaExprCXX.cpp
+4-4clang/test/CodeGen/lifetime-invoke-c.c
+1-4clang/lib/CodeGen/CGCall.cpp
+77-305 files

LLVM/project 65040d7clang/lib/CodeGen CGCall.cpp CGCall.h, clang/test/CodeGen stack-usage-lifetimes.c lifetime-invoke-c.c

[clang] Use tighter lifetime bounds for C temporary arguments

In C, consecutive statements in the same scope are under
CompoundStmt/CallExpr, while in C++ they typically fall under
CompoundStmt/ExprWithCleanup. This leads to different behavior with
respect to where pushFullExprCleanUp inserts the lifetime end markers
(e.g., at the end of scope).

For these cases, we can track and insert the lifetime end markers right
after the call completes. Allowing the stack space to be reused
immediately. This partially addresses #109204 and #43598 for improving
stack usage.
DeltaFile
+89-0clang/test/CodeGen/stack-usage-lifetimes.c
+22-10clang/lib/CodeGen/CGCall.cpp
+19-0clang/lib/CodeGen/CGCall.h
+1-1clang/test/CodeGen/lifetime-invoke-c.c
+1-1clang/test/CodeGenCXX/aggregate-lifetime-invoke.cpp
+1-1clang/test/CodeGenCXX/stack-reuse-miscompile.cpp
+133-131 files not shown
+134-147 files

LLVM/project f674fa3clang/test/CodeGen lifetime-bug-2.c

Remove test that no longer repros error case

Something changed w/in clang to prevent this crash from happening.
DeltaFile
+0-58clang/test/CodeGen/lifetime-bug-2.c
+0-581 files

LLVM/project 0ad931bllvm/test/Transforms/LoopVectorize tripcount.ll

[NFC] use UTC for LoopVectorize/tripcount.ll
DeltaFile
+213-29llvm/test/Transforms/LoopVectorize/tripcount.ll
+213-291 files

LLVM/project fc34923llvm/lib/Transforms/Vectorize VPlan.cpp LoopVectorize.cpp, llvm/test/Transforms/LoopVectorize tripcount.ll

capture weights
DeltaFile
+23-6llvm/lib/Transforms/Vectorize/VPlan.cpp
+9-6llvm/test/Transforms/LoopVectorize/tripcount.ll
+2-0llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+34-123 files

LLVM/project 0f24d0flldb/source/Plugins/Language/CPlusPlus LibStdcppTuple.cpp, lldb/unittests/Language/CPlusPlus LibStdcppTupleTest.cpp CMakeLists.txt

[lldb] Fix null pointer crash in LibStdcppTupleSyntheticFrontEnd::Update (#175700)

When displaying a backtrace with std::tuple function arguments,
GetChildAtIndex() can return a null ValueObjectSP. The code was
dereferencing this pointer without checking for null, causing a SIGSEGV
crash when LLDB tried to pretty-print function arguments containing
tuples.


This PR fix the crash and add unit test which would crash before this PR
and only pass after this PR.

---------

Co-authored-by: George Hu <georgehuyubo at gmail.com>
Co-authored-by: Jonas Devlieghere <jonas at devlieghere.com>
DeltaFile
+167-0lldb/unittests/Language/CPlusPlus/LibStdcppTupleTest.cpp
+4-0lldb/unittests/Language/CPlusPlus/CMakeLists.txt
+2-0lldb/source/Plugins/Language/CPlusPlus/LibStdcppTuple.cpp
+173-03 files

LLVM/project 8fa680bllvm/include/llvm/CodeGen MachineFunction.h, llvm/lib/CodeGen MachineInstr.cpp

[win][aarch64] Called globals must match for instructions to be considered identical (#175798)

When trying to enable AArch64 Import Call Optimization for Windows, we
noticed an issue where a call to an incorrect function was happening
after the loader replaced a branch instruction. The root cause of this
was that LLVM had decided to fold two branch instructions into one as
they were both branches to the same register, however the value of the
register would be different in either path as they were branches for
different imported functions.

This change updates `MachineInstr::isIdenticalTo` to also consider any
"called global" that is attached to the instruction, and will consider
two instructions as "not the same" if the globals differ.

Also fixed a possible source of non-determinism: switched from using a
`DenseMap` to using a `vector` for mapping sections to lists of called
globals (we don't expect many sections, so no need to use a map) and
sort the map by section name before emitting.
DeltaFile
+53-16llvm/test/CodeGen/AArch64/win-import-call-optimization.ll
+16-3llvm/lib/CodeGen/MachineInstr.cpp
+1-1llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
+2-0llvm/include/llvm/CodeGen/MachineFunction.h
+72-204 files

LLVM/project 02984cfclang/lib/CIR/CodeGen CIRGenExprScalar.cpp, clang/lib/CIR/Dialect/Transforms CIRCanonicalize.cpp

[CIR] Attempt to fold casts and unary ops during codegen (#175675)

This change introduces basic folding of casts and unary ops as they are
created this is needed in order to allow later codegen pieces, such as
builtin handlers, to more easily identify and examine constant operands.
For example, many X86 builtin functions use a default mask operand of
-1, which was previously generated as a constant 1 and a unary minus.

In some cases, the folding process leaves behind unused constant
operations, so I am also added a simple change to the canonicalize pass
to remove unused constants. We had other places where unused constants
were being generated already, and this change cleans those up too.
DeltaFile
+259-0clang/test/CIR/CodeGen/fold-during-cg.c
+0-13clang/test/CIR/CodeGen/new.cpp
+5-5clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
+0-6clang/test/CIR/CodeGenBuiltins/X86/avx512f-builtins.c
+1-1clang/lib/CIR/Dialect/Transforms/CIRCanonicalize.cpp
+0-1clang/test/CIR/CodeGen/binassign.c
+265-262 files not shown
+265-288 files

LLVM/project 9cb2254llvm/docs AMDGPUUsage.rst, llvm/test/CodeGen/AMDGPU global-atomicrmw-fadd.ll memory-legalizer-flat-system.ll

[AMDGPU] Update gfx1250 memory model for global acquire/release

Inserts required waits around GLOBAL_INV/GLOBAL_WBINV for
agent scope and above.
DeltaFile
+464-41llvm/docs/AMDGPUUsage.rst
+224-0llvm/test/CodeGen/AMDGPU/global-atomicrmw-fadd.ll
+184-18llvm/test/CodeGen/AMDGPU/memory-legalizer-flat-system.ll
+184-18llvm/test/CodeGen/AMDGPU/memory-legalizer-flat-agent.ll
+182-18llvm/test/CodeGen/AMDGPU/memory-legalizer-private-agent.ll
+170-18llvm/test/CodeGen/AMDGPU/memory-legalizer-private-system.ll
+1,408-11314 files not shown
+2,057-16320 files

LLVM/project 4a8ecccmlir/lib/Dialect/XeGPU/Transforms XeGPUBlocking.cpp, mlir/test/Dialect/XeGPU xegpu-blocking.mlir

[MLIR][XeGPU] Pass inst_data for blocking create/constant Mask and Step op (#175456)

DeltaFile
+53-0mlir/test/Dialect/XeGPU/xegpu-blocking.mlir
+2-1mlir/lib/Dialect/XeGPU/Transforms/XeGPUBlocking.cpp
+55-12 files

LLVM/project 64430b4clang/test/CodeGenCXX pragma-gcc-unroll.cpp pragma-unroll.cpp

[clang][CodeGenCXX] Fix pragma unroll test patterns (NFC) (#175860)

These tests were not testing the loop metadata that they suggest to be
testing. They would define FileCheck variables such as `UNROLL_8` for
metadata nodes and then later redefine instead of use them (redefinition
always succeeds and thus checks nothing). The error was likely
introduced because the earlier loop metadata nodes, which must define
the variables at the first occurrence, were copy-pasted for later loop
metadata nodes, without realizing that the variable definitions in the
FileCheck pattern must be changed to uses to match later occurrences of
the same metadata node. By matching the metadata section with a block of
DAG patterns, we can define variables such as `UNROLL_8` with a pattern
that matches at the metadata node definition, even if it occurs later,
and the loop metadata nodes can be matched with uniform patterns. This
system is also used in the `pragma-loop.cpp` test.
DeltaFile
+18-15clang/test/CodeGenCXX/pragma-gcc-unroll.cpp
+18-15clang/test/CodeGenCXX/pragma-unroll.cpp
+36-302 files

LLVM/project 93c9d54mlir/include/mlir/Dialect/ArmSME/IR ArmSMEIntrinsicOps.td, mlir/test/Target/LLVMIR arm-sme.mlir

fixup! [AArch64][llvm] Improve codegen for svldr_vnum_za/svstr_vnum_za

Fix MLIR tests
DeltaFile
+2-1mlir/test/Target/LLVMIR/arm-sme.mlir
+1-1mlir/include/mlir/Dialect/ArmSME/IR/ArmSMEIntrinsicOps.td
+3-22 files

LLVM/project fcf83c0clang/lib/CodeGen/TargetBuiltins ARM.cpp, clang/test/CodeGen/AArch64/sme-intrinsics acle_sme_str.c acle_sme_ldr.c

[AArch64][llvm] Improve codegen for svldr_vnum_za/svstr_vnum_za

When compiling `svldr_vnum_za` or `svstr_vnum_za`, the output
assembly has a superfluous `SXTW` instruction (gcc doesn't add
this); this should be excised, see https://godbolt.org/z/sz4s79rf8

In clang we're using int64_t, and `i32` in llvm. The extra `SXTW`
is due to a call to `DAG.getNode(ISD::SIGN_EXTEND...)`. Make them
both 64bit to make the extra `SXTW` go away.
DeltaFile
+56-62llvm/test/CodeGen/AArch64/sme-intrinsics-stores.ll
+56-62llvm/test/CodeGen/AArch64/sme-intrinsics-loads.ll
+8-8llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+5-6clang/test/CodeGen/AArch64/sme-intrinsics/acle_sme_str.c
+5-6clang/test/CodeGen/AArch64/sme-intrinsics/acle_sme_ldr.c
+2-2clang/lib/CodeGen/TargetBuiltins/ARM.cpp
+132-1461 files not shown
+133-1477 files

LLVM/project feeb934clang-tools-extra Maintainers.rst

[clang-tools-extra] Update Maintainers for Clang-Doc (#175822)

Currently, Erick Velez has been doing the bulk of clang-doc development.
We're also moving one of the old maintainers that hasn't participated in
almost a year to inactive.
DeltaFile
+3-2clang-tools-extra/Maintainers.rst
+3-21 files

LLVM/project b2c7e73llvm/include/llvm/ADT STLForwardCompat.h, llvm/include/llvm/Support Compiler.h

[ADT] Hide no_unique_address behind a macro (#175841)

This attribute was introduced in C++20 and not available across all compilers.
DeltaFile
+8-0llvm/include/llvm/Support/Compiler.h
+2-2llvm/include/llvm/ADT/STLForwardCompat.h
+10-22 files

LLVM/project 9fc7c42llvm/lib/Target/AArch64 AArch64LoadStoreOptimizer.cpp, llvm/test/CodeGen/AArch64 ldst-implicitop.mir

[AArch64] Let LoadStoreOptimizer handle renamable implicit-defs. (#174186)

The LoadStoreOptimizer is very conservative with handling instructions
that have implicit-def operands and only support them for 2
instructions. However, they can be considered when a MachineOperand is
marked explicitly as 'renamable'.
DeltaFile
+29-0llvm/test/CodeGen/AArch64/ldst-implicitop.mir
+5-5llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
+34-52 files

LLVM/project 0133247llvm/test/CodeGen/AArch64 sve-streaming-mode-fixed-length-trunc.ll sve-streaming-mode-fixed-length-int-shifts.ll

[AArch64] Enable subreg liveness tracking for streaming functions. (#174189)

Most use of subreg liveness tracking will be for streaming SME2
functions where it can use the strided- and contiguous form of the
multi-vector LD1, see #123081 for details.

Any regressions come from disabling coalescing of SUBREG_TO_REG when
sub-reg liveness tracking is enabled, which may introduce some scalar
`mov`s and may limit some peephole optimizations from the load-store
optimizer, but the impact of disabling coalescing seems limited in
practice (empirically from trying this on workloads) and we think the
regressions are offset by improvements to the handling of multi-vector
instructions (tuple registers) in SME2.

PR #174188 addresses these issues in a separate PR.
DeltaFile
+360-370llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-trunc.ll
+325-103llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-int-shifts.ll
+182-218llvm/test/CodeGen/AArch64/sme2-intrinsics-max.ll
+182-218llvm/test/CodeGen/AArch64/sme2-intrinsics-min.ll
+182-143llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-int-extends.ll
+92-152llvm/test/CodeGen/AArch64/sme2-intrinsics-mlall.ll
+1,323-1,204101 files not shown
+2,304-5,058107 files

LLVM/project e1d16d6llvm/test/MC/AMDGPU gfx8_asm_vop3.s gfx7_asm_vop3.s, llvm/test/MC/Disassembler/AMDGPU gfx9_vop3.txt

Merge branch 'main' into users/DataCorrupted/ExposeDirectMethod-thunk
DeltaFile
+42,349-42,348llvm/test/MC/AMDGPU/gfx8_asm_vop3.s
+41,419-41,418llvm/test/MC/AMDGPU/gfx7_asm_vop3.s
+36,428-36,427llvm/test/MC/AMDGPU/gfx9_asm_vop3.s
+28,175-28,174llvm/test/MC/AMDGPU/gfx9_asm_vopc.s
+22,708-22,884llvm/test/MC/Disassembler/AMDGPU/gfx9_vop3.txt
+22,276-22,275llvm/test/MC/AMDGPU/gfx8_asm_vopc.s
+193,355-193,5264,811 files not shown
+1,301,009-1,151,7624,817 files