LLVM/project 0ba7790mlir/lib/Transforms RemoveDeadValues.cpp, mlir/test/Transforms remove-dead-values.mlir

tmp commit

simple test working

draft: do not erase IR, just replace uses
DeltaFile
+183-313mlir/lib/Transforms/RemoveDeadValues.cpp
+109-44mlir/test/Transforms/remove-dead-values.mlir
+292-3572 files

LLVM/project 3016679mlir/include/mlir/Dialect/OpenACC/Transforms Passes.td, mlir/lib/Dialect/OpenACC/Transforms ACCIfClauseLowering.cpp CMakeLists.txt

[mlir][acc] Add ACCIfClauseLowering pass (#173573)

This pass lowers OpenACC compute constructs with `if` clauses into
`scf.if` with separate device and host paths.

Before:
```
  %d = acc.copyin varPtr(%a : memref<10xf32>) -> memref<10xf32>
  acc.parallel dataOperands(%d) if(%cond) {
    acc.loop control(%i : i32) = (%c0 : i32) to (%c10 : i32) step (%c1 :
i32) {
      // loop body
      acc.yield
    }
    acc.yield
  }
  acc.copyout accPtr(%d) to varPtr(%a)
```


    [20 lines not shown]
DeltaFile
+245-0mlir/lib/Dialect/OpenACC/Transforms/ACCIfClauseLowering.cpp
+224-0mlir/test/Dialect/OpenACC/acc-if-clause-lowering.mlir
+35-0mlir/include/mlir/Dialect/OpenACC/Transforms/Passes.td
+1-0mlir/lib/Dialect/OpenACC/Transforms/CMakeLists.txt
+505-04 files

LLVM/project 16ed5ec.ci generate_test_report_lib.py premerge_advisor_explain.py

[CI] Finish Python Version TODOs

There were a couple TODOs in .ci related to Python typing changes after
v3.10. Now that Windows is python version matched to Linux at Python
3.12, we do not need to keep using the old syntax.
DeltaFile
+2-4.ci/generate_test_report_lib.py
+1-5.ci/premerge_advisor_explain.py
+3-92 files

LLVM/project 88039f8llvm/include/llvm/IR PassManager.h

[PassManager] Use ListSeparator. NFC (#173462)

Change-Id: I40fa748d2c188171caccff7cb418c6be74c22fb8
DeltaFile
+4-4llvm/include/llvm/IR/PassManager.h
+4-41 files

LLVM/project 30c6bbellvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 alternate-op-constant.ll

[SLP]Check if the value has uselist before asking for uses

Need to check if the value has uselist before asking for uses to fix
a compiler crash

Fixes #173569
DeltaFile
+17-0llvm/test/Transforms/SLPVectorizer/X86/alternate-op-constant.ll
+2-0llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+19-02 files

LLVM/project 966ae44llvm/lib/Target/AMDGPU SIRegisterInfo.td

[NFC][AMDGPU] Improve the alignment of some TableGen code (#173524)

DeltaFile
+75-75llvm/lib/Target/AMDGPU/SIRegisterInfo.td
+75-751 files

LLVM/project 6c9ca02mlir/include/mlir/Dialect/OpenACC/Transforms ACCSpecializePatterns.h, mlir/lib/Dialect/OpenACC/Transforms ACCSpecializeForHost.cpp ACCSpecializeForDevice.cpp

[mlir][acc] Add ACCSpecializeForDevice and ACCSpecializeForHost passe… (#173527)

[mlir][acc] Add ACCSpecializeForDevice and ACCSpecializeForHost passes

Add two new transformation passes for specializing OpenACC IR for
different execution contexts:

ACCSpecializeForDevice:
- Strips OpenACC constructs that are invalid in device code
- Replaces data entry ops with their var operands
- Unwraps regions from compute/data constructs
- Erases runtime operations (init, shutdown, wait, etc.)

This pass is applicable in two contexts:
1. Functions marked with `acc.specialized_routine` attribute, where the
entire function body is device code
2. Non-specialized functions, where patterns are applied only to `acc`
operations nested inside compute constructs (parallel, serial, kernels),
not to the constructs themselves

    [25 lines not shown]
DeltaFile
+471-0mlir/lib/Dialect/OpenACC/Transforms/ACCSpecializeForHost.cpp
+404-0mlir/test/Dialect/OpenACC/acc-specialize-for-host.mlir
+204-0mlir/test/Dialect/OpenACC/acc-specialize-for-device.mlir
+172-0mlir/lib/Dialect/OpenACC/Transforms/ACCSpecializeForDevice.cpp
+157-0mlir/test/Dialect/OpenACC/acc-specialize-for-host-fallback.mlir
+122-0mlir/include/mlir/Dialect/OpenACC/Transforms/ACCSpecializePatterns.h
+1,530-06 files not shown
+1,705-7512 files

LLVM/project 07a9daelibcxx/include future, libcxx/test/std/thread/futures/futures.async async.verify.cpp async.pass.cpp

[libc++] Implement LWG3476: Remove incorrect decay-copy in std::async and add QoI static_assert improvements (#173363)

Fixes https://github.com/llvm/llvm-project/issues/104307

This patch implements LWG3476 by removing the incorrect decay-copy in
std::async. The decay-copy was being applied twice, once explicitly via
_LIBCPP_AUTO_CAST and once in __async_func's tuple constructor.
(https://github.com/llvm/llvm-project/issues/143828)

It also adds static_assert mandates to std::thread and std::async (which
were already implicitly enforced) and expands test coverage.
DeltaFile
+96-0libcxx/test/std/thread/thread.jthread/cons.verify.cpp
+94-0libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.verify.cpp
+71-0libcxx/test/std/thread/futures/futures.async/async.verify.cpp
+25-0libcxx/test/std/thread/thread.jthread/cons.func.token.pass.cpp
+25-0libcxx/test/std/thread/futures/futures.async/async.pass.cpp
+10-6libcxx/include/future
+321-63 files not shown
+342-79 files

LLVM/project 46d235dllvm/test/CodeGen/AArch64 atomic-ops-lse.ll trampoline.ll

[AArch64] Consider MOVaddr* as cheap if fuse-adrp-add

These pseudo-instructions usually translate into a pair of adrp+add and
have a single cycle latency on some micro-architectures.
DeltaFile
+88-88llvm/test/CodeGen/AArch64/atomic-ops-lse.ll
+43-34llvm/test/CodeGen/AArch64/trampoline.ll
+55-0llvm/test/CodeGen/AArch64/cheap-as-a-move-MOVaddr.ll
+34-19llvm/test/CodeGen/AArch64/machine-outliner-loh.ll
+14-12llvm/test/CodeGen/AArch64/cfguard-checks.ll
+12-10llvm/test/CodeGen/AArch64/atomic-ops.ll
+246-16310 files not shown
+291-19416 files

LLVM/project cdcc5d4llvm/lib/Target/AVR AVRInstrInfo.td AVRExpandPseudoInsts.cpp

[AVR] Set mayLoad/mayStore flags of some load/store instructions (#172986)

fixes https://github.com/llvm/llvm-project/issues/156782
DeltaFile
+75-57llvm/lib/Target/AVR/AVRInstrInfo.td
+3-3llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp
+78-602 files

LLVM/project c2a8739llvm/lib/Transforms/Vectorize LoopVectorize.cpp VPlanConstruction.cpp

[VPlan] Split off VPReductionRecipe creation for in-loop reductions (NFC) (#168784)

This patch splits off VPReductionRecipe creation for in-loop reductions
to a separate transform from adjustInLoopReductions, which has been
renamed.

The new transform has been updated to work directly on VPInstructions,
and gets applied after header phis have been processed, once on VPlan0.

Builds on top of https://github.com/llvm/llvm-project/pull/168291 and
https://github.com/llvm/llvm-project/pull/166099 which should be
reviewed first.

PR: https://github.com/llvm/llvm-project/pull/168784
DeltaFile
+12-168llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+163-0llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
+7-8llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
+9-0llvm/lib/Transforms/Vectorize/VPlanTransforms.h
+191-1764 files

LLVM/project 7937621mlir/lib/Transforms RemoveDeadValues.cpp, mlir/test/Transforms remove-dead-values.mlir

tmp commit

simple test working

draft: do not erase IR, just replace uses
DeltaFile
+157-311mlir/lib/Transforms/RemoveDeadValues.cpp
+109-44mlir/test/Transforms/remove-dead-values.mlir
+266-3552 files

LLVM/project 7e3d572mlir/lib/Transforms RemoveDeadValues.cpp, mlir/test/Transforms remove-dead-values.mlir

tmp commit

simple test working

draft: do not erase IR, just replace uses
DeltaFile
+138-289mlir/lib/Transforms/RemoveDeadValues.cpp
+109-44mlir/test/Transforms/remove-dead-values.mlir
+247-3332 files

LLVM/project db70228mlir/lib/Transforms RemoveDeadValues.cpp, mlir/test/Transforms remove-dead-values.mlir

tmp commit

simple test working

draft: do not erase IR, just replace uses
DeltaFile
+138-289mlir/lib/Transforms/RemoveDeadValues.cpp
+82-46mlir/test/Transforms/remove-dead-values.mlir
+220-3352 files

LLVM/project 529a159mlir/lib/Dialect/SCF/IR SCF.cpp, mlir/test/Dialect/SCF canonicalize.mlir

[mlir][SCF] Fold unused `index_switch` results
DeltaFile
+51-1mlir/lib/Dialect/SCF/IR/SCF.cpp
+31-0mlir/test/Dialect/SCF/canonicalize.mlir
+82-12 files

LLVM/project 991455ellvm/lib/Transforms/Utils SCCPSolver.cpp, llvm/test/Transforms/SCCP bitcast-vector-refinement.l.ll

[SCCP] Use mergeInValue instead of markConstant when folding CastInst (#173190)

Fixes #173180 

The crash occurs when a vector constant refines its value during
iterative analysis.
In `SCCPInstVisitor::visitCastInst`, the logic for folding constants
through a `CastInst` uses `markConstant`. This function is strictly
designed for initial assignments and contains an assertion that prevents
a lattice element from being updated with a different constant pointer.

During the analysis of loops or complex data flows, a vector constant
may "refine." For example:

First Pass: SCCP identifies a value as `<4 x i64> {poison, poison,
poison, 0}`.

Second Pass: The value refines to `<4 x i64> zeroinitializer`.


    [10 lines not shown]
DeltaFile
+29-0llvm/test/Transforms/SCCP/bitcast-vector-refinement.l.ll
+5-2llvm/lib/Transforms/Utils/SCCPSolver.cpp
+34-22 files

LLVM/project 11a1fc4libcxx/test/std/containers/sequences/array empty.verify.cpp compare.verify.cpp, libcxx/test/std/containers/sequences/array/array.cons deduct.verify.cpp

[libc++][NFC] Refactor `std::array`'s `verify.cpp` tests (#173455)

This came up in a review previously: replaces `main()` in some
`verify.cpp` tests.
DeltaFile
+0-24libcxx/test/std/containers/sequences/array/empty.verify.cpp
+7-11libcxx/test/std/containers/sequences/array/array.swap/swap.verify.cpp
+3-4libcxx/test/std/containers/sequences/array/array.creation/to_array.verify.cpp
+3-4libcxx/test/std/containers/sequences/array/array.cons/deduct.verify.cpp
+1-3libcxx/test/std/containers/sequences/array/compare.verify.cpp
+1-3libcxx/test/std/containers/sequences/array/array.fill/fill.verify.cpp
+15-491 files not shown
+16-507 files

LLVM/project 71bba12clang/include/clang/Lex Preprocessor.h, clang/lib/Lex Preprocessor.cpp PPDirectives.cpp

Revert "Reapply "[C++20][Modules] Implement P1857R3 Modules Dependency Discovery" (#173130)" (#173549)

This reverts commit 0d1c396ce8178baf05f277b16bf41b8a6b847d6d.

Co-authored-by: Yihan Wang <yihwang at nvidia.com>
DeltaFile
+211-279clang/lib/Lex/Preprocessor.cpp
+31-441clang/lib/Lex/PPDirectives.cpp
+0-207clang/test/CXX/module/cpp.pre/p1.cpp
+61-135clang/include/clang/Lex/Preprocessor.h
+15-149clang/lib/Lex/DependencyDirectivesScanner.cpp
+77-47clang/lib/Parse/Parser.cpp
+395-1,25838 files not shown
+537-1,70944 files

LLVM/project 6d1e7d4llvm/lib/IR IRBuilder.cpp, llvm/test/Transforms/LoopVectorize step-vector-i1-wrapping.ll

[LV][IRBuilder] Allow implicit truncation of step vector (#173229)

LV can create step vectors that wrap around, e.g. `step-vector i1` with
VF>2. Allow truncation when creating the vector constant to avoid an
assertion failure with https://github.com/llvm/llvm-project/pull/171456.

After https://github.com/llvm/llvm-project/pull/173494 the definition of
the llvm.stepvector intrinsic has been changed to make it have wrapping
semantics, so the semantics for the fixed and scalable case match now.
DeltaFile
+38-0llvm/test/Transforms/LoopVectorize/step-vector-i1-wrapping.ll
+3-1llvm/lib/IR/IRBuilder.cpp
+41-12 files

LLVM/project 63d57b9mlir/lib/Transforms RemoveDeadValues.cpp, mlir/test/Transforms remove-dead-values.mlir

tmp commit

simple test working

draft: do not erase IR, just replace uses
DeltaFile
+115-287mlir/lib/Transforms/RemoveDeadValues.cpp
+66-45mlir/test/Transforms/remove-dead-values.mlir
+181-3322 files

LLVM/project f5dadffmlir/lib/Transforms RemoveDeadValues.cpp

[mlir][Transforms][NFC] `remove-dead-values`: Split `OperationToCleanup`
DeltaFile
+9-4mlir/lib/Transforms/RemoveDeadValues.cpp
+9-41 files

LLVM/project 64e7f72libcxx/include ios, libcxx/include/__ios fpos.h

[libc++][ios] Applied `[[nodiscard]]` (#173520)

`[[nodiscard]]` should be applied to functions where discarding the
return value is most likely a correctness issue.

- https://libcxx.llvm.org/CodingGuidelines.htm
- https://wg21.link/iostreams.base
DeltaFile
+89-0libcxx/test/libcxx/input.output/iostreams.base/nodiscard.verify.cpp
+30-30libcxx/include/ios
+5-5libcxx/include/__ios/fpos.h
+124-353 files

LLVM/project 0d1c396clang/include/clang/Lex Preprocessor.h, clang/lib/Lex Preprocessor.cpp PPDirectives.cpp

Reapply "[C++20][Modules] Implement P1857R3 Modules Dependency Discovery" (#173130)

This PR reapply https://github.com/llvm/llvm-project/pull/107168.

---------

Signed-off-by: Wang, Yihan <yronglin777 at gmail.com>
Signed-off-by: yronglin <yronglin777 at gmail.com>
DeltaFile
+277-209clang/lib/Lex/Preprocessor.cpp
+441-31clang/lib/Lex/PPDirectives.cpp
+207-0clang/test/CXX/module/cpp.pre/p1.cpp
+135-61clang/include/clang/Lex/Preprocessor.h
+150-16clang/lib/Lex/DependencyDirectivesScanner.cpp
+47-77clang/lib/Parse/Parser.cpp
+1,257-39438 files not shown
+1,708-53644 files

LLVM/project 3da3934llvm/docs LangRef.rst, llvm/lib/Transforms/InstCombine InstCombineVectorOps.cpp

[LLVM][LangRef] Redefine out-of-range stepvector values as being truncated. (#173494)

The LangRef current defines out-of-range stepvector values as poison.
This property is at odds with both the expansion used for fixed-length
vectors and the equivalent ISD node, both of which implicitly truncate
out-of-range values.
DeltaFile
+5-2llvm/test/Transforms/InstCombine/vscale_extractelement.ll
+3-2llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
+1-1llvm/docs/LangRef.rst
+9-53 files

LLVM/project 91c65d6mlir/lib/Transforms RemoveDeadValues.cpp

[mlir][Transforms][NFC] `remove-dead-values`: Simplify dropped value handling
DeltaFile
+7-14mlir/lib/Transforms/RemoveDeadValues.cpp
+7-141 files

LLVM/project 510a459mlir/lib/Transforms RemoveDeadValues.cpp

[mlir][Transforms] `remove-dead-values`: Use proper rewriter API
DeltaFile
+5-9mlir/lib/Transforms/RemoveDeadValues.cpp
+5-91 files

LLVM/project 36f2c32mlir/lib/Transforms RemoveDeadValues.cpp, mlir/test/Transforms remove-dead-values.mlir

draft: do not erase IR, just replace uses
DeltaFile
+107-181mlir/lib/Transforms/RemoveDeadValues.cpp
+66-45mlir/test/Transforms/remove-dead-values.mlir
+173-2262 files

LLVM/project 94c014alibcxx/docs/ReleaseNotes 22.rst

[libc++][NFC] Fixed formatting in Release Notes (#173526)

DeltaFile
+1-1libcxx/docs/ReleaseNotes/22.rst
+1-11 files

LLVM/project 8e335e9clang/include/clang/Basic BuiltinsX86_64.td, clang/lib/Headers amxavx512intrin.h

[X86][AMX-AVX512] Add required/min vector width 512 constraint (#173532)

We use ZMM registers in AMX-AVX512 instructions.

Fixes: https://godbolt.org/z/GsY167Yzn
DeltaFile
+2-2clang/include/clang/Basic/BuiltinsX86_64.td
+1-1clang/lib/Headers/amxavx512intrin.h
+3-32 files

LLVM/project 347c600clang/lib/Format TokenAnnotator.cpp, clang/unittests/Format FormatTest.cpp

[clang-format] Fix a crash in formatting unbalanced angle brackets (#173456)

Fixes #173382
DeltaFile
+6-1clang/unittests/Format/FormatTest.cpp
+1-3clang/lib/Format/TokenAnnotator.cpp
+7-42 files