LLVM/project b2fe1daclang/docs LibASTMatchersReference.html, clang/docs/tools dump_ast_matchers.py

[ASTMatchers][Docs] make dump_ast_matchers.py read classes from sources (#203784)

With this change, `dump_ast_matchers.py` script no longer need to probe
network to search for classes.
This allows the script to run offline which is needed for
https://github.com/llvm/llvm-project/pull/165472.
The script now operates on assumption that all classes in AST/ will be
here: https://llvm.org/doxygen/ (which is true in general unless doxygen
page is down)
DeltaFile
+299-124clang/docs/LibASTMatchersReference.html
+32-35clang/docs/tools/dump_ast_matchers.py
+331-1592 files

LLVM/project a02ef60llvm/include/llvm/Support Allocator.h, llvm/test/tools/llubi undef.ll unsupported_constant.ll

[llubi] Add support for undef values (#205602)

Although we are planning to deprecate the undef value, it is still
widely used in the intermediate results of the pipeline, which blocks
the pass bisection. This patch uses `freeze poison` as a refinement of
undef.

Note that the undef value evaluates to different values each time the
user is executed. So it cannot be cached like other constants. A
temporary buffer is introduced to take ownership of these values and
avoid breaking the interface (although this is a bit ugly...). This will
also be used by a follow-up patch for ptrtoint/inttoptr.

From my experience, it is enough for test case reduction of middle-end
miscompilation bugs (there are still counterexamples like
https://github.com/dtcxzyw/llvm-autoreduce/issues/61). However, when
processing backend miscompilation bugs, lli typically uses a garbage
value, so that llvm-reduce may produce an invalid result. I think we may
need to introduce two flags to migrate this issue: one for poisoning

    [5 lines not shown]
DeltaFile
+97-51llvm/tools/llubi/lib/Context.cpp
+35-0llvm/test/tools/llubi/undef.ll
+23-4llvm/tools/llubi/lib/Context.h
+0-12llvm/test/tools/llubi/unsupported_constant.ll
+2-0llvm/include/llvm/Support/Allocator.h
+1-0llvm/tools/llubi/lib/Interpreter.cpp
+158-676 files

LLVM/project fe1fc78llvm/include/llvm/ADT SmallVector.h

[SmallVector] Out-of-line the trivially-copyable push_back grow path (#206213)

In the approximately trivially-copyable specialization, push_back's grow
path does not early return. Both Clang and GCC likely keep `this` and
`Elt` live across the out-of-line `grow_pod` call, saving and restoring
them in the prologue/epilogue. Shrink wrapping can't sink it (the saved
values are used in the store block the fast path also reaches).

Move the grow-and-store into a noinline `growAndPushBack` helper and
tail call it. The fast path needs no callee-saved registers.
`push_back(int)` drops from 14 to 7 instructions on x86-64.

```
// void vec_pb_int(llvm::SmallVectorImpl<int>&v, int x){ v.push_back(x); }

        mov     eax, dword ptr [rdi + 8]
        cmp     eax, dword ptr [rdi + 12]
        jae     _ZN4llvm23SmallVectorTemplateBaseIiLb1EE15growAndPushBackEi # TAILCALL
        mov     rcx, qword ptr [rdi]

    [12 lines not shown]
DeltaFile
+13-2llvm/include/llvm/ADT/SmallVector.h
+13-21 files

LLVM/project c6b0a8dlibcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members get_long_double_zh_CN.pass.cpp, libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members put_long_double_zh_CN.pass.cpp

[libc++][FreeBSD] Fix localization test on FreeBSD (#186066)

Some ifdefs are missing so that we try to add it back and allow test to
run.
DeltaFile
+20-22libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp
+12-14libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp
+2-4libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp
+2-4libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp
+2-4libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp
+1-3libcxx/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
+39-513 files not shown
+43-579 files

LLVM/project d02dbafllvm/utils/gn/secondary/libcxx/include BUILD.gn

[gn build] Port 78af5e2b68da (#206268)
DeltaFile
+3-4llvm/utils/gn/secondary/libcxx/include/BUILD.gn
+3-41 files

LLVM/project cb962bellvm/utils/gn/secondary/lldb/source/Core BUILD.gn, llvm/utils/gn/secondary/lldb/source/Utility BUILD.gn

[gn build] Port 2ceab13545c2 (#206267)
DeltaFile
+0-1llvm/utils/gn/secondary/lldb/source/Utility/BUILD.gn
+1-0llvm/utils/gn/secondary/lldb/source/Core/BUILD.gn
+1-12 files

LLVM/project e35ef5cllvm/utils/gn/secondary/llvm/lib/Target/Hexagon BUILD.gn

[gn build] Port 1485386b78dc (#206266)
DeltaFile
+2-0llvm/utils/gn/secondary/llvm/lib/Target/Hexagon/BUILD.gn
+2-01 files

LLVM/project 3ad436ellvm/utils/gn/secondary/lldb/source/Host BUILD.gn

[gn] port 049448403c7b (#206265)
DeltaFile
+3-1llvm/utils/gn/secondary/lldb/source/Host/BUILD.gn
+3-11 files

LLVM/project f99a584bolt/test/X86 infer_no_exits.test

[BOLT] Work around BSD sed's lack of in-place editing support (#206183)

BSD sed does not implement `-i` the same way as GNU sed. Use a
copy-and-replace approach instead of in-place editing to ensure
compatibility.
DeltaFile
+2-1bolt/test/X86/infer_no_exits.test
+2-11 files

LLVM/project d7b8c61llvm/utils/gn/secondary/libcxx/include BUILD.gn

[gn] use `sources` instead of `inputs` for libc++ header copy action (#206263)

`sources` and `inputs` have the same semantics for GN action targets,
but the sync script can only handle `sources`.

Follow-up to cd98648925531663.
DeltaFile
+2-2llvm/utils/gn/secondary/libcxx/include/BUILD.gn
+2-21 files

LLVM/project 3992e30libcxx/include/__random random_device.h

[libc++][NFC] Mark random_device::__padding_ as [[maybe_unused]] (#206248)

Instead of pushing and popping warnings we can just mark the offending
member as `[[maybe_unused]]`, improving compile times a bit and
simplifying the code.
DeltaFile
+1-5libcxx/include/__random/random_device.h
+1-51 files

LLVM/project b61a41cllvm/lib/Support GlobPattern.cpp, llvm/lib/Target/RISCV/AsmParser RISCVAsmParser.cpp

Merge branch 'main' into revert-205399-revert-149886-slashy
DeltaFile
+1,129-0llvm/test/CodeGen/X86/vector-reduce-add-subvector.ll
+43-71llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
+62-0llvm/unittests/Support/GlobPatternTest.cpp
+37-14llvm/lib/Support/GlobPattern.cpp
+16-21llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+6-12llvm/test/Transforms/InstCombine/and-fcmp.ll
+1,293-1189 files not shown
+1,333-16215 files

LLVM/project ad35cfellvm/lib/Transforms/AggressiveInstCombine AggressiveInstCombine.cpp

[AggressiveInstCombine] Factor out the beginning of foldSelectSplitCTTZ/CTLZ into common entry point. NFC (#206220)

Both start by matching a select and a eq/ne compare with 0.

Assisted-by: claude
DeltaFile
+43-71llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
+43-711 files

LLVM/project 1210e04llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer non-power-of-2-buildvector.ll

[SLP] Allow non-power-of-2 VF in tryToVectorizeList
DeltaFile
+92-0llvm/test/Transforms/SLPVectorizer/non-power-of-2-buildvector.ll
+6-1llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+98-12 files

LLVM/project 27c7a6bllvm/test/CodeGen/X86 vector-reduce-add-subvector.ll

[X86] Add vector-reduce-add-subvector.ll - tests for partial reduction of single vector source (#206256)
DeltaFile
+1,129-0llvm/test/CodeGen/X86/vector-reduce-add-subvector.ll
+1,129-01 files

LLVM/project e19a986clang/docs LifetimeSafety.rst, clang/include/clang/Basic DiagnosticGroups.td DiagnosticSemaKinds.td

rename
DeltaFile
+6-6clang/include/clang/Basic/DiagnosticGroups.td
+2-2clang/include/clang/Basic/DiagnosticSemaKinds.td
+2-2clang/docs/LifetimeSafety.rst
+10-103 files

LLVM/project 44de29cllvm/include/llvm/Support GlobPattern.h, llvm/lib/Support GlobPattern.cpp

Reland: [NFC][Support] Implement slash-agnostic path matching in GlobPattern (#206251)

Add a SlashAgnostic option to GlobPattern to allow matching path
separators
(both forward slashes and backslashes) agnostically.

When enabled:
- We conservatively reduce the plain prefix and suffix by treating path
  separators as metacharacters. This ensures that path separators are
  matched via the slash-agnostic state machine rather than plain string
  comparison.
- Brackets containing slashes are adjusted to match both separators.
- Character comparisons in the state machine (matchChar) treat '/' and
  '\' as equivalent.

For #149886.

Reland of #202854 incorrectly reverted in #205409.
https://github.com/llvm/llvm-project/pull/202854#issuecomment-4813462549

    [3 lines not shown]
DeltaFile
+62-0llvm/unittests/Support/GlobPatternTest.cpp
+37-14llvm/lib/Support/GlobPattern.cpp
+6-3llvm/include/llvm/Support/GlobPattern.h
+105-173 files

LLVM/project 0352e9cclang/docs LifetimeSafety.rst

docs
DeltaFile
+2-0clang/docs/LifetimeSafety.rst
+2-01 files

LLVM/project ff93d2dclang/include/clang/Basic DiagnosticSemaKinds.td DiagnosticGroups.td, clang/lib/Sema SemaLifetimeSafety.h

ctor-suggestions-separate
DeltaFile
+13-4clang/lib/Sema/SemaLifetimeSafety.h
+7-7clang/test/Sema/LifetimeSafety/annotation-suggestions.cpp
+12-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+9-2clang/include/clang/Basic/DiagnosticGroups.td
+41-134 files

LLVM/project b23ba29llvm/lib/Transforms/InstCombine InstCombineAndOrXor.cpp, llvm/test/Transforms/InstCombine and-fcmp.ll or-fcmp.ll

[InstCombine] Optimize fcmp ord/uno logical select operations using freeze (#205076)

This pull request optimizes logical select sequences checking ordered or
unordered floating point operations.

Currently, InstCombine canonicalizes:

fcmp ord x, 0.0 AND fcmp ord y, 0.0 to fcmp ord x, y
fcmp uno x, 0.0 OR fcmp uno y, 0.0 to fcmp uno x, y
However, this canonicalization is blocked for logical selects because it
is not poison safe if the second operand evaluates to poison when the
first evaluates to NaN.

This patch enables the transformation for logical selects by inserting a
freeze on the second evaluated operand to guarantee poison safety.

Fixes #49175
DeltaFile
+6-12llvm/test/Transforms/InstCombine/and-fcmp.ll
+10-7llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
+4-8llvm/test/Transforms/InstCombine/or-fcmp.ll
+20-273 files

LLVM/project ec5f42dllvm/lib/Target/AArch64/AsmParser AArch64AsmParser.cpp, llvm/lib/Target/AArch64/MCTargetDesc AArch64InstPrinter.cpp

[spr] initial version

Created using spr 1.3.8-wip
DeltaFile
+97-82llvm/lib/Target/SPIRV/SPIRVBuiltins.cpp
+75-18llvm/utils/TableGen/SearchableTableEmitter.cpp
+34-33llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
+32-18llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+21-16llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
+12-12llvm/test/TableGen/generic-tables.td
+271-17913 files not shown
+317-21019 files

LLVM/project 36c54e8llvm/include/llvm/Support GlobPattern.h, llvm/lib/Support GlobPattern.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+62-0llvm/unittests/Support/GlobPatternTest.cpp
+37-14llvm/lib/Support/GlobPattern.cpp
+6-3llvm/include/llvm/Support/GlobPattern.h
+105-173 files

LLVM/project 50ba8b2llvm/lib/Target/RISCV RISCVAsmPrinter.cpp, llvm/lib/Target/RISCV/AsmParser RISCVAsmParser.cpp

[RISCV][NFC] Remove direct access to FeatureKV (#206233)

This is preparatory work for changing the representation of
FeatureKV/SubTypeKV, in which they will no longer be that easily
accessible as global variables. Therefore, get them from the subtarget
instead.
DeltaFile
+16-21llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+8-8llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
+5-4llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h
+3-5llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp
+2-6llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
+1-2llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp
+35-461 files not shown
+36-477 files

LLVM/project 065d1baclang/docs SanitizerSpecialCaseList.rst ReleaseNotes.rst, clang/unittests/Basic DiagnosticTest.cpp

Revert "Revert "Make sanitizer special case list slash-agnostic" (#205399)"

This reverts commit 0b5c006208cf7b0fee3709f468152e7de81607ef.
DeltaFile
+35-0clang/unittests/Basic/DiagnosticTest.cpp
+25-6llvm/lib/Support/SpecialCaseList.cpp
+20-0llvm/unittests/Support/SpecialCaseListTest.cpp
+12-0clang/docs/SanitizerSpecialCaseList.rst
+5-0clang/docs/ReleaseNotes.rst
+97-65 files

LLVM/project 7435ad3llvm/docs LangRef.rst

[LangRef] Clarifying the copying behaviour of byval (#205576)

The hidden copy of a byval argument can only be treated as a continuous
memcpy with the allocation size. It is incorrect to interpret it as a
load-store forwarding in the specified type, since a padding between
struct fields may still be a part of an active member of a union type.
DeltaFile
+5-1llvm/docs/LangRef.rst
+5-11 files

LLVM/project 5e47ef4clang/include/clang/Analysis/Analyses/LifetimeSafety Facts.h FactsGenerator.h, clang/lib/Analysis/LifetimeSafety FactsGenerator.cpp LiveOrigins.cpp

[LifetimeSafety] Reapply liveness propagation and fix loop liveness leakage
 (#205740)

Reapplies the liveness propagation fix (originally #205323, reverted in
#205687) and fixes a false positive involving conditional operators in
loops.

### Key Changes
* **Reapply**: Corrects liveness propagation through origin flows and
adds support for GNU statement expressions (`({ ... })`).
* **Loop Liveness Fix**: Resolves a false positive where temporary
origins leaked liveness across loop backedges via the conditional
operator's merge block. We now path-isolate these flows by generating
the `OriginFlowFact`s in their respective predecessor blocks (branches)
instead of the merge block.

Details about the old liveness leak. Consider this example
```cpp
for (int i = 0; i < 2; i++) {

    [41 lines not shown]
DeltaFile
+70-55clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+86-0clang/test/Sema/LifetimeSafety/safety.cpp
+23-6clang/test/Sema/LifetimeSafety/invalidations.cpp
+14-3clang/lib/Analysis/LifetimeSafety/LiveOrigins.cpp
+4-0clang/include/clang/Analysis/Analyses/LifetimeSafety/Facts.h
+3-1clang/include/clang/Analysis/Analyses/LifetimeSafety/FactsGenerator.h
+200-656 files

LLVM/project ffc6877clang/lib/CIR/CodeGen CIRGenExprAggregate.cpp, clang/test/CIR/CodeGen cxx-rewritten-binary-operator.cpp

[CIR] Implement CXXRewrittenBinaryOperator for AggregateExpr (#204667)

Implement CXXRewrittenBinaryOperator support for AggregateExpr
DeltaFile
+48-0clang/test/CIR/CodeGen/cxx-rewritten-binary-operator.cpp
+1-2clang/lib/CIR/CodeGen/CIRGenExprAggregate.cpp
+49-22 files

LLVM/project 3c1311ellvm/include/llvm/ProfileData SampleProfReader.h, llvm/lib/ProfileData SampleProfReader.cpp

[ProfileData] Introduce SampleProfileFuncOffsetTable (NFC) (#205045)

This patch introduces SampleProfileFuncOffsetTable, a unified wrapper
representing the function offset table.

Currently, the offset table is always a DenseMap.  To support the
upcoming on-disk hash table (v104) for faster sample profile loading,
this patch abstracts the offset table representation.  The new class
can delegate lookups to either the in-memory DenseMap or the on-disk
OnDiskIterableChainedHashTable.

This patch updates the reader to use the new wrapper's lookup and
insert interfaces.  Since the on-disk path is not yet active, this
change is a non-functional change (NFC).

RFC:
https://discourse.llvm.org/t/rfc-faster-sample-profile-loading/90957/4
DeltaFile
+76-2llvm/include/llvm/ProfileData/SampleProfReader.h
+62-0llvm/unittests/ProfileData/SampleProfTest.cpp
+13-16llvm/lib/ProfileData/SampleProfReader.cpp
+151-183 files

LLVM/project ad9e815clang/test/Sema/LifetimeSafety safety.cpp

merge
DeltaFile
+2-3clang/test/Sema/LifetimeSafety/safety.cpp
+2-31 files

LLVM/project 5d68f75llvm/include/llvm/Support KnownBits.h, llvm/lib/Support KnownBits.cpp

[Analysis] Improve readability of `KnownBits::pext` and `KnownBits::pdep` (#205176)

- Change the parameter names to `Val` and `Mask` to emphasize their semantics.
- Use `clearBits` instead of bitwise AND for increased expressiveness.
- Rewrite explanatory comments.
DeltaFile
+42-39llvm/lib/Support/KnownBits.cpp
+4-4llvm/include/llvm/Support/KnownBits.h
+46-432 files