LLVM/project 6362bc8clang/include/clang/Basic LangOptions.def, clang/include/clang/Options Options.td

[LifetimeSafety] Run analysis in post-order of CallGraph for better annotation propagation (#174178)

Add functionality to analyze functions in the post-order of the call
graph.

The PR includes the following changes:

1. **Call Graph Generation**: Uses `clang::CallGraph` and
`addToCallGraph` to generate a call graph.
2. **Topological Traversal**: Uses `llvm::post_order` to iterate through
the CallGraph.
3. **New Frontend Flag**: The post-order analysis is enabled via a new
frontend flag `-fexperimental-lifetime-safety-inference-post-order`

Example:

```css
#include <iostream>
#include <string>

    [48 lines not shown]
DeltaFile
+34-1clang/lib/Sema/AnalysisBasedWarnings.cpp
+9-11clang/test/Sema/warn-lifetime-safety-suggestions.cpp
+11-7clang/lib/Analysis/LifetimeSafety/Checker.cpp
+10-0clang/include/clang/Options/Options.td
+3-0clang/include/clang/Basic/LangOptions.def
+1-0clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+68-196 files

LLVM/project 09ae1bfflang/include/flang/Optimizer/Dialect FIROperationMoveOpInterface.td FIROperationMoveOpInterface.h, flang/lib/Optimizer/Dialect FIROperationMoveOpInterface.cpp

[flang] Added OperationMoveOpInterface for controlling LICM. (#175108)

In #173438 I added a FIR specific loop invariant code motion pass.

During the review, Tom pointed out certain limitations about OpenMP
dialect operations that should be taken into consideration during
transformations such as LICM:
https://github.com/llvm/llvm-project/pull/173438#discussion_r2657612148

I also found issues with hoisting operations out of `acc.loop`
operations in certain conditions (see the added test in `licm.fir`).

I am proposing a new operation interface that will allow to control
movement of operations during MLIR transformations. In particular, I
propose two methods (there might be more):
* op.canMoveOutOf(cand) - returns true, if it is allowed to move 'cand'
operation out of 'op'.
* op.canMoveFromDescendant(descendant, cand) - return true, if it is
allowed to move 'cand' out of 'descendant' and into 'op'.

    [13 lines not shown]
DeltaFile
+102-0flang/lib/Optimizer/OpenMP/Support/FIROpenMPOpsInterfaces.cpp
+68-0flang/test/Transforms/licm.fir
+49-0flang/lib/Optimizer/Dialect/FIROperationMoveOpInterface.cpp
+44-0flang/include/flang/Optimizer/Dialect/FIROperationMoveOpInterface.td
+42-0flang/include/flang/Optimizer/Dialect/FIROperationMoveOpInterface.h
+22-6flang/lib/Optimizer/Transforms/LoopInvariantCodeMotion.cpp
+327-69 files not shown
+404-615 files

LLVM/project c25c224lldb/test CMakeLists.txt

[lldb][CMake] Don't condition libc++ requirement on LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS (#175955)

This reverts:
```
commit 78769d51c6b183b6d88fbd1ef825fff7cf3aad21
Author: Adrian Prantl <aprantl at apple.com>
Date:   Tue Nov 4 08:29:47 2025 -0800

    [LLDB] Don't check for libcxx if LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS is off
```

This was needed as an [escape hatch for our ASAN
bot](https://github.com/llvm/llvm-zorg/commit/e78725d94b72227e4e524e9b76900ed197791419)
because we couldn't build libc++ on it. Ever since
https://github.com/llvm/llvm-zorg/pull/702 we can.

Most people wouldn't know to `LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS`
when building LLDB. Which means they'd never know to build libc++, and
thus would have worse test-coverage for our data-formatters.

    [5 lines not shown]
DeltaFile
+1-1lldb/test/CMakeLists.txt
+1-11 files

LLVM/project 16a2194mlir/test/Dialect/Tosa constant-op-fold.mlir tosa-layerwise-constant-fold.mlir

[mlir][tosa] Separate layerwise folding and simple folder tests (NFC) (#172691)

This commit moves the 'simple' folder tests (invoked via
`--canonicalize`) away from other layerwise constant folding tests
(invoked via `--tosa-layerwise-constant-fold`) into a separate test file
to help reduce confusion.

Also rename the layerwise folding test file to reflect the the pass name
that they are invoked by.
DeltaFile
+0-1,186mlir/test/Dialect/Tosa/constant-op-fold.mlir
+704-0mlir/test/Dialect/Tosa/tosa-layerwise-constant-fold.mlir
+509-1mlir/test/Dialect/Tosa/constant_folding.mlir
+1,213-1,1873 files

LLVM/project 2b03d68llvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp, llvm/test/Transforms/InstCombine simplify-demanded-fpclass.ll

InstCombine: Improve single use fabs SimplifyDemandedFPClass handling (#176359)

SimplifyDemandedFPClass's handling of fabs recently became smarter in
the multiple use case than single. Unify these so the single use case
is equally as smart. This includes propagating ninf / nnan context into
the instruction, and accounting for nsz if the only bit difference is
for zero.
DeltaFile
+33-8llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+33-0llvm/test/Transforms/InstCombine/simplify-demanded-fpclass.ll
+66-82 files

LLVM/project 5b767cellvm/lib/Target/ARM ARMSelectionDAGInfo.cpp

ARM: Avoid using getLibcallName

Get the symbol name from the LibcallImpl.
DeltaFile
+5-3llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp
+5-31 files

LLVM/project 5b4ed87llvm/lib/Target/AMDGPU AMDGPURegBankLegalizeRules.cpp, llvm/test/CodeGen/AMDGPU/GlobalISel ssubsat.ll saddsat.ll

[AMDGPU][GlobalISel] Add RegBankLegalize rules for [us]addsat/[us]subsat (#176255)

DeltaFile
+836-1,089llvm/test/CodeGen/AMDGPU/GlobalISel/ssubsat.ll
+795-1,060llvm/test/CodeGen/AMDGPU/GlobalISel/saddsat.ll
+332-221llvm/test/CodeGen/AMDGPU/GlobalISel/usubsat.ll
+332-221llvm/test/CodeGen/AMDGPU/GlobalISel/uaddsat.ll
+8-0llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+2,303-2,5915 files

LLVM/project c52a878llvm/lib/Target/AMDGPU AMDGPURegBankLegalizeHelper.cpp AMDGPURegBankLegalizeRules.cpp, llvm/test/CodeGen/AMDGPU/GlobalISel regbankselect-trunc.mir

[AMDGPU][GlobalISel] Fix G_TRUNC S16 to VCC for pre-GFX8 targets (#176254)

DeltaFile
+75-41llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-trunc.mir
+9-0llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeHelper.cpp
+5-1llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+1-0llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.h
+90-424 files

LLVM/project b7dd281llvm/lib/Target/AMDGPU AMDGPURegBankLegalizeHelper.cpp AMDGPUGlobalISelUtils.cpp, llvm/test/CodeGen/AMDGPU/GlobalISel fpext.ll unmerge-sgpr-s16.ll

AMDGPU/GlobalISel: Regbanklegalize rules for G_UNMERGE_VALUES

Move G_UNMERGE_VALUES handling to AMDGPURegBankLegalizeRules.cpp.
Fix sgpr S16 unmerge by lowering using shift and using S32.
Previously sgpr S16 unmerge was selected using _lo16 and _hi16 subreg
indexes which are exclusive to vgpr register classes.
For remaing cases we do trivial mapping, assigns same reg bank
to all operands, vgpr or sgpr.
DeltaFile
+47-0llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeHelper.cpp
+13-27llvm/test/CodeGen/AMDGPU/GlobalISel/fpext.ll
+36-0llvm/test/CodeGen/AMDGPU/GlobalISel/unmerge-sgpr-s16.ll
+16-0llvm/lib/Target/AMDGPU/AMDGPUGlobalISelUtils.cpp
+14-0llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+6-1llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.h
+132-282 files not shown
+140-318 files

LLVM/project aa61209llvm/lib/CodeGen/GlobalISel IRTranslator.cpp

GlobalISel: Use LibcallLoweringInfo more in IRTranslator
DeltaFile
+10-5llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
+10-51 files

LLVM/project a0caa61llvm/include/llvm/CodeGen/GlobalISel LegalizerHelper.h, llvm/lib/CodeGen/GlobalISel LegalizerHelper.cpp

GlobalISel: Use LibcallLoweringInfo more in LegalizerHelper

Avoid using TargetLowering for libcall information.
DeltaFile
+25-16llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+1-0llvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
+26-162 files

LLVM/project 2c16364mlir/test/python/dialects transform_interpreter.py

[MLIR][Python] add builtin module transform test (#176388)

See https://github.com/llvm/llvm-project/pull/176299
DeltaFile
+28-1mlir/test/python/dialects/transform_interpreter.py
+28-11 files

LLVM/project f09321dmlir/lib/Bindings/Python TransformInterpreter.cpp

remove stray merge
DeltaFile
+6-0mlir/lib/Bindings/Python/TransformInterpreter.cpp
+6-01 files

LLVM/project 9671aaellvm/lib/IR Verifier.cpp, llvm/lib/Transforms/Scalar DeadStoreElimination.cpp

[DSE][Verifier] Respect the calling convention of the function specified by "alloc-variant-zeroed" (#175911)

Require that the calling convention between the zeroed and non-zeroed
variants is the same, and set it appropriate in the DSE transform.
DeltaFile
+14-0llvm/test/Transforms/DeadStoreElimination/noop-stores.ll
+5-1llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
+5-0llvm/lib/IR/Verifier.cpp
+4-0llvm/test/Verifier/alloc-variant-zeroed.ll
+28-14 files

LLVM/project f7ee822llvm/include/llvm/Support KnownFPClass.h, llvm/test/Transforms/Attributor nofpclass-fmul.ll nofpclass.ll

ValueTracking: Propagate non-nan sources through fmul square (#176243)

ValueTracking: Propagate non-nan sources through fmul square

https://alive2.llvm.org/ce/z/hbZUfc
DeltaFile
+30-0llvm/test/Transforms/Attributor/nofpclass-fmul.ll
+1-1llvm/test/Transforms/Attributor/nofpclass.ll
+1-1llvm/test/Transforms/Attributor/nofpclass-nan-fmul.ll
+1-1llvm/unittests/Analysis/ValueTrackingTest.cpp
+1-0llvm/include/llvm/Support/KnownFPClass.h
+34-35 files

LLVM/project dfcb805llvm/lib/Target/X86 X86ISelLowering.cpp

X86: Avoid some uses of getLibcallName (#176365)

Query the LibcallImpl, check if it's supported, and generate
the symbol through the enum.
DeltaFile
+28-12llvm/lib/Target/X86/X86ISelLowering.cpp
+28-121 files

LLVM/project 25693dcllvm/lib/Target/Sparc SparcISelLowering.cpp SparcISelLowering.h

Sparc: Avoid passing around libfunc names for f128 operations (#176364)

DeltaFile
+31-41llvm/lib/Target/Sparc/SparcISelLowering.cpp
+1-2llvm/lib/Target/Sparc/SparcISelLowering.h
+32-432 files

LLVM/project d66d894mlir/test/python/dialects transform_interpreter.py

Update transform_interpreter.py
DeltaFile
+3-3mlir/test/python/dialects/transform_interpreter.py
+3-31 files

LLVM/project 7ec2aecllvm/lib/CodeGen/GlobalISel LegalizerHelper.cpp, llvm/test/Transforms/LoopVectorize multiple-early-exits.ll unsupported_early_exit.ll

Merge branch 'main' into users/arsenm/instcombine/improve-single-use-fabs-simplify-demanded-fpclass
DeltaFile
+315-79mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
+353-34mlir/lib/Dialect/XeGPU/Transforms/XeGPUWgToSgDistribute.cpp
+150-88llvm/test/Transforms/LoopVectorize/multiple-early-exits.ll
+222-0llvm/test/Transforms/LoopVectorize/unsupported_early_exit.ll
+104-111llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+183-0mlir/test/Dialect/XeGPU/xegpu-wg-to-sg-unify-ops.mlir
+1,327-31256 files not shown
+2,088-50062 files

LLVM/project 5d7975fmlir/test/python/dialects transform_interpreter.py

Update transform_interpreter.py
DeltaFile
+1-0mlir/test/python/dialects/transform_interpreter.py
+1-01 files

LLVM/project df63a02mlir/test/python/dialects transform_interpreter.py

Update transform_interpreter.py
DeltaFile
+8-1mlir/test/python/dialects/transform_interpreter.py
+8-11 files

LLVM/project 728c4b5llvm/test/CodeGen/AMDGPU fmul-to-ldexp.ll llvm.log10.ll

[AMDGPU] si-peephole-sdwa: Handle V_PACK_B32_F16_e64 (WIP)

Change si-peephole-sdwa to eliminate V_PACK_B32_F16_e64 instructions
by changing the second operand to write to the upper word of the
destination directly.
DeltaFile
+126-140llvm/test/CodeGen/AMDGPU/fmul-to-ldexp.ll
+138-98llvm/test/CodeGen/AMDGPU/llvm.log10.ll
+138-98llvm/test/CodeGen/AMDGPU/llvm.log.ll
+92-104llvm/test/CodeGen/AMDGPU/fpow.ll
+68-127llvm/test/CodeGen/AMDGPU/llvm.log2.ll
+74-118llvm/test/CodeGen/AMDGPU/mad-mix-lo.ll
+636-68529 files not shown
+1,251-1,34835 files

LLVM/project 74a9e06llvm/lib/Target/AMDGPU SIISelLowering.cpp, llvm/test/CodeGen/AMDGPU llvm.cos.f16.ll llvm.sin.f16.ll

[AMDGPU] Enable ISD::{FSIN,FCOS} custom lowering to work on v2f16

Currently ISD::FSIN and ISD::FCOS of type MVT::v2f16 are legalized by
first expanding and then using a custom lowering on the resulting f16
instructions. This ordering prevents using packed math variants of the
instructions introduced by the legalization (e.g. the multiplication),
if available, and makes it difficult to eliminate the packing of the
results by using SDWA form; previous attempts to deal with the latter
situation in the si-peephole-sdwa pass were unwieldly since it was
necessary to reconstruct the association between the source and target
vectors.

Change the legalization action for ISD::FSIN and ISD::FCOS of type
MTF::v2f16 to Custom and change the custom intrinsic lowering to deal
with the v2f16 for the intrinsics introduced in this way.
DeltaFile
+27-38llvm/test/CodeGen/AMDGPU/llvm.cos.f16.ll
+27-38llvm/test/CodeGen/AMDGPU/llvm.sin.f16.ll
+34-3llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+88-793 files

LLVM/project 516fcd8llvm/lib/Target/AMDGPU SIISelLowering.cpp

[AMDGPU] SIIselLowering: Use intrinsics in LowerTrig

This allows to apply further legalization actions to the
resulting nodes which is a preparatory step to extend the
custom lowering to vector types.
DeltaFile
+12-9llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+12-91 files

LLVM/project e90dd53clang/include/clang/Analysis/Analyses/LifetimeSafety FactsGenerator.h Loans.h, clang/lib/Analysis/LifetimeSafety FactsGenerator.cpp

std_move false positive
DeltaFile
+23-0clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+18-0clang/test/Sema/warn-lifetime-safety.cpp
+5-0clang/include/clang/Analysis/Analyses/LifetimeSafety/FactsGenerator.h
+2-0clang/include/clang/Analysis/Analyses/LifetimeSafety/Loans.h
+48-04 files

LLVM/project 9a2d3abmlir/lib/Dialect/XeGPU/IR XeGPUDialect.cpp, mlir/lib/Dialect/XeGPU/Transforms XeGPUWgToSgDistribute.cpp

[MLIR][XeGPU] Add support for cross-subgroup reduction from wg to sg (#170936)

This PR adds support for cross-sg reduction whilst distributing from
workgroup to subgroup. It has following limitation
1. Cannot reduce to a scalar
2. For cross-sg, only 1:1 decomposition (each sg should be assigned only
one tile in the original WG tile) is supported for now. For example for
a WG tile of size 256x128, sg_layout = [8, 4], sg_data = [16, 16] wont
be supported.
DeltaFile
+353-34mlir/lib/Dialect/XeGPU/Transforms/XeGPUWgToSgDistribute.cpp
+183-0mlir/test/Dialect/XeGPU/xegpu-wg-to-sg-unify-ops.mlir
+0-19mlir/test/Dialect/XeGPU/invalid.mlir
+6-11mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp
+3-1mlir/test/Dialect/XeGPU/xegpu-wg-to-sg-unify-ops-rr.mlir
+545-655 files

LLVM/project 1056e32llvm/test/Transforms/LoopVectorize multiple-early-exits.ll unsupported_early_exit.ll

[LV] Precommit additional early-exit tests from #174864.

Pre-commit tests from https://github.com/llvm/llvm-project/pull/174864.
DeltaFile
+150-88llvm/test/Transforms/LoopVectorize/multiple-early-exits.ll
+222-0llvm/test/Transforms/LoopVectorize/unsupported_early_exit.ll
+39-0llvm/test/Transforms/LoopVectorize/early_exit_legality.ll
+33-0llvm/test/Transforms/LoopVectorize/uncountable-early-exit-vplan.ll
+444-884 files

LLVM/project b86c84cflang/lib/Lower Bridge.cpp

[flang] Handle unused variable (NFC) (#176274)

DeltaFile
+1-2flang/lib/Lower/Bridge.cpp
+1-21 files

LLVM/project 554d6ae.github/workflows release-tasks.yml

[github] Fix release parameter to uncomment download links step (#176386)

I thought I could remove validate-tag from the "needs" because
release-binaries also "needs" validate-tag. Turns out that we get the
release version from an output of validate-tag and if it isn't in the
"needs" section we get an empty string when substitution happens.
Leading to this error:

./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN"
--release uncomment_download_links
github-upload-release.py: error: the following arguments are required:
command

Put back validate-tag.

Fixes 822a45f4b4909289f84d119f1e5891b486d74f5e.
DeltaFile
+1-0.github/workflows/release-tasks.yml
+1-01 files

LLVM/project 052fb00clang/include/clang/Options Options.td, clang/test/Driver cl-options.c

[clang] Expose -fmodules-disable-diagnostic-validation as clang-cl option (#176285)

DeltaFile
+1-1clang/include/clang/Options/Options.td
+1-0clang/test/Driver/cl-options.c
+2-12 files