LLVM/project e657ed7clang/lib/Analysis/LifetimeSafety FactsGenerator.cpp Loans.cpp, clang/test/Sema/LifetimeSafety invalidations.cpp

[LifetimeSafety] Support container interior paths and invalidations

This patch completes the implementation of path-sensitive lifetime tracking by supporting container interior paths (`.*`) and deep-nested invalidation.

- Enables `PathElement::getInterior` generation in `FactsGenerator` for GSL Owners and Views (e.g. member functions, function parameters, lambda captures).
- Removes bypass checks in `FactsGenerator::handleInvalidatingCall` to track container invalidation on fields.
- Updates `Checker` to use strict prefix comparison (`isStrictPrefixOf`) for container invalidations, ensuring invalidation of container contents (interior) correctly invalidates iterators but not other sibling fields.
- Reorganizes tests in `invalidations.cpp` by resolving duplicates and distributing them logically.
- Updates unit tests and sema tests with correct expectations for interior paths.

TAG=agy
CONV=2cfd8d00-18d7-4a03-8d78-2aba2f9a8f23
DeltaFile
+243-65clang/test/Sema/LifetimeSafety/invalidations.cpp
+228-67clang/unittests/Analysis/LifetimeSafetyTest.cpp
+30-10clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+9-4clang/test/Sema/LifetimeSafety/Inputs/lifetime-analysis.h
+12-0clang/lib/Analysis/LifetimeSafety/Loans.cpp
+9-2clang/lib/Analysis/LifetimeSafety/Checker.cpp
+531-1486 files

LLVM/project a090408clang/lib/Analysis/LifetimeSafety FactsGenerator.cpp Checker.cpp, clang/test/Sema/LifetimeSafety invalidations.cpp

[LifetimeSafety] Support container interior paths and invalidations

This patch completes the implementation of path-sensitive lifetime tracking by supporting container interior paths (`.*`) and deep-nested invalidation.

- Enables `PathElement::getInterior` generation in `FactsGenerator` for GSL Owners and Views (e.g. member functions, function parameters, lambda captures).
- Removes bypass checks in `FactsGenerator::handleInvalidatingCall` to track container invalidation on fields.
- Updates `Checker` to use strict prefix comparison (`isStrictPrefixOf`) for container invalidations, ensuring invalidation of container contents (interior) correctly invalidates iterators but not other sibling fields.
- Reorganizes tests in `invalidations.cpp` by resolving duplicates and distributing them logically.
- Updates unit tests and sema tests with correct expectations for interior paths.

TAG=agy
CONV=2cfd8d00-18d7-4a03-8d78-2aba2f9a8f23
DeltaFile
+228-67clang/unittests/Analysis/LifetimeSafetyTest.cpp
+223-65clang/test/Sema/LifetimeSafety/invalidations.cpp
+31-12clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+9-2clang/lib/Analysis/LifetimeSafety/Checker.cpp
+11-0clang/lib/Analysis/LifetimeSafety/Loans.cpp
+6-3clang/test/Sema/LifetimeSafety/Inputs/lifetime-analysis.h
+508-1496 files

LLVM/project 076af82llvm/include/llvm/CodeGen/GlobalISel LegacyLegalizerInfo.h LegalizerInfo.h, llvm/lib/CodeGen/GlobalISel LegacyLegalizerInfo.cpp LegalizerInfo.cpp

[GlobalISel] Remove LegacyLegalizerInfo (#197308)

After #197238, #197370, #197371, #197374, #197375, #197377, #197378 and
#197379, this removes the legacy rules from global isel.

The above patches attempt to make all _tested_ operations legal, but
have only gone through the operations that have llvm tests. If more
fallbacks are now found to be happening, the other operations from
#197238 might be needed.
DeltaFile
+0-466llvm/include/llvm/CodeGen/GlobalISel/LegacyLegalizerInfo.h
+0-385llvm/lib/CodeGen/GlobalISel/LegacyLegalizerInfo.cpp
+0-198llvm/unittests/CodeGen/GlobalISel/LegalizerInfoTest.cpp
+0-57llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h
+1-13llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp
+1-4llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
+2-1,12315 files not shown
+2-1,14621 files

LLVM/project 925f4f2libcxx/include/__configuration abi.h, libcxx/include/__random mersenne_twister_engine.h

[libc++] Add an ABI flag to optimize mersenne_twister_engine (#206423)

Instead of updating the status array every time `operator()` is called,
we can instead update it once every time the entire array has been read.
That allows the compiler to vectorize the updating code, improving
performance.

Apple M4:
```
Benchmark                                     old      new    Difference    % Difference
----------------------------------------  -------  -------  ------------  --------------
std::mt19937::operator()                     1.39     0.65         -0.74         -53.26%
std::mt19937::operator()_(into_array)      172.92    80.69        -92.23         -53.34%
std::mt19937_64::operator()                  1.46     0.99         -0.47         -31.99%
std::mt19937_64::operator()_(into_array)   187.31   108.10        -79.21         -42.29%
```

Fixes #197221
DeltaFile
+415-282libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/ctor_sseq.pass.cpp
+358-225libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/ctor_result_type.pass.cpp
+36-7libcxx/include/__random/mersenne_twister_engine.h
+25-0libcxx/test/benchmarks/random.bench.cpp
+1-0libcxx/include/__configuration/abi.h
+1-0libcxx/utils/libcxx/test/features/libcxx_macros.py
+836-5146 files

LLVM/project a68147flibcxx/include/__thread thread.h, libcxx/test/libcxx/thread/thread.threads/thread.thread.class/thread.thread.id format.functions.pass.cpp

[libc++] Use std::to_chars to format thread::id and canonicalize the representation across platforms (#181624)

This makes printing `thread::id` faster, since we avoid a bunch of
boilerplate code that isn't optimized away. It also avoids including
`<sstream>` and `<__locale>`, cutting the time to parse `<thread>` in
half.

This also changes the output when printing the id on a platform that
uses a pointer as the underlying type. I don't think that's a problem,
since the thread id isn't in any way stable. It also makes the output
consistent across all platforms we support.
DeltaFile
+94-0libcxx/test/libcxx/thread/thread.threads/thread.thread.class/thread.thread.id/format.functions.pass.cpp
+0-83libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.functions.tests.h
+0-57libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.functions.format.pass.cpp
+37-11libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.functions.vformat.pass.cpp
+17-11libcxx/include/__thread/thread.h
+7-9libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.pass.cpp
+155-1717 files not shown
+170-19413 files

LLVM/project 4a02e11libcxxabi/test thread_local_destruction_order.pass.cpp

[libcxxabi] Re-enable `thread_local_destruction_order.pass.cpp‎` on FreeBSD (#186129)

The underlying bug has been fixed in https://reviews.freebsd.org/D55826.
DeltaFile
+0-2libcxxabi/test/thread_local_destruction_order.pass.cpp
+0-21 files

LLVM/project d8b2232llvm/lib/Transforms/InstCombine InstCombineCasts.cpp, llvm/test/Transforms/InstCombine fptoui-of-fdiv.ll

[InstCombine] Fold fpto{u,s}i of int-cast fdiv into {u,s}div (#205853)

Fixes #205305.

Adds an InstCombine fold for the pattern `fpto{u,s}i (fdiv ({u,s}itofp
X), C)` to `{u,s}div X, C`.

Safe when
- Unsigned: C > 0 and the integer width N <= the FP mantissa width p.
- Signed:  C != 0 and N - 1 <= p, excluding (X == INT_MIN, C == -1). 

See linked issue for detailed reasoning.
DeltaFile
+395-0llvm/test/Transforms/InstCombine/fptoui-of-fdiv.ll
+58-1llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
+453-12 files

LLVM/project e3c8818llvm/lib/Transforms/InstCombine InstCombineAddSub.cpp, llvm/test/Transforms/InstCombine add4.ll

[InstCombine] Fold commuted add of udiv/urem by two (#206272) (#207462)

Fixes #206272.

`SimplifyAddWithRemainder` folds `(X / C0) * C1 + (X % C0) * C2`,
treating `and X, lowmask` as a remainder and `lshr X, N` as a division.
The commuted form `add (and X, C), (lshr X, N)` was missed because the
operand-order swap only recognized a real `urem`/`srem`.

Now the fold is tried with both operand orders instead of relying on
that swap. Verified with Alive2.

Supersedes #207249 (re-opened from the correct account; already
incorporates the both-operand-orders refactor suggested there by
nikic).

Prepared with AI assistance per the [LLVM AI Tool
Policy](https://llvm.org/docs/AIToolPolicy.html); not a "good first
issue".

    [3 lines not shown]
DeltaFile
+32-28llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
+26-0llvm/test/Transforms/InstCombine/add4.ll
+58-282 files

LLVM/project 5bc1978llvm/include/llvm/CodeGen TargetSubtargetInfo.h, llvm/include/llvm/MC MCSubtargetInfo.h

[MC][NFC] Store SubTypeKV names as string table (#207580)

This moves the large SubTypeKV arrays to .rodata, as they no longer
contain the key pointers that need to be relocated.

Additionally, remove the largely redundant CPUNames arrays and integrate
the AArch64 aliases into the sorted string table. There was really no
need to introduce these 17 kiB arrays solely for including AArch64
aliases in help output.... (added in b6c22a4)
DeltaFile
+43-62llvm/utils/TableGen/SubtargetEmitter.cpp
+17-12llvm/include/llvm/MC/MCSubtargetInfo.h
+11-13llvm/lib/MC/MCSubtargetInfo.cpp
+4-4llvm/unittests/CodeGen/MFCommon.inc
+2-1llvm/include/llvm/CodeGen/TargetSubtargetInfo.h
+1-1llvm/unittests/CodeGen/MachineInstrTest.cpp
+78-933 files not shown
+81-969 files

LLVM/project 6a50712llvm/include/llvm/CodeGen UnreachableBlockElim.h RenameIndependentSubregs.h, llvm/include/llvm/Transforms/Scalar StructurizeCFG.h

[NPM] Make few more passes Required
DeltaFile
+4-4llvm/lib/Target/AMDGPU/AMDGPU.h
+2-2llvm/include/llvm/CodeGen/UnreachableBlockElim.h
+1-1llvm/include/llvm/CodeGen/RenameIndependentSubregs.h
+1-1llvm/include/llvm/CodeGen/TwoAddressInstructionPass.h
+1-1llvm/include/llvm/Transforms/Scalar/StructurizeCFG.h
+1-1llvm/include/llvm/Transforms/Utils/UnifyLoopExits.h
+10-1014 files not shown
+24-2420 files

LLVM/project abf6602llvm/include/llvm/Analysis ModuleSummaryAnalysis.h, llvm/lib/Analysis StackSafetyAnalysis.cpp ModuleSummaryAnalysis.cpp

[NPM] Port ImmutableModuleSummaryAnalysis to NPM
DeltaFile
+29-0llvm/include/llvm/Analysis/ModuleSummaryAnalysis.h
+5-2llvm/lib/Analysis/StackSafetyAnalysis.cpp
+2-0llvm/lib/Passes/PassRegistry.def
+1-0llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
+37-24 files

LLVM/project deba4c0llvm/lib/Target/AMDGPU AMDGPUAsmPrinter.cpp AMDGPUAsmPrinter.h, llvm/test/CodeGen/AMDGPU llc-pipeline-npm.ll

[AMDGPU][NPM] Complete AsmPrinter support for AMDGPU
DeltaFile
+44-4llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
+22-0llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.h
+13-3llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+10-1llvm/test/CodeGen/AMDGPU/llc-pipeline-npm.ll
+89-84 files

LLVM/project 9cd1001llvm/include/llvm/Target/GlobalISel Combine.td, llvm/test/CodeGen/AArch64/GlobalISel combine-or-and-xor.mir combine-or-and-xor.ll

[GlobalISel] Add or_and_and pattern from SelectionDAG (#204618)

This PR adds the `fold or (xor x, y), (x and/or y) --> or x, y` pattern
from SelectionDAG to GlobalISel.
DeltaFile
+93-0llvm/test/CodeGen/AArch64/GlobalISel/combine-or-and-xor.mir
+78-0llvm/test/CodeGen/AArch64/GlobalISel/combine-or-and-xor.ll
+21-3llvm/include/llvm/Target/GlobalISel/Combine.td
+192-33 files

LLVM/project ea35bc1clang/lib/Analysis/LifetimeSafety LoanPropagation.cpp, clang/test/CodeGen/AArch64 neon-intrinsics.c

rebase

Created using spr 1.3.8-wip
DeltaFile
+0-556clang/test/CodeGen/AArch64/neon-intrinsics.c
+465-1clang/test/CodeGen/AArch64/neon/subtraction.c
+405-0llvm/test/CodeGen/SPARC/bswap.ll
+147-99llvm/test/Analysis/CostModel/AArch64/mul.ll
+149-11clang/test/Sema/LifetimeSafety/safety.cpp
+97-43clang/lib/Analysis/LifetimeSafety/LoanPropagation.cpp
+1,263-71013 files not shown
+1,474-79919 files

LLVM/project 4dd2c56clang/lib/Analysis/LifetimeSafety LoanPropagation.cpp, clang/test/CodeGen/AArch64 neon-intrinsics.c

[spr] changes introduced through rebase

Created using spr 1.3.8-wip

[skip ci]
DeltaFile
+0-556clang/test/CodeGen/AArch64/neon-intrinsics.c
+465-1clang/test/CodeGen/AArch64/neon/subtraction.c
+405-0llvm/test/CodeGen/SPARC/bswap.ll
+147-99llvm/test/Analysis/CostModel/AArch64/mul.ll
+149-11clang/test/Sema/LifetimeSafety/safety.cpp
+97-43clang/lib/Analysis/LifetimeSafety/LoanPropagation.cpp
+1,263-71013 files not shown
+1,474-79919 files

LLVM/project bfca639llvm/include/llvm/MC MCSubtargetInfo.h, llvm/lib/CodeGen TargetSubtargetInfo.cpp

[CodeGen][NFC] Store CPU model index in SubTypeKV (#207351)

Instead of storing the pointer to the CPU model, store all CPU models in
an array and store the index. This is preliminary work for moving
SubTypeKV to .rodata.

NB: the scheduling models also take a fair amount of space in
.data.rel.ro, with SchedModels ~13kiB, ModelProcResources ~57kiB.
DeltaFile
+20-14llvm/utils/TableGen/SubtargetEmitter.cpp
+8-8llvm/lib/MC/MCSubtargetInfo.cpp
+6-6llvm/include/llvm/MC/MCSubtargetInfo.h
+6-5llvm/lib/CodeGen/TargetSubtargetInfo.cpp
+3-2llvm/unittests/CodeGen/MFCommon.inc
+2-2llvm/utils/TableGen/Common/CodeGenSchedule.h
+45-374 files not shown
+51-4110 files

LLVM/project 2ac46a3llvm/test/Analysis/CostModel/AArch64 mul.ll arith.ll

[AArch64] Update some arith and mul tests. NFC (#207589)
DeltaFile
+147-99llvm/test/Analysis/CostModel/AArch64/mul.ll
+25-0llvm/test/Analysis/CostModel/AArch64/arith.ll
+172-992 files

LLVM/project 67d9abbllvm/include/llvm/Support GenericDomTreeConstruction.h

[GenericDomTreeConstruction] Use 0-based DFS numbering (#207524)

Number DFS-visited nodes from 0 and drop the unused index-0 sentinel
from NumToNode/NumToInfo/IDoms.

`Unvisited = 0` marks unvisited nodes by DFS. 0 is now the DFS root, or
the virtual root for postdominators.

Decrease the inline capacity for NumToNode/NodeInfos, which doesn't seem
to matter. sqlite3's p90 block count is 29.
DeltaFile
+54-48llvm/include/llvm/Support/GenericDomTreeConstruction.h
+54-481 files

LLVM/project ecbadb4clang/include/clang/Basic AArch64CodeGenUtils.h, clang/lib/CIR/CodeGen CIRGenBuiltinAArch64.cpp

[CIR][AArch64] Upstream narrowing-subtraction NEON builtins (#207115)

Related to https://github.com/llvm/llvm-project/issues/185382

CIR lowering for
- narrowing-subtraction intrinsics
(https://arm-software.github.io/acle/neon_intrinsics/advsimd.html#narrowing-subtraction)

Port tests:
- `clang/test/CodeGen/AArch64/neon_intrinsics.c` to
`clang/test/CodeGen/AArch64/neon/subtraction.c`
DeltaFile
+0-556clang/test/CodeGen/AArch64/neon-intrinsics.c
+465-1clang/test/CodeGen/AArch64/neon/subtraction.c
+28-2clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp
+1-1clang/include/clang/Basic/AArch64CodeGenUtils.h
+494-5604 files

LLVM/project 9a858b6llvm/lib/Target/DirectX DXILPrettyPrinter.cpp

[DirectX] Fix format override in DXILPrettyPrinter.cpp (#207588)
DeltaFile
+4-4llvm/lib/Target/DirectX/DXILPrettyPrinter.cpp
+4-41 files

LLVM/project d832bfelibcxx/docs/Status Cxx26Issues.csv

[libc++] Mark LWG4098 as resolved (#206295)

Already implemented and tested in the scope of the full implementation
for `adjacent_view` (1e15dbe311eb08462e7a68fcb8b5850632e24aff).

Closes #105353
DeltaFile
+1-1libcxx/docs/Status/Cxx26Issues.csv
+1-11 files

LLVM/project f2342e8llvm/lib/Target/Sparc SparcISelLowering.cpp, llvm/test/CodeGen/SPARC bswap.ll

[SPARC] Don't combine misaligned memory ops with BSWAP (#206345)

Doing it will result in a misaligned LD*A/ST*A instruction, which will
raise a bus error.

This should fix the failure in `clamscan` test.
DeltaFile
+405-0llvm/test/CodeGen/SPARC/bswap.ll
+14-7llvm/lib/Target/Sparc/SparcISelLowering.cpp
+419-72 files

LLVM/project 50f9437clang/include/clang/Analysis/Analyses/LifetimeSafety Loans.h Facts.h, clang/lib/Analysis/LifetimeSafety LoanPropagation.cpp Facts.cpp

[LifetimeSafety] Support field-sensitivity in lifetime tracking

This patch enables field-sensitivity when tracking lifetimes of nested objects.

- FactsGenerator now generates `PathElement::getField` for `MemberExpr` accesses, mapping fields to loans.
- LoanPropagation now propagates field paths along flow facts, appending fields to base loans.
- Removes false-positive warnings in `invalidations.cpp` where modifications to one field were incorrectly reported as invalidating iterators/pointers to another field.
- Adds comprehensive unit tests checking nested field access and placeholder fields.

TAG=agy
CONV=2cfd8d00-18d7-4a03-8d78-2aba2f9a8f23
DeltaFile
+106-36clang/lib/Analysis/LifetimeSafety/LoanPropagation.cpp
+72-30clang/unittests/Analysis/LifetimeSafetyTest.cpp
+82-8clang/test/Sema/LifetimeSafety/invalidations.cpp
+29-0clang/include/clang/Analysis/Analyses/LifetimeSafety/Loans.h
+15-11clang/lib/Analysis/LifetimeSafety/Facts.cpp
+24-0clang/include/clang/Analysis/Analyses/LifetimeSafety/Facts.h
+328-854 files not shown
+362-9310 files

LLVM/project 4bb5603llvm/include/llvm/MC MCSubtargetInfo.h, llvm/lib/CodeGen TargetSubtargetInfo.cpp

[spr] changes to main this commit is based on

Created using spr 1.3.8-wip

[skip ci]
DeltaFile
+20-14llvm/utils/TableGen/SubtargetEmitter.cpp
+8-8llvm/lib/MC/MCSubtargetInfo.cpp
+6-6llvm/include/llvm/MC/MCSubtargetInfo.h
+6-5llvm/lib/CodeGen/TargetSubtargetInfo.cpp
+3-2llvm/unittests/CodeGen/MFCommon.inc
+2-2llvm/utils/TableGen/Common/CodeGenSchedule.h
+45-374 files not shown
+51-4110 files

LLVM/project 251e8c6llvm/include/llvm/CodeGen TargetSubtargetInfo.h, llvm/include/llvm/MC MCSubtargetInfo.h

[spr] initial version

Created using spr 1.3.8-wip
DeltaFile
+60-73llvm/utils/TableGen/SubtargetEmitter.cpp
+19-14llvm/include/llvm/MC/MCSubtargetInfo.h
+13-15llvm/lib/MC/MCSubtargetInfo.cpp
+7-6llvm/lib/CodeGen/TargetSubtargetInfo.cpp
+6-5llvm/unittests/CodeGen/MFCommon.inc
+4-2llvm/include/llvm/CodeGen/TargetSubtargetInfo.h
+109-1154 files not shown
+118-12310 files

LLVM/project f7ca48eclang/test/CodeGen attr-counted-by.c attr-counted-by-with-sanitizers.c, llvm/test/CodeGen/PowerPC abdu.ll abdu-neg.ll

rebase

Created using spr 1.3.8-wip
DeltaFile
+0-2,755clang/test/CodeGen/attr-counted-by.c
+1,736-0clang/test/CodeGen/attr-counted-by-with-sanitizers.c
+1,387-0clang/test/CodeGen/attr-counted-by-without-sanitizers.c
+992-0llvm/test/CodeGen/PowerPC/abdu.ll
+910-0llvm/test/CodeGen/PowerPC/abdu-neg.ll
+247-506llvm/test/CodeGen/X86/haddsub-undef.ll
+5,272-3,261635 files not shown
+20,610-10,086641 files

LLVM/project 871cf98clang/lib/Analysis/LifetimeSafety Checker.cpp MovedLoans.cpp

[LifetimeSafety][NFC] Update Checker to use prefix comparison interfaces

This patch switches the Checker's expiry and invalidation checks to use `AccessPath::isPrefixOf` instead of equality (`==`).

Since all generated access paths are currently empty, `isPrefixOf` is behaviorally identical to `==` (NFC). This prepares the checker to handle nested paths (fields and container interiors) in subsequent commits.

TAG=agy
CONV=2cfd8d00-18d7-4a03-8d78-2aba2f9a8f23
DeltaFile
+3-3clang/lib/Analysis/LifetimeSafety/Checker.cpp
+1-1clang/lib/Analysis/LifetimeSafety/MovedLoans.cpp
+4-42 files

LLVM/project 750abfbclang/include/clang/Analysis/Analyses/LifetimeSafety Loans.h, clang/lib/Analysis/LifetimeSafety Loans.cpp Checker.cpp

[LifetimeSafety][NFC] Refactor AccessPath and Loan representations

This patch refactors the internal representations of `AccessPath` and `Loan` to support path elements, preparing for field-sensitive and interior-sensitive lifetime tracking.

- Introduces `PathElement` representing a field or interior dereference.
- Refactors `AccessPath` to contain a base and a list of `PathElement`s.
- Updates `Loan` and `LoanManager` to use the new `AccessPath` structure.
- Refactors debug dump formatting to output path elements if present.
- Updates Checker and FactsGenerator to compile with the new interfaces, keeping logic behaviorally identical (NFC).

TAG=agy
CONV=2cfd8d00-18d7-4a03-8d78-2aba2f9a8f23
DeltaFile
+144-67clang/include/clang/Analysis/Analyses/LifetimeSafety/Loans.h
+45-21clang/lib/Analysis/LifetimeSafety/Loans.cpp
+17-10clang/lib/Analysis/LifetimeSafety/Checker.cpp
+6-5clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+212-1034 files

LLVM/project 4fb7bf3clang/include/clang/Analysis/Analyses/LifetimeSafety LoanPropagation.h, clang/lib/Analysis/LifetimeSafety LoanPropagation.cpp Facts.cpp

[LifetimeSafety] Add multi-block support to buildOriginFlowChain (#204592)

After introducing `buildOriginFlowChain` to use-after-scope diagnostics,
it should support multi-block analysis. This also allows it to be reused
by other diagnostics.

In some loops, `UseFact` may appear before `OriginFlowFact`:

```cpp
void for_loop_use_before_loop_body(MyObj safe) {
  MyObj* p = &safe;
  for (int i = 0; i < 1; ++i) {
    (void)*p;
    MyObj s;
    p = &s;
  }
  (void)*p;
}
```

    [6 lines not shown]
DeltaFile
+149-11clang/test/Sema/LifetimeSafety/safety.cpp
+97-43clang/lib/Analysis/LifetimeSafety/LoanPropagation.cpp
+56-10clang/unittests/Analysis/LifetimeSafetyTest.cpp
+12-7clang/include/clang/Analysis/Analyses/LifetimeSafety/LoanPropagation.h
+8-6clang/lib/Analysis/LifetimeSafety/Facts.cpp
+4-2clang/lib/Analysis/LifetimeSafety/Checker.cpp
+326-792 files not shown
+330-808 files

LLVM/project f26f3e6clang/lib/CIR/CodeGen CIRGenBuiltinAArch64.cpp, clang/test/CodeGen/AArch64 v8.5a-neon-frint3264-intrinsic.c neon-intrinsics.c

[clang][CIR] Add lowering for Neon rounding builtins (#195021)

This PR adds CIR lowering for AArch64 NEON rounding builtins:

- vrnd (trunc), vrnda (round), vrndi (nearbyint), vrndm (floor),
  vrndn (roundeven), vrndp (ceil), vrndx (rint)
- vrnd32x, vrnd32z, vrnd64x, vrnd64z (v8.5-a FRINT variants)

The standard rounding builtins lower to the corresponding CIR ops
(cir.trunc, cir.round, etc.). The vrndi_v/vrndiq_v cases are handled
in the common NEON switch since they enter via AArch64SIMDIntrinsicMap
(NEONMAP0). The vrnd32/64 builtins use NEONMAP1 entries with their
aarch64.neon.frint* intrinsic names.

The lowering follows the existing implementation in
CodeGen/TargetBuiltins/ARM.cpp.

Prior to this patch, the original neon-intrinsics.c had zero f32
standard rounding tests :

    [6 lines not shown]
DeltaFile
+473-0clang/test/CodeGen/AArch64/neon/intrinsics.c
+132-0clang/test/CodeGen/AArch64/neon/rounding-v8.5.c
+1-129clang/test/CodeGen/AArch64/v8.5a-neon-frint3264-intrinsic.c
+0-99clang/test/CodeGen/AArch64/neon-intrinsics.c
+66-23clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp
+672-2515 files