LLVM/project d30aedelldb/source/Plugins/Process/Utility RegisterInfoPOSIXDynamic_riscv32.cpp lldb-riscv-register-enums.h, lldb/source/Utility RISCV_DWARF_Registers.h

[lldb][RISCV] Add CSRI patch set for 'Xqci' (#216087)

Add the CS register information patch set for Xqci and its
sub-extensions.
DeltaFile
+54-54lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py
+83-3lldb/source/Plugins/Process/Utility/RegisterInfos_riscv32.h
+67-0lldb/source/Utility/RISCV_DWARF_Registers.h
+67-0lldb/source/Plugins/Process/Utility/lldb-riscv-register-enums.h
+4-1lldb/source/Plugins/Process/Utility/RegisterInfoPOSIXDynamic_riscv32.cpp
+275-585 files

LLVM/project b5e62a2llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 non-matching-entry-find.ll

[SLP]Fix direction of the perfect diamond match for gather nodes

Poison lanes of the matched entry wildcard-matched real scalars of the
gather; the mask restore then failed to find them. Match the entry
against the expanded vector of the gather instead.

Fixes #219788

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/219798
DeltaFile
+74-0llvm/test/Transforms/SLPVectorizer/X86/non-matching-entry-find.ll
+12-2llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+86-22 files

LLVM/project e828491lldb/test/API/tools/lldb-dap/send-event TestDAP_sendEvent.py, lldb/tools/lldb-dap/Handler EvaluateRequestHandler.cpp

[lldb-dap] Return an error on evaluation failure (#219245)

We currently return an error response a command doesn't exist. We should
do the same when a command fails. This allow the client differentiate
failed commands and hint them properly.
DeltaFile
+18-5lldb/tools/lldb-dap/Handler/EvaluateRequestHandler.cpp
+3-2lldb/test/API/tools/lldb-dap/send-event/TestDAP_sendEvent.py
+21-72 files

LLVM/project e22a4a5clang/lib/AST/ByteCode Pointer.cpp

[clang][bytecode] Use a regular static function in `Pointer::toRValue()` (#219772)

Instead of the previous std::function, which was awkward due to
recursing.
DeltaFile
+143-144clang/lib/AST/ByteCode/Pointer.cpp
+143-1441 files

LLVM/project a8c3d92lld/MachO Driver.cpp SyntheticSections.cpp, lld/MachO/Arch ARM64.cpp

[lld][MachO] Support Objective-C class stubs

Teach Mach-O objc stubs to synthesize class-message stubs that load the class object, selector, and objc_msgSend target.

lld already supports the Apple clang _objc_msgSend$<selector> stub form, even though upstream clang does not currently expose a driver or cc1 flag for emitting it. Apple clang also emits _objc_msgSendClass$<selector>$_OBJC_CLASS_$_<class>; handling that form completes the existing selector-stub support.

Cover local classes, dylib classes, archives, dynamic lookup via -U, missing class symbols, malformed names, unsupported architectures, and dead stripping.
DeltaFile
+292-0lld/test/MachO/arm64-objc-class-stubs.s
+98-9lld/MachO/SyntheticSections.cpp
+92-0lld/MachO/Arch/ARM64.cpp
+75-0lld/test/MachO/arm64-objc-class-stubs-dead.s
+55-0lld/test/MachO/objc-class-stubs-unsupported.s
+32-6lld/MachO/Driver.cpp
+644-154 files not shown
+672-1610 files

LLVM/project e4cfb23lld/MachO Driver.cpp, lld/test/MachO arm64-objc-stubs-autolink.s

[lld][MachO] Fix ObjC stubs from autolinked archives

Move ObjC stub preparation after LC_LINKER_OPTION processing so archive members loaded via autolink can contribute _objc_msgSend$ selector stubs before selector references are built.

Previously those stubs missed __objc_methname setup; assert builds could fail in makeSelRef, and release builds could form an invalid selector reference.
DeltaFile
+35-0lld/test/MachO/arm64-objc-stubs-autolink.s
+2-1lld/MachO/Driver.cpp
+37-12 files

LLVM/project 3768ccflld/MachO Writer.cpp SyntheticSections.h

Address nocchijiang's comments
DeltaFile
+9-10lld/MachO/SyntheticSections.cpp
+2-0lld/MachO/SyntheticSections.h
+1-0lld/MachO/Writer.cpp
+12-103 files

LLVM/project 75aada2lld/MachO SyntheticSections.h SyntheticSections.cpp

[lld][MachO] Prepare ObjC stubs for variable sizes

Track ObjC stub sizes explicitly so future changes can mix different stub layouts in one synthetic section.
DeltaFile
+12-12lld/MachO/SyntheticSections.cpp
+3-2lld/MachO/SyntheticSections.h
+15-142 files

LLVM/project fcd4b92lld/MachO SyntheticSections.h Writer.cpp, lld/test/MachO objc-stubs-order-file-icf-safe-thunks.s objc-stubs-order-file.s

Addresd Ellis' comments
DeltaFile
+11-2lld/MachO/SyntheticSections.cpp
+1-11lld/MachO/Writer.cpp
+3-4lld/MachO/SyntheticSections.h
+1-4lld/test/MachO/objc-stubs-order-file.s
+0-3lld/test/MachO/objc-stubs-order-file-icf-safe-thunks.s
+16-245 files

LLVM/project dba8bfelld/MachO SyntheticSections.h SyntheticSections.cpp, lld/docs ReleaseNotes.md

[lld][MachO] Order objc stubs by caller priority

__objc_stubs is synthetic, so the input section sorting never reaches
its entries: they stay in symbol interning order even with -order_file.
A stub is faulted in when its caller runs, so stubs called from hot code
end up scattered across pages that startup otherwise never touches.

Record the sections that branch to each stub, give each stub the lowest
priority among its callers, and stable-sort the stubs before addresses
are assigned. Stubs with no prioritized caller keep their relative order
at the end.

General __stubs ordering is left alone because stubsIndex also drives
lazy pointers, indirect symbols, and bind/rebase offsets.

This reduces page faults in __objc_stubs by 40% for a large app.
DeltaFile
+90-0lld/test/MachO/objc-stubs-order-file.s
+63-0lld/test/MachO/objc-stubs-order-file-icf-safe-thunks.s
+50-0lld/MachO/Writer.cpp
+10-0lld/MachO/SyntheticSections.cpp
+5-0lld/MachO/SyntheticSections.h
+4-0lld/docs/ReleaseNotes.md
+222-06 files

LLVM/project d79f019lld/MachO Driver.cpp SyntheticSections.cpp, lld/MachO/Arch ARM64.cpp

[lld][MachO] Support Objective-C class stubs

Teach Mach-O objc stubs to synthesize class-message stubs that load the class object, selector, and objc_msgSend target.

lld already supports the Apple clang _objc_msgSend$<selector> stub form, even though upstream clang does not currently expose a driver or cc1 flag for emitting it. Apple clang also emits _objc_msgSendClass$<selector>$_OBJC_CLASS_$_<class>; handling that form completes the existing selector-stub support.

Cover local classes, dylib classes, archives, dynamic lookup via -U, missing class symbols, malformed names, unsupported architectures, and dead stripping.
DeltaFile
+292-0lld/test/MachO/arm64-objc-class-stubs.s
+98-9lld/MachO/SyntheticSections.cpp
+92-0lld/MachO/Arch/ARM64.cpp
+75-0lld/test/MachO/arm64-objc-class-stubs-dead.s
+55-0lld/test/MachO/objc-class-stubs-unsupported.s
+32-6lld/MachO/Driver.cpp
+644-154 files not shown
+672-1610 files

LLVM/project a113ed3lld/MachO Driver.cpp, lld/test/MachO arm64-objc-stubs-autolink.s

[lld][MachO] Fix ObjC stubs from autolinked archives

Move ObjC stub preparation after LC_LINKER_OPTION processing so archive members loaded via autolink can contribute _objc_msgSend$ selector stubs before selector references are built.

Previously those stubs missed __objc_methname setup; assert builds could fail in makeSelRef, and release builds could form an invalid selector reference.
DeltaFile
+35-0lld/test/MachO/arm64-objc-stubs-autolink.s
+2-1lld/MachO/Driver.cpp
+37-12 files

LLVM/project 9c40f02lld/MachO SyntheticSections.h SyntheticSections.cpp

[lld][MachO] Prepare ObjC stubs for variable sizes

Track ObjC stub sizes explicitly so future changes can mix different stub layouts in one synthetic section.
DeltaFile
+12-12lld/MachO/SyntheticSections.cpp
+3-2lld/MachO/SyntheticSections.h
+15-142 files

LLVM/project 055a77blibc/test/src/math TruncTest.h FloorTest.h, libc/test/src/math/generic CMakeLists.txt

[libc] Add missing MPFR-based tests for f16 and bf16 math functions (#218281)

Fixes #218219
DeltaFile
+174-1libc/test/src/math/CMakeLists.txt
+63-0utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel
+0-45libc/test/src/math/TruncTest.h
+0-45libc/test/src/math/FloorTest.h
+0-45libc/test/src/math/CeilTest.h
+0-32libc/test/src/math/generic/CMakeLists.txt
+237-16813 files not shown
+475-16919 files

LLVM/project e046dceclang/include/clang/Basic Diagnostic.h, clang/include/clang/Options Options.td

[clang] Don't add documentation comments to the AST if not requested (#206363)

Don't collect documentation comments unless they are requested
(-Wdocumentation, -fparse-all-comments, code completion, PCH
serialization, or libclang)

closes #165515

---------

Co-authored-by: Erich Keane <ekeane at nvidia.com>
DeltaFile
+107-79clang/lib/Basic/DiagnosticIDs.cpp
+38-0clang/test/Sema/warn-documentation-comment-retention.cpp
+31-2clang/lib/Sema/Sema.cpp
+28-0clang/test/AST/ast-dump-comment-retention.cpp
+10-0clang/include/clang/Basic/Diagnostic.h
+7-1clang/include/clang/Options/Options.td
+221-8215 files not shown
+273-9321 files

LLVM/project aa1058emlir/lib/Dialect/LLVMIR/IR LLVMDialect.cpp, mlir/lib/Target/LLVMIR ModuleImport.cpp ModuleTranslation.cpp

[mlir][LLVM] Preserve !associated and !absolute_symbol on llvm.mlir.global (#218839)

Add optional `associated` and `absolute_symbol` attributes on
`llvm.mlir.global` so the corresponding LLVM IR metadata is preserved
through import and export.

`associated` is a symbol ref to another global, alias, or function (used
for ELF `SHF_LINK_ORDER`). `absolute_symbol` is an array of `[lower,
upper)` integer range pairs, with `[-1, -1]` for the full set.

Verifier rejects a self-associated global and malformed range lists.
Translation attaches the metadata after all globals, aliases, and
function signatures exist so symbol refs can be resolved.

Fixes #215549

Assisted-by: Cursor

---------

Co-authored-by: Cursor <cursoragent at cursor.com>
DeltaFile
+57-16mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
+62-0mlir/test/Target/LLVMIR/Import/global-variables.ll
+53-0mlir/test/Target/LLVMIR/llvmir.mlir
+50-0mlir/lib/Target/LLVMIR/ModuleImport.cpp
+43-0mlir/test/Dialect/LLVMIR/global.mlir
+21-0mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
+286-163 files not shown
+320-169 files

LLVM/project a51a886clang/lib/AST/ByteCode EvalEmitter.h ByteCodeEmitter.h

[clang][bytecode] Make Scope::Desc const (#219775)

We use const pointers to descriptors everywhere else.
DeltaFile
+2-2clang/lib/AST/ByteCode/Function.h
+2-2clang/lib/AST/ByteCode/EvalEmitter.cpp
+2-2clang/lib/AST/ByteCode/ByteCodeEmitter.cpp
+1-1clang/lib/AST/ByteCode/EvalEmitter.h
+1-1clang/lib/AST/ByteCode/ByteCodeEmitter.h
+8-85 files

LLVM/project 091328fclang/lib/AST/ByteCode Compiler.h

[clang][bytecode][NFC] Make Compiler final (#219774)
DeltaFile
+2-2clang/lib/AST/ByteCode/Compiler.h
+2-21 files

LLVM/project 4126d3dllvm/include/llvm/ExecutionEngine/Orc SimpleRemoteEPC.h, llvm/lib/ExecutionEngine/Orc SimpleRemoteEPC.cpp

[ORC] Route SimpleRemoteEPC::runAsMain through CallMainProxySpec (#219770)

Replace runAsMainAddr with a CallMain proxy that is lazily initialized
by lookupAndApply on first use. This is another step towards making
callWrapperAsync the only call primitive
ExecutionSession/ExecutorProcessControl need to know about.
DeltaFile
+12-9llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp
+2-1llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h
+14-102 files

LLVM/project 4dbe25dclang/lib/AST/ByteCode EvalEmitter.h

[clang][bytecode] Reduce `EvalEmitter::Descriptors` inline size (#219773)

For pure expressions, we usually have few locals and few scopes. Reduce
the inline size here.
DeltaFile
+1-1clang/lib/AST/ByteCode/EvalEmitter.h
+1-11 files

LLVM/project 95473a6clang/lib/AST/ByteCode Function.h Interp.h

[clang][bytecode] Remove native pointer marshalling (#218911)

Just emit pointers to bytecode as uintptr_t. This avoids a vector and a
DenseMap in Program. We used to emit the ID as uint32_t, but since all
arguments are pointer-aligned in bytecode anyway, switching to uint64_t
shouldn't cause a memory regression.
DeltaFile
+9-13clang/lib/AST/ByteCode/Disasm.cpp
+2-13clang/lib/AST/ByteCode/Program.h
+0-13clang/lib/AST/ByteCode/Program.cpp
+4-7clang/lib/AST/ByteCode/ByteCodeEmitter.cpp
+3-5clang/lib/AST/ByteCode/Interp.h
+1-4clang/lib/AST/ByteCode/Function.h
+19-552 files not shown
+22-588 files

LLVM/project 9b8cb3dclang/lib/AST/ByteCode InterpState.cpp InterpState.h

[clang][bytecode] Divide `noteStep()` in hot and cold paths (#219760)

Move the hot success path into the header file to encourage inlining.
Also add a likeliness-hint since the steps check should _almost_ never
hit.
DeltaFile
+12-1clang/lib/AST/ByteCode/InterpState.h
+1-8clang/lib/AST/ByteCode/InterpState.cpp
+13-92 files

LLVM/project 450ef6dclang/lib/AST/ByteCode InterpFrame.cpp InterpFrame.h

[clang][bytecode] Shrink `InterpFrame` size a bit (#219765)

Reorder members to reduce the size from 80 to 72 bytes (debug builds on
64bit systems).
DeltaFile
+8-7clang/lib/AST/ByteCode/InterpFrame.h
+5-4clang/lib/AST/ByteCode/InterpFrame.cpp
+13-112 files

LLVM/project 37cc7eeclang/lib/AST/ByteCode InterpState.h InterpFrame.h

[clang][bytecode] Clean up diagnostic location getters (#219762)

Implement `getRange()` etc. in terms of `getSource()` to reduce code
duplication.
DeltaFile
+2-30clang/lib/AST/ByteCode/InterpFrame.cpp
+5-3clang/lib/AST/ByteCode/InterpFrame.h
+0-5clang/lib/AST/ByteCode/InterpState.h
+7-383 files

LLVM/project bb1691cclang/lib/ScalableStaticAnalysis/SourceTransformation/Transformations CppBoundedBuffers.cpp, clang/test/Analysis/Scalable/source-edit-generation end-to-end-cpp-bounded-buffers.cpp

[SSAF][clang-reforge] Add end-to-end clang-reforge tests

- Make CppBoundedBuffers adapt to flattened WPA results;
- Let CppBoundedBuffers use qualified EntityNames so that it can
  associate ASTNodes with WPA results;
- Add end-to-end tests

Final step of:
rdar://185840466
DeltaFile
+623-0clang/test/Analysis/Scalable/source-edit-generation/end-to-end-cpp-bounded-buffers.cpp
+23-9clang/lib/ScalableStaticAnalysis/SourceTransformation/Transformations/CppBoundedBuffers.cpp
+22-4clang/unittests/ScalableStaticAnalysis/SourceTransformation/CppBoundedBuffersTest.cpp
+668-133 files

LLVM/project 6bc324fclang/lib/ScalableStaticAnalysis/SourceTransformation/Transformations CppBoundedBuffers.cpp, clang/unittests/ScalableStaticAnalysis/SourceTransformation CppBoundedBuffersTest.cpp

fix clang-format
DeltaFile
+4-2clang/lib/ScalableStaticAnalysis/SourceTransformation/Transformations/CppBoundedBuffers.cpp
+1-1clang/unittests/ScalableStaticAnalysis/SourceTransformation/CppBoundedBuffersTest.cpp
+5-32 files

LLVM/project d9d2690clang/lib/ScalableStaticAnalysis/Analyses/UnsafeBufferUsage UnsafeBufferUsageAnalysis.cpp, clang/lib/ScalableStaticAnalysis/SourceTransformation/Transformations CppBoundedBuffers.cpp

[SSAF] Flatten 'UnsafeBufferReachableAnalysisResult' to a plain set

Previously, an 'UnsafeBufferReachableAnalysisResult' was organized as
a map from contributors to their mutually exclusive
sub-results. Because this extra layer of contributor information
proved unnecessary, this commit flattens the result into a plain set.

The source transformation expects the result to be a plain set, so
this is a prerequisite step for
rdar://185840466
DeltaFile
+10-10clang/lib/ScalableStaticAnalysis/Analyses/UnsafeBufferUsage/UnsafeBufferUsageAnalysis.cpp
+5-11clang/test/Analysis/Scalable/TypeConstrainedPointers/unsafe-buffer-reachable-excludes-type-constrained-new-delete.cpp
+4-7clang/lib/ScalableStaticAnalysis/SourceTransformation/Transformations/CppBoundedBuffers.cpp
+1-4clang/unittests/ScalableStaticAnalysis/WholeProgramAnalysis/UnsafeBufferReachableAnalysisTest.cpp
+1-3clang/unittests/ScalableStaticAnalysis/SourceTransformation/CppBoundedBuffersTest.cpp
+0-3clang/test/Analysis/Scalable/TypeConstrainedPointers/unsafe-buffer-reachable-excludes-type-constrained-main.cpp
+21-381 files not shown
+23-397 files

LLVM/project 14c1facclang/include/clang/ScalableStaticAnalysis/Core ASTEntityMapping.h, clang/include/clang/ScalableStaticAnalysis/SourceTransformation Transformation.h

[SSAF] Add APIs for resolving bare EntityNames to qualified EntityNames (#219033)

Also give Transformation access to SSAFOptions so that it can use
link-unit and compilation-unit IDs to resolve bare EntityNames.

first step of
rdar://185840466
DeltaFile
+64-0clang/lib/ScalableStaticAnalysis/Core/ASTEntityMapping.cpp
+0-41clang/lib/ScalableStaticAnalysis/Core/TUSummary/TUSummaryExtractor.cpp
+34-0clang/unittests/ScalableStaticAnalysis/ASTEntityMappingTest.cpp
+26-0clang/include/clang/ScalableStaticAnalysis/Core/ASTEntityMapping.h
+5-5clang/lib/ScalableStaticAnalysis/Core/EntityLinker/EntityLinker.cpp
+6-3clang/include/clang/ScalableStaticAnalysis/SourceTransformation/Transformation.h
+135-498 files not shown
+171-5714 files

LLVM/project 13c34eallvm/lib/Analysis ScalarEvolution.cpp, llvm/lib/DWARFLinker/Classic DWARFLinker.cpp

[llvm] Migrate to FoldingSet's typed lookup/insert/erase. NFC (#219764)
DeltaFile
+62-59llvm/lib/Analysis/ScalarEvolution.cpp
+27-27llvm/lib/IR/Attributes.cpp
+3-3llvm/lib/ProfileData/ItaniumManglingCanonicalizer.cpp
+3-3llvm/lib/IR/LegacyPassManager.cpp
+3-3llvm/lib/DWARFLinker/Parallel/DWARFLinkerUnit.cpp
+3-3llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp
+101-983 files not shown
+110-1079 files

LLVM/project 9bda6c4clang/lib/Parse ParseDecl.cpp

[clang][NFC] Fix comment in `ParseDecl.cpp` (#219761)

Solve
https://github.com/llvm/llvm-project/pull/219270#discussion_r3887904776
DeltaFile
+1-1clang/lib/Parse/ParseDecl.cpp
+1-11 files