LLVM/project e55c853flang/lib/Lower Bridge.cpp, flang/test/Lower/OpenMP requires-usm.f90

[Flang][OpenMP] Extend omp requires detection in Bridge.cpp (#188106)

Currently, we do not check the module for requires directives, which
means we'll miss these and not set them on the OpenMP module.

Otherwise, due to the first come first serve method we currently check
the symbols, there is certain formats that would mean the compiler would
miss that a user had specified requires somewhere in the module. This is
partially but not fully avoided by the Semantics layer pushing the
requires on to the top most PFT symbol, as it is entirely possible to
create a legal Fortran program where you could have two or more of these
(e.g. module and main program in one file, standalone funcitons
intermixed with modules or main program). Some examples of this are
shown in the added Fortran test. This PR opts to resolve it by gathering
all of the relevant symbols and processing them.

Also removed gathering from BlockDataUnit as I don't think these symbols
ever get the requires applied.
DeltaFile
+56-0flang/test/Lower/OpenMP/requires-usm.f90
+16-11flang/lib/Lower/Bridge.cpp
+72-112 files

LLVM/project fbf4840mlir/include/mlir/Dialect/SparseTensor/Pipelines Passes.h, mlir/lib/Dialect/SparseTensor/Pipelines SparseTensorPipelines.cpp

[mlir][sparse] add GPU num threads to sparsifier options (#189078)

This change adds a `gpu-num-threads` option to the sparsifier. This
allows users to specify the number of threads used for GPU codegen,
similar to the `num-threads` option in the `-sparse-gpu-codegen` pass.
DeltaFile
+7-0mlir/include/mlir/Dialect/SparseTensor/Pipelines/Passes.h
+2-1mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp
+9-12 files

LLVM/project 24b6ee9llvm/lib/CodeGen/SelectionDAG SelectionDAG.cpp

[SelectionDAG] Assert on non-FP operand to `computeKnownFPClass` (#189752)

Assert correct usage of `computeKnownFPClass` or users (i.e.,
`isKnownNeverNaN`).
DeltaFile
+1-0llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+1-01 files

LLVM/project b71eaceutils/bazel/llvm-project-overlay/mlir BUILD.bazel

[Bazel] Fixes 91adaec (#189998)

This fixes 91adaeceb162357a33e2ea6155cb13a4198a981a.

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+1-0utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+1-01 files

LLVM/project 07fc9b8llvm/lib/Target/RISCV RISCVISelLowering.cpp RISCVTargetTransformInfo.h, llvm/test/CodeGen/RISCV/rvv vfmax-vp.ll vfmin-vp.ll

[RISCV] Remove codegen for vp_minnum, vp_maxnum (#189899)

Part of the work to remove trivial VP intrinsics from the RISC-V
backend, see
https://discourse.llvm.org/t/rfc-remove-codegen-support-for-trivial-vp-intrinsics-in-the-risc-v-backend/87999

This splits off 2 intrinsics from #179622.
DeltaFile
+165-233llvm/test/CodeGen/RISCV/rvv/vfmax-vp.ll
+165-233llvm/test/CodeGen/RISCV/rvv/vfmin-vp.ll
+70-113llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vfmax-vp.ll
+70-113llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vfmin-vp.ll
+1-7llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+0-2llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
+471-7016 files

LLVM/project 26a5a49llvm/lib/Analysis DependenceAnalysis.cpp

[DA] factor out repetitive code in GCD test (NFCI) (#189461)

The logic for recursively investigating the source and destination
AddRecs in GCD test is the same and can be factored out.
DeltaFile
+27-36llvm/lib/Analysis/DependenceAnalysis.cpp
+27-361 files

LLVM/project 996157cclang/lib/AST/ByteCode Interp.h

Fully disable `preserve_none` under ASan (#190001)

This crashes Clang 19, 21, and 22 on x86-64 that I've tested and I don't
have a ready-to-test build of any other versions but it seems much safer
to just disable for now.
DeltaFile
+5-5clang/lib/AST/ByteCode/Interp.h
+5-51 files

LLVM/project 7c4b6decompiler-rt/lib/scudo/standalone combined.h, compiler-rt/lib/scudo/standalone/tests combined_test.cpp

[scudo] Ensure that reallocate copies everything

getUsableSize returns the actual capacity of the underlying block, which
may be larger than the size originally requested by the user. If the
user writes data into this extra space accessible via getUsableSize and
subsequently calls reallocate, the existing implementation only copies
the original requested number of bytes. This resulted in data loss for
any information stored beyond the requested size but within the usable
bounds.
DeltaFile
+24-0compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
+1-4compiler-rt/lib/scudo/standalone/combined.h
+25-42 files

LLVM/project 33ca7a4llvm/lib/Transforms/Scalar LICM.cpp, llvm/test/Transforms/LICM hoist-binop.ll

[LICM] Reassociate add/sub expressions to hoist invariant computations (#183082)

While `sub` is not associative, we can still reassociate `add` and
`sub`.

## Alive2 proofs

| Case | Transform | Proof |
|------|-----------|-------|
| 1 | `(x + c1) - c2` => `x + (c1 - c2)` |
[proof](https://alive2.llvm.org/ce/z/iofzYy) |
| 2 | `(x - c1) - c2` => `x - (c1 + c2)` |
[proof](https://alive2.llvm.org/ce/z/U4K_tE) |
| 3 | `(x - c1) + c2` => `x + (c2 - c1)` |
[proof](https://alive2.llvm.org/ce/z/moiJVw) |
DeltaFile
+154-5llvm/test/Transforms/LICM/hoist-binop.ll
+92-0llvm/lib/Transforms/Scalar/LICM.cpp
+246-52 files

LLVM/project 66d1dc4lldb/packages/Python/lldbsuite/test lldbutil.py

Revert "[lldb] Increase timeout on lldbutil.wait_for_file_on_target" (#190004)

Reverts llvm/llvm-project#189471 because it seems like this breaks the
Sanitized bots:
https://github.com/llvm/llvm-project/pull/189471#issuecomment-4171688975
DeltaFile
+12-7lldb/packages/Python/lldbsuite/test/lldbutil.py
+12-71 files

LLVM/project 45b932aflang/docs Extensions.md

[flang] Update Flang Extension doc to reflect previous change (#188088)

Update Flang Extension doc to remove note about a warning that was
removed in a previous PR (PR #178088). It is an oversight that this doc
change was not made in that previous PR. The oversight was only recently
discovered and has led to this PR.
DeltaFile
+0-5flang/docs/Extensions.md
+0-51 files

LLVM/project 166806eflang/lib/Semantics mod-file.cpp resolve-names.cpp, flang/test/Semantics modfile84.f90

Revert "[flang] Preserve UseErrorDetails in module files (#189423)" (#189997)

This reverts commit fce3a66f5e2f247890c57ac01a2c9847358c0f27. It broke a
Fortran application in our in-house testing.
DeltaFile
+3-16flang/lib/Semantics/mod-file.cpp
+0-19flang/test/Semantics/modfile84.f90
+0-14flang/test/Semantics/Inputs/modfile84.f90
+1-1flang/lib/Semantics/resolve-names.cpp
+0-1flang/lib/Semantics/mod-file.h
+4-515 files

LLVM/project 809239allvm/lib/Analysis DependenceAnalysis.cpp

address the nit command from code review
DeltaFile
+1-1llvm/lib/Analysis/DependenceAnalysis.cpp
+1-11 files

LLVM/project 8c9a181llvm/test/CodeGen/AMDGPU memory-legalizer-private-singlethread.ll memory-legalizer-private-workgroup.ll

Merge branch 'main' into users/amehsan/weakc-delta-overflow
DeltaFile
+8,544-1,366llvm/test/CodeGen/AMDGPU/memory-legalizer-private-singlethread.ll
+8,544-1,366llvm/test/CodeGen/AMDGPU/memory-legalizer-private-workgroup.ll
+8,544-1,366llvm/test/CodeGen/AMDGPU/memory-legalizer-private-wavefront.ll
+8,449-1,355llvm/test/CodeGen/AMDGPU/memory-legalizer-private-cluster.ll
+8,449-1,355llvm/test/CodeGen/AMDGPU/memory-legalizer-private-agent.ll
+8,069-1,315llvm/test/CodeGen/AMDGPU/memory-legalizer-private-system.ll
+50,599-8,1231,153 files not shown
+235,546-47,6861,159 files

LLVM/project d7e129dllvm/lib/CodeGen/SelectionDAG SelectionDAGBuilder.cpp

[SelectionDAGBuilder] Only check VPCmp for NaNs in fp comparisons (#189749)

`getFCmpCodeWithoutNaN` should only be used for FP comparisons (which is
also the only context in which `isKnownNeverNaN` makes sense).
DeltaFile
+13-8llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+13-81 files

LLVM/project 91adaecclang/include/clang/CIR/Dialect/OpenMP RegisterOpenMPExtensions.h, clang/lib/CIR/CodeGen CIRGenerator.cpp

[CIR][MLIR][OpenMP] Enable the MarkDeclareTarget pass for ClangIR (#189420)

This patch enables the MarkDeclareTarget for CIR by adding the pass to
the lowerings and attaching the declare target interface to the
cir::FuncOp. The MarkDeclareTarget is also generalized to work on the
FunctionOpInterface instead of func::Op since it needs to be able to
handle cir::FuncOp as well.

Co-authored-by: Claude Opus 4.6 <noreply at anthropic.com>
DeltaFile
+31-29mlir/lib/Dialect/OpenMP/Transforms/MarkDeclareTarget.cpp
+53-0clang/test/CIR/Transforms/omp-mark-declare-target.cir
+26-0clang/lib/CIR/Dialect/OpenMP/RegisterOpenMPExtensions.cpp
+22-0clang/include/clang/CIR/Dialect/OpenMP/RegisterOpenMPExtensions.h
+11-0clang/lib/CIR/Dialect/OpenMP/CMakeLists.txt
+3-1clang/lib/CIR/CodeGen/CIRGenerator.cpp
+146-309 files not shown
+161-3115 files

LLVM/project 44979bellvm/lib/Transforms/Vectorize VPlanUtils.cpp

[VPlan] Strip dead code in isUniformAcrossVFsAndUFs (NFC) (#189687)

Checking a VPInstruction for scalar-cast is equivalent to checking
opcode against Instruction::isCast via preservesUniformity.
DeltaFile
+2-4llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
+2-41 files

LLVM/project 0211c74libunwind/src Registers.hpp

Fix code formatting
DeltaFile
+2-2libunwind/src/Registers.hpp
+2-21 files

LLVM/project 5c36ef8flang/lib/Optimizer/HLFIR/Transforms BufferizeHLFIR.cpp, flang/test/HLFIR bufferize-associate-block-ordering.fir

[flang] fix a dangling else in allOtherUsesAreSafeForAssociate (#189748)

Fix a dangling if condition in allOtherUsesAreSafeForAssociate that
caused isBeforeInBlock to be called even when instructions were known to
not be in the same block, triggering an assertion. The condition was
changed to else if and added brackets.

---------

Co-authored-by: Yebin Chon <ychon at nvidia.com>
DeltaFile
+41-0flang/test/HLFIR/bufferize-associate-block-ordering.fir
+3-2flang/lib/Optimizer/HLFIR/Transforms/BufferizeHLFIR.cpp
+44-22 files

LLVM/project 82e8494llvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize/VPlan dissolve-replicate-regions.ll

[VPlan] Avoid unnecessary BTC SymbolicValue creation (NFC) (#189929)

Don't unnecessarily create a backedge-taken-count SymbolicValue. This
allows us to simplify some code.
DeltaFile
+19-19llvm/test/Transforms/LoopVectorize/VPlan/dissolve-replicate-regions.ll
+5-5llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+24-242 files

LLVM/project f918af7flang/lib/Semantics openmp-utils.cpp check-omp-structure.cpp

[flang][OpenMP] Remove qualification from evaluate::SymbolVector, NFC (#189984)

`SymbolVector` is defined in flang/Semantics/symbol.h, so there is no
need to use a namespace-qualified name for it in lib/Semantics.
DeltaFile
+22-22flang/lib/Semantics/openmp-utils.cpp
+1-1flang/lib/Semantics/check-omp-structure.cpp
+1-1flang/lib/Semantics/check-omp-atomic.cpp
+24-243 files

LLVM/project 015f864lldb/source/Plugins/TypeSystem/Clang TypeSystemClang.cpp

[lldb] Const some ASTContext pointers in TypeSystemClang (NFC) (#189975)
DeltaFile
+4-4lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+4-41 files

LLVM/project 1e06cd6llvm/lib/Transforms/Vectorize SLPVectorizer.cpp

[SLP][NFC] Fix uninitialized ReductionRoot in getTreeCost

ReductionRoot was initialized to nullptr instead of the RdxRoot
parameter. This caused two ScaleCost calls (for MinBWs cast cost and
ReductionBitWidth resize cost) to pass nullptr as the user instruction,
and suppressed the "Reduction Cost" line in debug output. In practice
the scale factor is the same because the tree root's main op and the
reduction root share the same basic block, so this is NFC.

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/189994
DeltaFile
+2-2llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+2-21 files

LLVM/project 27c8596llvm/lib/MC MCWin64EH.cpp

[win][x64] Unwind v2: When making headroom leave space for the header (#188368)

When the `ensureHeadroom` call was added during unwind v2 info emission,
it didn't take into account that there is a header of 2-bytes before all
the fixups, so not enough space was actually reserved.
DeltaFile
+2-1llvm/lib/MC/MCWin64EH.cpp
+2-11 files

LLVM/project 5d9eb0cllvm/docs AMDGPUUsage.rst, llvm/lib/Target/AMDGPU GCNProcessors.td

[AMDGPU] Define new targets gfx1171 and gfx1172 (#187735)
DeltaFile
+24-8llvm/docs/AMDGPUUsage.rst
+18-0llvm/test/tools/llvm-readobj/ELF/AMDGPU/elf-headers.test
+14-0llvm/test/Object/AMDGPU/elf-header-flags-mach.yaml
+10-0llvm/test/tools/llvm-objdump/ELF/AMDGPU/subtarget.ll
+9-1llvm/lib/Target/AMDGPU/GCNProcessors.td
+4-0llvm/test/CodeGen/AMDGPU/directive-amdgcn-target.ll
+79-914 files not shown
+113-1120 files

LLVM/project b528f67offload/test CMakeLists.txt

[Offload] Run liboffload unit tests as a part of check-offload (#189731)

Summary:
These are currently only run with check-offload-unit. Make them a part
of the other tests by putting a dependency on it. We did something like
this previously but it was reverted because the tests failed if there
were no GPUs (like in systems that only checked the CPU case) but I
think that has been fixed.
DeltaFile
+9-7offload/test/CMakeLists.txt
+9-71 files

LLVM/project 8a1d6c6clang/lib/Driver/ToolChains Linux.cpp, clang/test/Driver linux-ld.c

clang: driver: update android packed relocation logic (#189758)

Hoist this up from the build system so that users of Android's NDK can
benefit from these various packed relocation encodings depending on
which API level they are targeting.

Link: https://github.com/android/ndk/issues/909
Fixes: https://github.com/android/ndk/issues/2193
Link: https://github.com/android/ndk/issues/2188#issuecomment-3366591142
Link:
https://android.googlesource.com/platform/build/soong/+/d046c2afef086a35d24222b09f4d2c4914e8a2a5/cc/linker.go#548
DeltaFile
+35-3clang/test/Driver/linux-ld.c
+9-8clang/lib/Driver/ToolChains/Linux.cpp
+44-112 files

LLVM/project 9506f20flang/lib/Optimizer/Analysis AliasAnalysis.cpp CMakeLists.txt, flang/test/Analysis/AliasAnalysis alias-analysis-acc.mlir

[flang][acc] Add AA implementation for acc operations (#189772)

This PR extends flang's alias analysis so it can reason about values
that originate from OpenACC data and privatization operations, including
values passed through block arguments.
DeltaFile
+546-0flang/test/Analysis/AliasAnalysis/alias-analysis-acc.mlir
+56-0flang/lib/Optimizer/Analysis/AliasAnalysis.cpp
+16-0mlir/lib/Dialect/OpenACC/Utils/OpenACCUtils.cpp
+5-0mlir/include/mlir/Dialect/OpenACC/OpenACCUtils.h
+4-0flang/lib/Optimizer/Analysis/CMakeLists.txt
+2-0mlir/include/mlir/Dialect/OpenACC/OpenACC.h
+629-01 files not shown
+630-07 files

LLVM/project 25227e8clang/lib/CodeGen CGHLSLBuiltins.cpp, clang/lib/Sema HLSLBuiltinTypeDeclBuilder.cpp

[HLSL] Add GetDimensions to Texture2D.

This commit add the GetDimensions mehtods to Texture2D. For DXIL, it
requires intrinsics that are not yet available. They are added, but not
implemented.

Assisted-by: Gemini
DeltaFile
+103-0clang/test/CodeGenHLSL/resources/Texture2D-GetDimensions.hlsl
+88-0clang/test/AST/HLSL/Texture2D-scalar-AST.hlsl
+84-0clang/test/AST/HLSL/Texture2D-vector-AST.hlsl
+80-0clang/test/SemaHLSL/Resources/Texture2D-GetDimensions.hlsl
+65-6clang/lib/CodeGen/CGHLSLBuiltins.cpp
+47-0clang/lib/Sema/HLSLBuiltinTypeDeclBuilder.cpp
+467-69 files not shown
+515-1515 files

LLVM/project 16255e4llvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV rv64p.ll rv32p.ll

[RISCV] Add RISCVISD::USATI/SATI to computeKnownBitsForTargetNode/ComputeNumSignBitsForTargetNode. (#189702)
DeltaFile
+32-1llvm/test/CodeGen/RISCV/rv64p.ll
+15-0llvm/test/CodeGen/RISCV/rv32p.ll
+9-0llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+56-13 files