LLVM/project e807c6fllvm/lib/CodeGen/SelectionDAG SelectionDAG.cpp, llvm/lib/Target/AArch64 AArch64ISelLowering.cpp

[AArch64] Fold sext-in-reg for predicate -> fixed-length conversions. (#176883)

DeltaFile
+35-59llvm/test/CodeGen/AArch64/alias_mask.ll
+12-15llvm/test/CodeGen/AArch64/sve-fixed-length-shuffles.ll
+19-0llvm/test/CodeGen/AArch64/fold-sext-in-reg-predicate-fixed-length.ll
+12-4llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+11-5llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+15-1llvm/unittests/Target/AArch64/AArch64SelectionDAGTest.cpp
+104-846 files

LLVM/project ae35b38llvm/test/TableGen directive1.td directive2.td, llvm/utils/TableGen/Basic DirectiveEmitter.cpp

Revert "[TableGen] Emit constexpr versions of some directive/clause functions (#176253)"

This reverts commit cf68af690ba7f98943e5f0f5cb39a91868d62098.

It increased the compilation time for a number of clang source files.
See comments in https://github.com/llvm/llvm-project/pull/176253 for
more information.
DeltaFile
+40-109llvm/utils/TableGen/Basic/DirectiveEmitter.cpp
+25-56llvm/test/TableGen/directive1.td
+25-56llvm/test/TableGen/directive2.td
+90-2213 files

LLVM/project 7e1696fclang/lib/AST/ByteCode InterpFrame.cpp

[clang][bytecode][NFC] Use a ListSeparator to print backtraces (#177148)

DeltaFile
+2-2clang/lib/AST/ByteCode/InterpFrame.cpp
+2-21 files

LLVM/project 77e08b4clang Maintainers.rst

Replace Erich Keane as Attributes maintainer (#177005)

During the Clang maintainers list refresh, Erich mentioned he would like
me to resume ownership of Clang attributes due to time constraints.
He'll continue to help out as he can but this frees him up for other
efforts. Thank you for your help in this role!
DeltaFile
+2-2clang/Maintainers.rst
+2-21 files

LLVM/project 2719056clang/include/clang/Analysis/Scalable/TUSummary ExtractorRegistry.h, clang/lib/Analysis/Scalable/TUSummary ExtractorRegistry.cpp

[clang][ssaf] Fix instantiations of `Registry<TUSummaryExtractor, TUSummaryBuilder &>` (#176730)

This patch fixes the incorrect explicit instantiation
declaration/definition added in #173290, and adds checks to prevent
similar errors.

MinGW/Cygwin with `-DCLANG_LINK_CLANG_DYLIB=ON` require proper
declarations of the template instantiations to share data symbols across
DLL boundaries.
DeltaFile
+18-0llvm/include/llvm/Support/Registry.h
+4-1clang/lib/Analysis/Scalable/TUSummary/ExtractorRegistry.cpp
+1-1clang/include/clang/Analysis/Scalable/TUSummary/ExtractorRegistry.h
+23-23 files

LLVM/project d82cdb5flang/lib/Optimizer/OpenMP FunctionFiltering.cpp

Formatting
DeltaFile
+2-2flang/lib/Optimizer/OpenMP/FunctionFiltering.cpp
+2-21 files

LLVM/project b184f92mlir/test/Target/LLVMIR omptarget-declare-target-to-device.mlir

Update target device test
DeltaFile
+7-11mlir/test/Target/LLVMIR/omptarget-declare-target-to-device.mlir
+7-111 files

LLVM/project 6bd883bflang/test/Integration/OpenMP target-use-device-nested.f90, llvm/lib/Frontend/OpenMP OMPIRBuilder.cpp

Make omp.target[_{enter,exit}]_data and omp.target_update host-only ops
DeltaFile
+46-0flang/test/Integration/OpenMP/target-use-device-nested.f90
+0-46mlir/test/Target/LLVMIR/openmp-target-use-device-nested.mlir
+10-24mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+0-21llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
+0-11llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+56-1025 files

LLVM/project 85c0b56flang/test/Integration/OpenMP target-nesting-in-host-ops.f90, mlir/lib/Target/LLVMIR/Dialect/OpenMP OpenMPToLLVMIRTranslation.cpp

[MLIR][OpenMP] Simplify OpenMP device codegen

After removing host operations from the device MLIR module, it is no longer
necessary to provide special codegen logic to prevent these operations from
causing compiler crashes or miscompilations.

This patch removes these now unnecessary code paths to simplify codegen logic.
Some MLIR tests are now replaced with Flang tests, since the responsibility of
dealing with host operations has been moved earlier in the compilation flow.

MLIR tests holding target device modules are updated to no longer include now
unsupported host operations.
DeltaFile
+159-267mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+0-160mlir/test/Target/LLVMIR/openmp-target-nesting-in-host-ops.mlir
+87-0flang/test/Integration/OpenMP/target-nesting-in-host-ops.f90
+24-37mlir/test/Target/LLVMIR/omptarget-memcpy-align-metadata.mlir
+45-0mlir/test/Target/LLVMIR/openmp-llvm-invalid.mlir
+0-43mlir/test/Target/LLVMIR/omptarget-target-inside-task.mlir
+315-5077 files not shown
+424-61213 files

LLVM/project d77950cflang/lib/Optimizer/OpenMP FunctionFiltering.cpp

Replace deprecated build methods
DeltaFile
+19-19flang/lib/Optimizer/OpenMP/FunctionFiltering.cpp
+19-191 files

LLVM/project c52fc33flang/lib/Optimizer/OpenMP FunctionFiltering.cpp, flang/test/Transforms/OpenMP function-filtering-host-ops.mlir

Remove omp.target[_{enter,exit}]_data and omp.targt_update operations from target device modules
DeltaFile
+125-228flang/lib/Optimizer/OpenMP/FunctionFiltering.cpp
+41-60flang/test/Transforms/OpenMP/function-filtering-host-ops.mlir
+166-2882 files

LLVM/project d55844eflang/lib/Optimizer/OpenMP FunctionFiltering.cpp, flang/test/Lower/OpenMP host-eval.f90 declare-target-link-tarop-cap.f90

[Flang][OpenMP] Minimize host ops remaining in device compilation

This patch updates the function filtering OpenMP pass intended to remove host
functions from the MLIR module created by Flang lowering when targeting an
OpenMP target device.

Host functions holding target regions must be kept, so that the target regions
within them can be translated for the device. The issue is that non-target
operations inside these functions cannot be discarded because some of them hold
information that is also relevant during target device codegen. Specifically,
mapping information resides outside of `omp.target` regions.

This patch updates the previous behavior where all host operations were
preserved to then ignore all of those that are not actually needed by target
device codegen. This, in practice, means only keeping target regions and mapping
information needed by the device. Arguments for some of these remaining
operations are replaced by placeholder allocations and `fir.undefined`, since
they are only actually defined inside of the target regions themselves.


    [3 lines not shown]
DeltaFile
+498-0flang/test/Transforms/OpenMP/function-filtering-host-ops.mlir
+449-1flang/lib/Optimizer/OpenMP/FunctionFiltering.cpp
+0-137flang/test/Transforms/omp-function-filtering.mlir
+137-0flang/test/Transforms/OpenMP/function-filtering.mlir
+37-18flang/test/Lower/OpenMP/host-eval.f90
+10-9flang/test/Lower/OpenMP/declare-target-link-tarop-cap.f90
+1,131-1652 files not shown
+1,134-1708 files

LLVM/project c37c1f7flang/lib/Semantics check-omp-loop.cpp check-omp-structure.cpp

[flang][OpenMP] Move check for ORDERED to check-omp-loop.cpp, NFC (#177054)

DeltaFile
+16-0flang/lib/Semantics/check-omp-loop.cpp
+0-15flang/lib/Semantics/check-omp-structure.cpp
+16-152 files

LLVM/project 069250cmlir/test/Target/LLVMIR omptarget-declare-target-to-device.mlir

Update target device test
DeltaFile
+7-11mlir/test/Target/LLVMIR/omptarget-declare-target-to-device.mlir
+7-111 files

LLVM/project a97ee96lldb/source/Interpreter CommandInterpreter.cpp, lldb/test/API/functionalities/plugins/command_plugin TestPluginCommands.py

[lldb] Check multiword command in `UserCommandExists` (#176998)

User created multiword command is not reported when querying
`SBCommandInterpreter::UserCommandExists`
DeltaFile
+3-1lldb/test/API/functionalities/plugins/command_plugin/TestPluginCommands.py
+2-1lldb/source/Interpreter/CommandInterpreter.cpp
+5-22 files

LLVM/project ab4f66dflang/lib/Lower/Support ReductionProcessor.cpp, flang/lib/Optimizer/OpenMP FunctionFiltering.cpp

[OpenMP][flang] Move `todo` for checking reduction support status on the GPU (#175172)

Moves a `todo` to check for the current level of support for by-ref
reductions to the `FunctionFiltering` pass. This guarantees that the
check does not trigger when the same module is compiled twice: on the
CPU and on the GPU.
DeltaFile
+39-0flang/lib/Optimizer/OpenMP/FunctionFiltering.cpp
+33-0flang/test/Transforms/omp-function-filtering-todo.mlir
+0-20flang/lib/Lower/Support/ReductionProcessor.cpp
+72-203 files

LLVM/project cd5facallvm/lib/Transforms/Utils LoopPeel.cpp, llvm/test/Transforms/LoopUnroll peel-last-iteration-load-widening.ll peel-last-iteration-load-widening-be.ll

Address comments 1
DeltaFile
+1,694-0llvm/test/Transforms/LoopUnroll/AArch64/peel-last-iteration-load-widening.ll
+0-616llvm/test/Transforms/LoopUnroll/peel-last-iteration-load-widening.ll
+117-79llvm/lib/Transforms/Utils/LoopPeel.cpp
+0-104llvm/test/Transforms/LoopUnroll/peel-last-iteration-load-widening-be.ll
+67-0llvm/test/Transforms/LoopUnroll/PowerPC/peel-last-iteration-load-widening-be.ll
+56-0llvm/test/Transforms/LoopUnroll/AArch64/peel-last-iteration-load-widening-disabled.ll
+1,934-7994 files not shown
+1,947-80910 files

LLVM/project 763f001flang/lib/Optimizer/OpenMP FunctionFiltering.cpp

review comments
DeltaFile
+9-1flang/lib/Optimizer/OpenMP/FunctionFiltering.cpp
+9-11 files

LLVM/project 3de4d32llvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 fp-int-fp-cvt.ll

[X86] lowerFPToIntToFP - handle UI2FP on AVX512VL targets and i64 types on AVX512DQ targets (#162656)

fixes #160111
DeltaFile
+133-33llvm/test/CodeGen/X86/fp-int-fp-cvt.ll
+46-8llvm/lib/Target/X86/X86ISelLowering.cpp
+179-412 files

LLVM/project 0bdbf01flang/test/Lower/OpenMP host-eval.f90, mlir/lib/Target/LLVMIR/Dialect/OpenMP OpenMPToLLVMIRTranslation.cpp

[OpenMP][Flang][MLIR] Skip trip count calculation when bounds are null (#176469)

Fixes a segfault when trip count values are null by skipping trip count
calculation when we cannot determine if it is safe to hoist out the
values.

Of note I originally tried to modify `extractOnlyOmpNestedDir` to return
the first OpenMPConstruct directive, skipping over any earlier
directives (ie stores), which did work for the below generic test case:

```fortran
program minimal_repro
  implicit none

  integer :: i, m
  integer :: res(10) = 0

!$omp target teams map(from:m,res) private(m)
  m = 5

    [59 lines not shown]
DeltaFile
+47-0flang/test/Lower/OpenMP/host-eval.f90
+5-0mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+52-02 files

LLVM/project 052fbf4llvm/lib/Target/AMDGPU AMDGPURegBankLegalizeHelper.cpp AMDGPURegBankLegalizeRules.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
+26-0llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+14-9llvm/test/CodeGen/AMDGPU/GlobalISel/usubsat.ll
+14-9llvm/test/CodeGen/AMDGPU/GlobalISel/uaddsat.ll
+150-452 files not shown
+158-498 files

LLVM/project a927d37llvm/lib/Transforms/Coroutines CoroFrame.cpp

[CoroFrame][NFC] Reduce insertSpills size through a helper function (#177129)

This function can be pretty difficult to follow due to its size and how
much work it does. This commit moves a lambda capturing a lot of state
into a self-contained function.

It will allow subsequent patches to simplify code and delete variables.
DeltaFile
+53-55llvm/lib/Transforms/Coroutines/CoroFrame.cpp
+53-551 files

LLVM/project fe381c2clang/lib/Sema AnalysisBasedWarnings.cpp

[LifetimeSafety] Use source ranges instead of end locations in diagnostics (#177020)

### TL;DR

Update diagnostic location information to use full source ranges instead of just end locations for lifetime safety warnings.
DeltaFile
+4-4clang/lib/Sema/AnalysisBasedWarnings.cpp
+4-41 files

LLVM/project 50638e0cmake/Modules HandleDoxygen.cmake, llvm CMakeLists.txt

[runtimes] Share doxygen handling with LLVM (#176948)

Hoist handling of Doxygen into the top-level cmake/ directory so it can
be shared between LLVM and RUNTIMES and a default/standalone runtimes
build can support building Doxygen documentation as well.

The openmp subproject currently supports doxygen documentation using an
`LLVM_ENABLE_PROJECTS=openmp` build, but not with
`LLVM_ENABLE_RUNTIMES=openmp` because of this missing boilerplate code
in the runtimes build. This is a step towards removing the
`LLVM_ENABLE_PROJECTS=openmp` build mode which was deprecated (#124014)
and already scheduled to be removed in LLVM 21 (#136314). Eventual
removal is planned with #176950.

Hoisting CMake code for shared use with runtimes has been done before in
e.g. #84641, 7017e6c9cfd2de3122ce9528f338a97d61e96373,
44e3365775101fec3fd355eda339282258d74415,
7017e6c9cfd2de3122ce9528f338a97d61e96373


    [2 lines not shown]
DeltaFile
+0-41llvm/cmake/config-ix.cmake
+40-0cmake/Modules/HandleDoxygen.cmake
+2-1llvm/CMakeLists.txt
+2-0runtimes/CMakeLists.txt
+44-424 files

LLVM/project 4fbd568llvm/lib/Target/AArch64 AArch64ISelLowering.cpp

Test2
DeltaFile
+82-0llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+82-01 files

LLVM/project 21234f0flang/test/Integration/OpenMP target-use-device-nested.f90, llvm/lib/Frontend/OpenMP OMPIRBuilder.cpp

Make omp.target[_{enter,exit}]_data and omp.target_update host-only ops
DeltaFile
+0-46mlir/test/Target/LLVMIR/openmp-target-use-device-nested.mlir
+46-0flang/test/Integration/OpenMP/target-use-device-nested.f90
+10-24mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+0-21llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
+0-11llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+56-1025 files

LLVM/project 6b01becflang/test/Integration/OpenMP target-nesting-in-host-ops.f90, mlir/lib/Target/LLVMIR/Dialect/OpenMP OpenMPToLLVMIRTranslation.cpp

[MLIR][OpenMP] Simplify OpenMP device codegen

After removing host operations from the device MLIR module, it is no longer
necessary to provide special codegen logic to prevent these operations from
causing compiler crashes or miscompilations.

This patch removes these now unnecessary code paths to simplify codegen logic.
Some MLIR tests are now replaced with Flang tests, since the responsibility of
dealing with host operations has been moved earlier in the compilation flow.

MLIR tests holding target device modules are updated to no longer include now
unsupported host operations.
DeltaFile
+159-267mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+0-160mlir/test/Target/LLVMIR/openmp-target-nesting-in-host-ops.mlir
+87-0flang/test/Integration/OpenMP/target-nesting-in-host-ops.f90
+24-37mlir/test/Target/LLVMIR/omptarget-memcpy-align-metadata.mlir
+45-0mlir/test/Target/LLVMIR/openmp-llvm-invalid.mlir
+0-43mlir/test/Target/LLVMIR/omptarget-target-inside-task.mlir
+315-5077 files not shown
+424-61213 files

LLVM/project 2ac722fllvm/lib/Target/AArch64 AArch64AsmPrinter.cpp, llvm/test/CodeGen/AArch64 ptrauth-intrinsic-auth-resign-with-blend.ll

[AArch64][PAC] Rework the expansion of AUT/AUTPAC pseudos

Refactor `AArch64AsmPrinter::emitPtrauthAuthResign` to improve
readability and fix the conditions when `emitPtrauthDiscriminator` is
allowed to clobber AddrDisc.

* do not clobber `AUTAddrDisc` when computing `AUTDiscReg` on resigning
  if `AUTAddrDisc == PACAddrDisc`, as it would prevent passing raw,
  64-bit value as the new discriminator
* move the code computing `ShouldCheck` and `ShouldTrap` conditions to a
  separate function
DeltaFile
+63-42llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
+67-10llvm/test/CodeGen/AArch64/ptrauth-intrinsic-auth-resign-with-blend.ll
+130-522 files

LLVM/project ea1288eflang/lib/Optimizer/OpenMP FunctionFiltering.cpp

Replace deprecated build methods
DeltaFile
+19-19flang/lib/Optimizer/OpenMP/FunctionFiltering.cpp
+19-191 files

LLVM/project 0e2c959flang/lib/Optimizer/OpenMP FunctionFiltering.cpp, flang/test/Transforms/OpenMP function-filtering-host-ops.mlir

Remove omp.target[_{enter,exit}]_data and omp.targt_update operations from target device modules
DeltaFile
+125-228flang/lib/Optimizer/OpenMP/FunctionFiltering.cpp
+41-60flang/test/Transforms/OpenMP/function-filtering-host-ops.mlir
+166-2882 files