LLVM/project 5806419llvm/test/tools/llvm-mca/AArch64/Cortex C1Ultra-streaming-sme-only-instructions.s C1Ultra-sve-instructions.s

[AArch64] Extend llvm-mca input tests (#217036)

Add extra coverage to tests for AArch64 llvm-mca
DeltaFile
+2,421-285llvm/test/tools/llvm-mca/AArch64/Cortex/A57-forwarding.s
+89-0llvm/test/tools/llvm-mca/AArch64/Cortex/C1Ultra-sve2p1-instructions.s
+0-71llvm/test/tools/llvm-mca/AArch64/Cortex/C1Ultra-sve-sme-instructions.s
+18-2llvm/test/tools/llvm-mca/AArch64/Cortex/C1Ultra-sve-instructions.s
+18-2llvm/test/tools/llvm-mca/AArch64/Cortex/C1Nano-sve-instructions.s
+15-1llvm/test/tools/llvm-mca/AArch64/Cortex/C1Ultra-streaming-sme-only-instructions.s
+2,561-36145 files not shown
+2,817-41051 files

LLVM/project c6b2b84llvm/include/llvm/Analysis AssumptionCache.h, llvm/lib/Analysis AssumptionCache.cpp

Revert "[AssumptionCache] Limit the number of assumptions inspected per value…"

This reverts commit 904188e382f658886ab2c37ded5e54aa72c2eadd.
DeltaFile
+18-51llvm/lib/Analysis/AssumptionCache.cpp
+0-37llvm/test/Analysis/AssumptionCache/max-assumes-per-value.ll
+0-15llvm/include/llvm/Analysis/AssumptionCache.h
+1-1llvm/lib/Transforms/Utils/CodeExtractor.cpp
+19-1044 files

LLVM/project 74609edclang/lib/Sema SemaDeclCXX.cpp, clang/test/SemaCXX uninitialized.cpp

[Clang][Sema] Don't warn on accessing virtual base from abstract class (#217715)

Virtual bases are initialized by the most derived class, and they come
before non-virtual base class initializers. So an abstract class can
assume that virtual bases are already initialized by the time their
constructor runs.

It seems that the warning generally doesn't take indirect bases into
account, otherwise this would become a bit more complicated.

Fixes #204858.
DeltaFile
+18-0clang/test/SemaCXX/uninitialized.cpp
+6-1clang/lib/Sema/SemaDeclCXX.cpp
+24-12 files

LLVM/project b93a9d0llvm/lib/Transforms/Scalar MemCpyOptimizer.cpp, llvm/test/Transforms/MemCpyOpt stack-move-offset.ll

[MemCpyOpt] Don't perform stack-move opt for out-of-bounds copy (#217607)

There can be a copy with an out of bounds offset in dead code. If the
perform the stack-move optimization based on that, we'll end up merging
an alloca into an out-of-bounds offset of another alloca, which will
result in UB (when used in non-dead code).

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

(cherry picked from commit 8ab2745ce76041a0404c36aea5c37160f10d8840)
DeltaFile
+34-0llvm/test/Transforms/MemCpyOpt/stack-move-offset.ll
+7-0llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
+41-02 files

LLVM/project d38b72ellvm/lib/Target/Sparc/AsmParser SparcAsmParser.cpp, llvm/test/MC/Sparc sparc-alu-instructions.s

[SPARC][IAS] Adjust bounds check in %rX name parsing (#218301)

Fix an off-by-one error that results in %r31 being incorrectly rejected.

This was reported by the folks at OpenBSD.

(cherry picked from commit e013a0f906630d014e04824681b32daa45812c7c)
DeltaFile
+1-1llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
+2-0llvm/test/MC/Sparc/sparc-alu-instructions.s
+3-12 files

LLVM/project 0973b4cmlir/docs/DefiningDialects Operations.md, mlir/test/IR traits.mlir

[MLIR][ODS] Add separator support to oilist (#217891)

Allow an optional literal separator in oilist formats. Parse and print
separators only between present clauses, and diagnose missing, trailing,
and ambiguous separators.

Assisted-by: Codex
DeltaFile
+94-7mlir/tools/mlir-tblgen/OpFormatGen.cpp
+36-0mlir/test/IR/traits.mlir
+20-0mlir/test/mlir-tblgen/op-format-invalid.td
+10-0mlir/test/lib/Dialect/Test/TestOpsSyntax.td
+6-1mlir/docs/DefiningDialects/Operations.md
+4-0mlir/test/mlir-tblgen/op-format-spec.td
+170-86 files

LLVM/project 14140e8clang/lib/Driver/ToolChains FreeBSD.h FreeBSD.cpp, clang/test/Driver freebsd-include-paths.c freebsd.cpp

[clang][Driver] Fix libc++ include path on FreeBSD (#212725)

`clang++` defaults to `-stdlib=libc++` on FreeBSD. When building with
both `clang` and `libcxx` included, the freshly built `clang++` uses the
system version of the `libc++` headers. However, this is from the
bundled `libc++` 19.1.7, thus inconsistent with the `libc++` being
built.

Similarly to the NetBSD case, FreeBSD has its own version of
`addLibCxxIncludePaths` which just includes `/usr/include/c++/v1`.

This patch removes `FreeBSD::addLibCxxIncludePaths` in favour of the
generic version in `Gnu.cpp`.

Tested on `amd64-pc-freebsd15.1`.

(cherry picked from commit 7f9b3b671718ce555e76b0eb7f728f1e41ca05e2)
DeltaFile
+12-2clang/test/Driver/freebsd.cpp
+0-6clang/lib/Driver/ToolChains/FreeBSD.cpp
+4-2clang/test/Driver/freebsd-include-paths.c
+0-2clang/lib/Driver/ToolChains/FreeBSD.h
+0-0clang/test/Driver/Inputs/install_tree_without_libcxx/include/.keep
+0-0clang/test/Driver/Inputs/install_tree_without_libcxx/bin/.keep
+16-121 files not shown
+16-127 files

LLVM/project 4b5c875llvm/lib/Target/AArch64 AArch64FastISel.cpp, llvm/test/CodeGen/AArch64 speculation-hardening.ll

[AArch64][FastISel] Avoid TBZ with SLH more thoroughly. (#217329)

With SpeculativeLoadHardening, we already avoid using cond-branch
instructions that don't modify NZCV (CBZ, TBZ), since we rely on NZCV to
propagate the speculative taint mask with CSEL later on.

However, in one case in FastISel, we still emit TBZ, ignoring SLH. Make
it honor the SLH attribute like we do elsewhere.

(cherry picked from commit eb2e28ad666b537837f7ee0ca88f6f66c12d2aeb)
DeltaFile
+14-0llvm/test/CodeGen/AArch64/speculation-hardening.ll
+5-0llvm/lib/Target/AArch64/AArch64FastISel.cpp
+19-02 files

LLVM/project f919c6d.github/workflows release-binaries.yml, clang/cmake/caches Release.cmake

Revert "workflows/release-binaries: Disable flang on Darwin (#164667)" (#216667)

This reverts commit 6d54a5e5b83ce3502b7a3488fea5afe1c8bf9c5c.

Flang Darwin builds were reverted due to #160546. That issue has not
been reproducible (at least on my machine) for several months. There was
a request for MacOS builds on the most recent flang community call.

Flang is not enabled in the MacOS pre-commit CI.

Closes #160546

(cherry picked from commit d2bd0203bee02681b0a150fb8d2d6563b7e56b2e)
DeltaFile
+2-8clang/cmake/caches/Release.cmake
+7-0.github/workflows/release-binaries.yml
+9-82 files

LLVM/project 9de31fdllvm/lib/IR Verifier.cpp, llvm/test/Verifier DILocalScope-non-local-parent.ll

[Verifier] Diagnose local scope chains that miss their DISubprogram

DILocalScope::getSubprogram() casts every parent to DILocalScope, so a
DILexicalBlock parented to a non-local scope such as a DIFile makes the
verifier abort on that cast before visitDILexicalBlockBase can report
"invalid local scope".
DeltaFile
+28-0llvm/test/Verifier/DILocalScope-non-local-parent.ll
+9-8llvm/lib/IR/Verifier.cpp
+37-82 files

LLVM/project ae4434amlir/include/mlir/Dialect/LLVMIR LLVMOpBase.td LLVMOps.td, mlir/lib/Dialect/LLVMIR/IR LLVMDialect.cpp

[mlir][LLVM] Add ignore_denormal_mode UnitAttr to LLVM::AtomicRMWOp
DeltaFile
+22-5mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
+8-7mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
+8-0mlir/test/Dialect/LLVMIR/invalid.mlir
+7-0mlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td
+0-6mlir/lib/Target/LLVMIR/Dialect/ROCDL/ROCDLToLLVMIRTranslation.cpp
+4-0mlir/test/Target/LLVMIR/Import/instructions.ll
+49-184 files not shown
+56-2210 files

LLVM/project 1c1276bclang/lib/CodeGen TargetInfo.cpp TargetInfo.h, clang/lib/CodeGen/TargetBuiltins NVPTX.cpp

[clang][NVPTX] Emit !atomic.ignore.denormal.mode for CUDA atomics

CUDA's atomicAdd() family is defined in terms of PTX atom.add, whose
denormal behavior is fixed by the hardware. Without any annotation the
backend has to assume the function's denormal mode must be honored and
expands these into CAS loops whenever the two disagree. Mark them with
!atomic.ignore.denormal.mode so the native instruction is used.

That covers the __nvvm_atom_*_add_gen_f builtins that atomicAdd(),
atomicAdd_block() and atomicAdd_system() are written in terms of, plus
C11/C++11 atomics under -fatomic-ignore-denormal-mode and the
[[clang::atomic(ignore_denormal_mode)]] attribute, which requires
teaching the NVPTX target about AtomicOptions.

The condition for when the metadata is meaningful is now shared with the
AMDGPU and SPIR-V targets in addAtomicIgnoreDenormalModeMetadata(). It
takes an AllowHalf flag because whether f16 denormals are observable is
target specific: PTX exposes no FTZ control for f16 operations, so
atom.add.f16 never flushes and the opt-in is meaningful there, whereas

    [3 lines not shown]
DeltaFile
+321-0clang/test/CodeGenCUDA/atomic-ignore-denormal-mode-nvptx.cu
+19-4clang/lib/CodeGen/TargetBuiltins/NVPTX.cpp
+18-0clang/lib/CodeGen/TargetInfo.h
+15-0clang/lib/CodeGen/TargetInfo.cpp
+12-0clang/lib/CodeGen/Targets/NVPTX.cpp
+2-4clang/lib/CodeGen/Targets/SPIR.cpp
+387-85 files not shown
+402-1711 files

LLVM/project 5a0ac93llvm/lib/Target/NVPTX NVPTXISelLowering.cpp, llvm/test/CodeGen/NVPTX atomicrmw-ignore-denormal-mode.ll

[NVPTX] Honor !atomic.ignore.denormal.mode on atomicrmw fadd

PTX atom.add has a fixed denormal behavior that the program cannot
control: atom.add.f32 flushes denormals on global memory but not on
shared, and atom.add.f16 never flushes. When that disagrees with the
function's denormal mode, the backend expands the atomic into a CAS loop
so the denormal behavior is preserved.

!atomic.ignore.denormal.mode says the denormal behavior of this
particular atomic does not matter, so use the native instruction even
when it disagrees. This is the same thing -nvptx-allow-ftz-atomics does,
except per-instruction instead of per-compilation, which lets a frontend
opt in only the operations it knows about -- notably CUDA's atomicAdd(),
which is defined in terms of atom.add.

Note that -nvptx-allow-ftz-atomics defaults to true, so the new behavior
is only observable with -nvptx-allow-ftz-atomics=false.

Co-authored-by: Artem Belevich <tra at google.com>
DeltaFile
+258-0llvm/test/CodeGen/NVPTX/atomicrmw-ignore-denormal-mode.ll
+11-3llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
+269-32 files

LLVM/project 38843d1llvm/test/Transforms/AtomicExpand/AMDGPU expand-atomic-v2f16-agent.ll expand-atomic-f64-system.ll

[IR] Generalize !amdgpu.ignore.denormal.mode into !atomic.ignore.denormal.mode

The !amdgpu.ignore.denormal.mode metadata tells the backend that an
atomicrmw fadd need not honor the function's denormal mode, so a native
atomic instruction whose denormal behavior is fixed in hardware may be
used instead of a CAS loop. Nothing about that is AMDGPU specific: NVPTX
has exactly the same problem with atom.add, whose FTZ behavior depends on
the address space and cannot be controlled.

Promote it to a target independent fixed metadata kind,
!atomic.ignore.denormal.mode, and switch the AMDGPU, SPIR-V and OpenMP
producers and consumers over to it. Document it in LangRef, and point
AMDGPUUsage at that description rather than duplicating it.

Existing IR keeps working: AutoUpgrade renames the metadata on atomicrmw
instructions when parsing textual IR and when materializing bitcode. The
upgrade is deliberately scoped to atomicrmw rather than being applied to
every attachment of that name, since that is the only place the metadata
was ever meaningful. Because bitcode can be materialized one function at

    [6 lines not shown]
DeltaFile
+84-84llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-f32-agent.ll
+78-78llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-f32-system.ll
+44-44llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-f64-agent.ll
+43-43llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-rmw-fadd.ll
+41-41llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-f64-system.ll
+34-34llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-v2f16-agent.ll
+324-32465 files not shown
+773-64871 files

LLVM/project e33cbe0llvm/lib/Transforms/Vectorize VPlanTransforms.cpp VPlan.h

[LV] Rename replaceMaskWithCompare -> replaceMaskWithCompareForScalarPlan (#216340)
DeltaFile
+3-3llvm/lib/Transforms/Vectorize/VPlan.h
+3-2llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+6-52 files

LLVM/project 254216allvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/AMDGPU store-chain-two-external-users.ll

[SLP] Only reject store chains with too many non-benign outside users (#215700)

This patch rejects store chains with too many non-benign outside users

The previous early reject skipped store chains before costing when
operands had two outside users, even if they were still part of the same
SLP tree (e.g. carry compare and next-limb add). This improved compile
time, but hit runtime performance for multiple use cases. This patch
allows up to two outside users when they look like carry deps (cmp,
select, non-div/rem binop, or two-incoming phi); reject three or more,
or exactly two when at least one is not benign. Also caps the use-list
walk with `UsesLimit`. Precommit test in #217990.
DeltaFile
+36-43llvm/test/Transforms/SLPVectorizer/AMDGPU/store-chain-two-external-users.ll
+34-5llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+70-482 files

LLVM/project f54c0c4llvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 pr215839.ll

[AArch64] Do not allow anyext load in isEquivalentMaskless (#216288)

isEquivalentMaskless tries to prove that the `and` in `cmp(and(add(x,
C1), 0xff), C2)` is redundant and can be removed, providing that the
input x is know to be a sext or zext. AFAICT it should not apply to
anyext, which could take any value.

Fixes #215839

(cherry picked from commit 90c0c675b463b7aaace2c9f90dfe7fc4f851678c)
DeltaFile
+152-0llvm/test/CodeGen/AArch64/pr215839.ll
+3-0llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+155-02 files

LLVM/project e90b123llvm/test/Analysis/LoopAccessAnalysis retry-runtime-checks-after-dependence-analysis-forked-pointers.ll all-ones-null-pointer.ll

[LAA] Add additional tests for incorrect negative stride handling (NFC) (#218376)
DeltaFile
+182-0llvm/test/Analysis/LoopAccessAnalysis/evaluate-at-symbolic-max-backedge-taken-count-may-wrap.ll
+49-0llvm/test/Analysis/LoopAccessAnalysis/all-ones-null-pointer.ll
+40-0llvm/test/Analysis/LoopAccessAnalysis/retry-runtime-checks-after-dependence-analysis-forked-pointers.ll
+271-03 files

LLVM/project 4e7f3f4clang/docs BoundsSafetyImplPlans.rst, clang/include/clang/Basic Attr.td AttrDocs.td

[NFC][BoundsSafety] Give `counted_by_or_null`, `sized_by`, and `sized_by_or_null` their own documentation (#212877)

Previously the `counted_by`, `counted_by_or_null`, `sized_by`, and
`sized_by_or_null` attributes all pointed at a single `Documentation`
object (`CountedByDocs`). The generated `AttributeReference.rst`
therefore folded all four into one entry whose text described only
`counted_by` used on a C99 flexible array member.

This was misleading because the attributes differ in important ways that
went undocumented:

* `counted_by` counts *elements* whereas `sized_by` counts *bytes*.
* `counted_by` and `sized_by` require a null pointer to have a zero
count/size, while the `_or_null` variants allow a null pointer
regardless of the count or size.
* `counted_by` may be applied to a flexible array member, but
`sized_by`, `counted_by_or_null`, and `sized_by_or_null` apply to
pointers only.


    [34 lines not shown]
DeltaFile
+225-6clang/include/clang/Basic/AttrDocs.td
+9-0clang/docs/BoundsSafetyImplPlans.rst
+3-3clang/include/clang/Basic/Attr.td
+237-93 files

LLVM/project d1dd066llvm/lib/Target/AArch64 AArch64MIPeepholeOpt.cpp, llvm/test/CodeGen/AArch64 mipeephole-undef-operand.mir

AArch64: Fix MIPeepholeOpt null dereference on undef source operands (#218291)
DeltaFile
+57-0llvm/test/CodeGen/AArch64/mipeephole-undef-operand.mir
+6-4llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp
+63-42 files

LLVM/project 22ac1fdoffload/plugins-nextgen/amdgpu/src rtl.cpp, offload/plugins-nextgen/common/include PluginInterface.h

[offload] Use pinned memory for KLE

Reduce kernel launch latency by using the fast path "pinned host memory
-> device memory" for submitting the kernel launch environment to the
device.

Claude assisted with this patch.
DeltaFile
+71-0offload/test/offloading/kernel_launch_environment.c
+47-2offload/plugins-nextgen/common/src/PluginInterface.cpp
+14-0offload/plugins-nextgen/common/include/PluginInterface.h
+2-0offload/plugins-nextgen/amdgpu/src/rtl.cpp
+134-24 files

LLVM/project 9d2b075offload/include/Shared APITypes.h, offload/plugins-nextgen/common/include PluginInterface.h

[offload] Thread allocation kind through async info

Claude assisted with this patch.
DeltaFile
+37-7offload/plugins-nextgen/common/src/PluginInterface.cpp
+5-2offload/include/Shared/APITypes.h
+2-2offload/plugins-nextgen/common/include/PluginInterface.h
+44-113 files

LLVM/project a79b74doffload/plugins-nextgen/amdgpu/src rtl.cpp, offload/plugins-nextgen/common/include MemoryManager.h PluginInterface.h

[offload] Pool host and shared allocations (#214754)

Route them through a memory manager, like the device allocations. Also,
move the registration as pinned memory to the plugin site since only the
plugin knows if the corresponding host/shared memory is pinned. Improves
performance of affected allocations by ballpark 1,000x.
DeltaFile
+29-40offload/plugins-nextgen/common/src/PluginInterface.cpp
+14-6offload/plugins-nextgen/common/include/MemoryManager.h
+19-1offload/plugins-nextgen/common/include/PluginInterface.h
+12-0offload/plugins-nextgen/amdgpu/src/rtl.cpp
+6-5openmp/docs/design/Runtimes.rst
+80-525 files

LLVM/project 0d9f87ellvm/lib/Transforms/Scalar GVN.cpp, llvm/test/Transforms/GVN mssa-reach-block-limit.ll

[GVN] Limit MemorySSA reaching-value block scans (#217945)

Cap expensive non-local MemorySSA queries at the same 200-block limit
used by MemDep. On an internal workload, this closes the majority of the
compile-time gap between the MemorySSA and MemDep GVN paths.
Runtime remains almost flat.
DeltaFile
+47-0llvm/test/Transforms/GVN/mssa-reach-block-limit.ll
+8-0llvm/lib/Transforms/Scalar/GVN.cpp
+55-02 files

LLVM/project c0bda58llvm/lib/IR Verifier.cpp, llvm/test/Verifier DILocalScope-non-local-parent.ll

[Verifier] Diagnose local scope chains that miss their DISubprogram

DILocalScope::getSubprogram() casts every parent to DILocalScope, so a
DILexicalBlock parented to a non-local scope such as a DIFile makes the
verifier abort on that cast before visitDILexicalBlockBase can report
"invalid local scope".
DeltaFile
+32-30llvm/lib/IR/Verifier.cpp
+28-0llvm/test/Verifier/DILocalScope-non-local-parent.ll
+60-302 files

LLVM/project 4edb703flang/test/Fir omp-declare-target-data.fir, flang/test/Lower/OpenMP declare-target-func-and-subr.f90

[MLIR][OpenMP] DeclareTargetInterface and DeclareTargetAttr cleanup, NFCI

The changes introduced by this patch are intended to avoid triggering
multiple by name lookups to the "omp.declare_target" attribute every
time any data from the `DeclareTargetInterface` is queried, remove the
need for keeping multiple default values for the same data, clean up
the assembly format and generally improve the usage of the interface.

List of changes:
- `DeclareTargetInterface` only provides `setDeclareTarget` and
  `getDeclareTarget` methods to handle the "omp.declare_target"
  attribute, maintaining a single canonical way of accessing it.
- `DeclareTargetAttr` provides direct access to the capture clause and
  device type enums, rather than wrapping them into an `Attribute`.
  These are now mandatory as well. Both changes together make accessing
  them more straightforward and simplify the attribute representation.
DeltaFile
+44-44mlir/test/Dialect/OpenMP/mark-declare-target.mlir
+15-60mlir/include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.td
+30-30mlir/test/Dialect/OpenMP/attr.mlir
+23-23flang/test/Lower/OpenMP/declare-target-func-and-subr.f90
+22-22flang/test/Fir/omp-declare-target-data.fir
+25-19mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+159-19857 files not shown
+411-43263 files

LLVM/project 771bdfdmlir/include/mlir/Dialect/OpenMP OpenMPDialect.td, mlir/lib/Dialect/OpenMP/IR OpenMPDialect.cpp

[MLIR][OpenMP] Add verification for DeclareTargetInterface (#217294)

This patch introduces checks to ensure the "omp.declare_target"
attribute is only attached to `DeclareTargetInterface` operations, it is
always the right type attribute and its properties do not conflict with
the operation they are attached to.
DeltaFile
+42-0mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+28-0mlir/test/Dialect/OpenMP/invalid-interface.mlir
+0-18mlir/test/Dialect/OpenMP/attr.mlir
+1-0mlir/include/mlir/Dialect/OpenMP/OpenMPDialect.td
+71-184 files

LLVM/project 08ef7a0flang/test/Fir omp-declare-target-data.fir, flang/test/Lower/OpenMP declare-target-func-and-subr.f90

[MLIR][OpenMP] DeclareTargetInterface and DeclareTargetAttr cleanup, NFCI

The changes introduced by this patch are intended to avoid triggering
multiple by name lookups to the "omp.declare_target" attribute every
time any data from the `DeclareTargetInterface` is queried, remove the
need for keeping multiple default values for the same data, clean up
the assembly format and generally improve the usage of the interface.

List of changes:
- `DeclareTargetInterface` only provides `setDeclareTarget` and
  `getDeclareTarget` methods to handle the "omp.declare_target"
  attribute, maintaining a single canonical way of accessing it.
- `DeclareTargetAttr` provides direct access to the capture clause and
  device type enums, rather than wrapping them into an `Attribute`.
  These are now mandatory as well. Both changes together make accessing
  them more straightforward and simplify the attribute representation.
DeltaFile
+44-44mlir/test/Dialect/OpenMP/mark-declare-target.mlir
+15-60mlir/include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.td
+30-30mlir/test/Dialect/OpenMP/attr.mlir
+23-23flang/test/Lower/OpenMP/declare-target-func-and-subr.f90
+22-22flang/test/Fir/omp-declare-target-data.fir
+25-19mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+159-19857 files not shown
+411-43263 files

LLVM/project 3f93b16mlir/include/mlir/Dialect/OpenMP OpenMPDialect.td, mlir/lib/Dialect/OpenMP/IR OpenMPDialect.cpp

[MLIR][OpenMP] Add verification for DeclareTargetInterface

This patch introduces checks to ensure the "omp.declare_target"
attribute is only attached to `DeclareTargetInterface` operations, it is
always the right type attribute and its properties do not conflict with
the operation they are attached to.
DeltaFile
+42-0mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+28-0mlir/test/Dialect/OpenMP/invalid-interface.mlir
+0-18mlir/test/Dialect/OpenMP/attr.mlir
+1-0mlir/include/mlir/Dialect/OpenMP/OpenMPDialect.td
+71-184 files

LLVM/project 8fd10b8llvm/lib/Target/AMDGPU SILowerI1Copies.cpp, llvm/test/CodeGen/AMDGPU uniform-inside-divergent-cfg.ll

[AMDGPU] Handle uniform control flow inside divergent (#217977)

Fix PhiIncomingAnalysis::analyze. When it detected an incoming block
that started divergent control flow ending at DefBlock, it tried to add
all blocks in that divergent region to ReachableMap. But the propagation
could be stopped by other blocks (those that did not start divergent
control flow) that were already in ReachableMap. Fix this by doing the
propagation first, before adding the remaining incoming blocks.
DeltaFile
+163-0llvm/test/CodeGen/AMDGPU/uniform-inside-divergent-cfg.ll
+7-3llvm/lib/Target/AMDGPU/SILowerI1Copies.cpp
+170-32 files