LLVM/project 34c535bllvm/utils/TableGen RegisterInfoEmitter.cpp

[NFC][TableGen] Minor code cleanup in RegisterInfoEmitter (#181479)

Minor cleanup in codegen for `getSubClassWithSubReg` and
`getSubRegisterClass`:
- Use `getMinimalTypeForRange` to determine the entry type for table.
- Extract common code for table lookup into a lambda.
DeltaFile
+24-30llvm/utils/TableGen/RegisterInfoEmitter.cpp
+24-301 files

LLVM/project 0fa422cllvm/lib/Transforms/Vectorize VPlanTransforms.cpp

Keep early-exit for RedPhiR != PhiOp
DeltaFile
+5-1llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+5-11 files

LLVM/project ef52df4llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 shl-to-add-transformation4.ll gather-node-same-reduced.ll

[SLP]Do not increase depth for type-changing nodes and NotProfitableForVectorization removal

The patch changes the maximum tree size analysis. 1. Do not increase
depth for type changing nodes (like casts and compares), allowing more
deeper trees to be built. 2. Removes NotProfitableForVectorization
workaround, not needed anymore after throttling enabled

Reviewers: hiraditya, RKSimon

Pull Request: https://github.com/llvm/llvm-project/pull/180950
DeltaFile
+5-62llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+15-14llvm/test/Transforms/SLPVectorizer/X86/shl-to-add-transformation4.ll
+2-24llvm/test/Transforms/SLPVectorizer/X86/gather-node-same-reduced.ll
+2-2llvm/test/Transforms/SLPVectorizer/X86/external-bin-op-user.ll
+24-1024 files

LLVM/project e5b4998clang/unittests/Analysis/Scalable/Serialization JSONFormatTest.cpp, llvm/lib/Transforms/Scalar DeadStoreElimination.cpp

Rebase

Created using spr 1.3.7
DeltaFile
+1,560-1,560llvm/test/tools/llvm-mca/RISCV/SiFive7/vector-fp.s
+1,325-1,258llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
+991-1,493llvm/test/CodeGen/X86/broadcast-elm-cross-splat-vec.ll
+80-2,209llvm/test/Transforms/LowerMatrixIntrinsics/multiply-fused-loops-large-matrixes.ll
+470-1,417llvm/test/CodeGen/AMDGPU/fptoi.i128.ll
+1,847-0clang/unittests/Analysis/Scalable/Serialization/JSONFormatTest.cpp
+6,273-7,9372,531 files not shown
+109,400-45,6722,537 files

LLVM/project 7fe4d49flang/test/Lower/OpenMP fuse02.f90, lldb/tools/lldb-dap Variables.cpp Variables.h

Merge branch 'main' into users/jmmartinez/llvm-reduce/simplify-br
DeltaFile
+293-127lldb/tools/lldb-dap/Variables.cpp
+149-61lldb/tools/lldb-dap/Variables.h
+16-144lldb/tools/lldb-dap/Handler/VariablesRequestHandler.cpp
+140-0mlir/test/Target/LLVMIR/openmp-cli-fuse02.mlir
+123-0flang/test/Lower/OpenMP/fuse02.f90
+122-0llvm/test/CodeGen/SystemZ/remat.ll
+843-33286 files not shown
+2,607-76592 files

LLVM/project db547e8clang/lib/Driver/ToolChains Clang.cpp, clang/test/Driver openmp-offload-gpu.c

[Clang][OpenMP][Driver] Make linker to link Device RTL  when built for SPIRV (#180066)

This is to make linker to link ompdevice library when building for
OpenMP using SPIRV
DeltaFile
+17-0clang/test/Driver/openmp-offload-gpu.c
+1-1clang/lib/Driver/ToolChains/Clang.cpp
+18-12 files

LLVM/project 75c4c79llvm/lib/Target/SPIRV SPIRVGlobalRegistry.h

rename
DeltaFile
+4-4llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.h
+4-41 files

LLVM/project cb37281llvm/lib/Target/SPIRV SPIRVGlobalRegistry.h

[SPIRV] Fix `SPIRVTypeInst` `DenseMapInfo` implementation

The previous `DenseMapInfo` implementation was wrong.

The new implementation relies completely on `DenseMapInfo<MachineInst*>`'s.
To do this, we use "tag dispatch" to call a special constructor only
accessible by `DenseMapInfo` that bypasses the assertion when building
the emtpy/tombstone keys.
DeltaFile
+17-7llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.h
+17-71 files

LLVM/project 09a0615llvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize/AArch64 force-target-instruction-cost.ll

[VPlan] Simplify worklist in reassociateHeaderMask. NFC (#181595)

Addresses review comments from
https://github.com/llvm/llvm-project/pull/180898#pullrequestreview-3791945590.
We don't need to recursively collect direct users of the header mask, we
can do that as a separate step so that the main worklist loop only
handles potentially reassociatable candidates.

Also add back mention of tail folding to comment and a TODO.
DeltaFile
+16-14llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+2-0llvm/test/Transforms/LoopVectorize/AArch64/force-target-instruction-cost.ll
+18-142 files

LLVM/project 9991a5fllvm/include/llvm/Support BlockFrequency.h, llvm/lib/Support BlockFrequency.cpp

[BlockFrequency] Add operator<< overload (#181703)

This makes it more convenient to debug BFI issues.
DeltaFile
+5-0llvm/lib/Support/BlockFrequency.cpp
+2-0llvm/include/llvm/Support/BlockFrequency.h
+7-02 files

LLVM/project f560e4cflang/test/Lower/OpenMP fuse02.f90, llvm/lib/Frontend/OpenMP OMPIRBuilder.cpp

[MLIR][OpenMP] Add omp.fuse operation (#168898)

This patch is a follow-up from #161213 and adds the omp.fuse loop
transformation for the OpenMP dialect. Used for lowering a `!$omp fuse`
in Flang.

Added Lowering and end2end tests.
DeltaFile
+140-0mlir/test/Target/LLVMIR/openmp-cli-fuse02.mlir
+123-0flang/test/Lower/OpenMP/fuse02.f90
+114-0mlir/test/Dialect/OpenMP/cli-fuse.mlir
+110-0llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+102-0mlir/test/Dialect/OpenMP/invalid-fuse.mlir
+100-0mlir/test/Target/LLVMIR/openmp-cli-fuse01.mlir
+689-014 files not shown
+1,215-2420 files

LLVM/project 214cfc8llvm/lib/Target/AArch64 AArch64ISelLowering.cpp AArch64ISelLowering.h

Refactor
DeltaFile
+121-106llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+8-2llvm/lib/Target/AArch64/AArch64ISelLowering.h
+129-1082 files

LLVM/project 7c1d517llvm/lib/Target/SystemZ SystemZInstrInfo.td SystemZInstrVector.td, llvm/test/CodeGen/SystemZ remat.ll builtin-setjmp-spills.ll

[SystemZ] Enable rematerialization for scalar loads (#179838)

We can avoid the unnecessary spill by marking loads as rematerializable
and just directly loading from where the argument was originally passed
on the stack. TargetTransformInfo::isReMaterializableImpl checks to make
sure that any loads are MI.isDereferenceableInvariantLoad(), so we
should be able to move the load down to the remat site.

Related: [#166774](https://github.com/llvm/llvm-project/pull/166774)

---------

Co-authored-by: anoopkg6 <anoopkg6 at github.com>
DeltaFile
+122-0llvm/test/CodeGen/SystemZ/remat.ll
+43-62llvm/test/CodeGen/SystemZ/builtin-setjmp-spills.ll
+13-13llvm/test/CodeGen/SystemZ/fp-move-02.ll
+3-2llvm/lib/Target/SystemZ/SystemZInstrInfo.td
+2-1llvm/lib/Target/SystemZ/SystemZInstrVector.td
+2-1llvm/lib/Target/SystemZ/SystemZInstrFP.td
+185-796 files

LLVM/project 4f92cf9llvm/test/CodeGen/X86 combine-clmul.ll

[X86] combine-clmul.ll - pull out canonicalization tests from #177566 (#181820)

DeltaFile
+78-0llvm/test/CodeGen/X86/combine-clmul.ll
+78-01 files

LLVM/project 75aa83cllvm/lib/CodeGen/SelectionDAG DAGCombiner.cpp, llvm/test/CodeGen/AArch64 arm64-vabs.ll

[SDAG] foldSelectToABD - canonicalize compare of abd (#180952)

DeltaFile
+48-0llvm/test/CodeGen/AArch64/arm64-vabs.ll
+15-0llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+63-02 files

LLVM/project 19a6a28clang/docs ReleaseNotes.rst, clang/lib/Sema SemaInit.cpp

[clang] Fix crashes when initializing constexpr int* with floating-point (#180376)

Call isNullPointer() only when we are sure that Rvalue is a pointer.
Fixes #180313

---------

Co-authored-by: Mariya Podchishchaeva <mariya.podchishchaeva at intel.com>
DeltaFile
+3-3clang/test/AST/ByteCode/constexpr.c
+3-3clang/test/Sema/constexpr.c
+2-1clang/lib/Sema/SemaInit.cpp
+1-0clang/docs/ReleaseNotes.rst
+9-74 files

LLVM/project f726379llvm/lib/Target/AArch64/GISel AArch64RegisterBankInfo.cpp

[AArch64][GlobalISel] Move comment to above if statement for readability
DeltaFile
+3-3llvm/lib/Target/AArch64/GISel/AArch64RegisterBankInfo.cpp
+3-31 files

LLVM/project 7be392eclang/include/clang/Analysis/Scalable/Serialization JSONFormat.h, clang/lib/Analysis/Scalable/Serialization JSONFormat.cpp

[clang][ssaf] Fix building on gcc-7 and MinGW/Cygwin (#181812)

So we had two problems:
1) gcc-7 does not fully support C++17 mandatory NRVO, so we need
   an explicit std::move in return statements to workaround this.
2) MinGW/Cygwin is picky about extern templates; this actually bit me
   once, so I'll think about how to mitigate in long term, but for now
   just add the missing declarations.

Reported in:
https://github.com/llvm/llvm-project/pull/180021#issuecomment-3912981241
https://github.com/llvm/llvm-project/pull/180021#issuecomment-3914252777
DeltaFile
+6-4clang/lib/Analysis/Scalable/Serialization/JSONFormat.cpp
+7-0clang/include/clang/Analysis/Scalable/Serialization/JSONFormat.h
+7-0clang/unittests/Analysis/Scalable/Registries/MockSerializationFormat.h
+3-1clang/unittests/Analysis/Scalable/Registries/MockSerializationFormat.cpp
+23-54 files

LLVM/project 9a0861ellvm/test/Transforms/SLPVectorizer semanticly-same.ll

[SLP] semanticly-same.ll - regenerate tests to reduce diff in #181731 (#181819)

DeltaFile
+12-15llvm/test/Transforms/SLPVectorizer/semanticly-same.ll
+12-151 files

LLVM/project 19dbbeellvm/test/Transforms/LoopInterchange lcssa-preheader.ll interchangeable.ll

[LoopInterchange] Update tests generated by UTC (NFC) (#181804)

Update the LoopInterchange tests that use UTC to generate assertions, in
order to avoid irrelevant changes during other developments. Most of the
changes are simply the result of re-running UTC, but this patch also
includes a few additional minor adjustments by hand:

- Rename IR value names to suppress warnings by UTC.
- Delete `NOTE: Assertions have been ...` from the test file that
actually doesn't use UTC.
- Delete unnecessary `-pass-remarks-missed=...`.
- Add a store instruction for an unused GEP result, which could
otherwise affect other developments.
DeltaFile
+78-19llvm/test/Transforms/LoopInterchange/lcssa-preheader.ll
+6-6llvm/test/Transforms/LoopInterchange/interchangeable.ll
+5-5llvm/test/Transforms/LoopInterchange/pr45743-move-from-inner-preheader.ll
+4-4llvm/test/Transforms/LoopInterchange/update-condbranch-duplicate-successors.ll
+2-2llvm/test/Transforms/LoopInterchange/reduction2mem.ll
+1-1llvm/test/Transforms/LoopInterchange/phi-ordering.ll
+96-371 files not shown
+96-387 files

LLVM/project 93cf432llvm/lib/Target/AArch64/GISel AArch64RegisterBankInfo.cpp

[AArch64][GlobalISel] Remove unnecessary brackets
DeltaFile
+10-7llvm/lib/Target/AArch64/GISel/AArch64RegisterBankInfo.cpp
+10-71 files

LLVM/project cc64232clang/test/CIR/CodeGen builtin-floating-point.c, llvm/lib/Transforms/Scalar DeadStoreElimination.cpp

Merge branch 'main' into users/JoshdRod/f16-to-i16-fallbacks
DeltaFile
+1,560-1,560llvm/test/tools/llvm-mca/RISCV/SiFive7/vector-fp.s
+1,325-1,258llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
+991-1,493llvm/test/CodeGen/X86/broadcast-elm-cross-splat-vec.ll
+80-2,209llvm/test/Transforms/LowerMatrixIntrinsics/multiply-fused-loops-large-matrixes.ll
+2,212-0clang/test/CIR/CodeGen/builtin-floating-point.c
+470-1,417llvm/test/CodeGen/AMDGPU/fptoi.i128.ll
+6,638-7,9372,983 files not shown
+132,571-56,1812,989 files

LLVM/project c88d2bclldb/tools/lldb-dap Variables.h

[lldb-dap] Fix missing ampersand in the deleted constructor (#181818)

Fails to compile when cross compiling
DeltaFile
+1-1lldb/tools/lldb-dap/Variables.h
+1-11 files

LLVM/project 0106783mlir/include/mlir/Target/LLVMIR LLVMTranslationDialectInterface.td LLVMTranslationInterface.h, mlir/lib/Dialect/LLVMIR CMakeLists.txt

[MLIR] convert LLVMTranslationDialectInterface using ODS (#181391)

This PR converts LLVMTranslationDialectInterface using ODS
DeltaFile
+63-0mlir/include/mlir/Target/LLVMIR/LLVMTranslationDialectInterface.td
+3-41mlir/include/mlir/Target/LLVMIR/LLVMTranslationInterface.h
+4-3mlir/lib/Dialect/LLVMIR/CMakeLists.txt
+4-0mlir/include/mlir/Target/LLVMIR/CMakeLists.txt
+74-444 files

LLVM/project a33a56ellvm/test/tools/llvm-readobj/ELF many-sections.s

fixup! [llvm-readobj, ELF] Support reading binary with more than PN_XNUM segments.
DeltaFile
+6-6llvm/test/tools/llvm-readobj/ELF/many-sections.s
+6-61 files

LLVM/project b982379llvm/test/tools/llvm-readobj/ELF many-segments.test invalid-e_phnum.test, llvm/test/tools/llvm-readobj/ELF/Inputs many-segments.o.gz

[llvm-readobj, ELF] Support reading binary with more than PN_XNUM segments.

FreeBSD coredump uses program headers to store mmap information. It is possible
for program to use more than PN_XNUM mmaps. Therefore, we implement the support
of PN_XNUM in readelf.
DeltaFile
+79-0llvm/test/tools/llvm-readobj/ELF/many-segments.test
+51-23llvm/tools/llvm-readobj/ELFDumper.cpp
+39-0llvm/test/tools/llvm-readobj/ELF/invalid-e_phnum.test
+0-0llvm/test/tools/llvm-readobj/ELF/Inputs/many-segments.o.gz
+169-234 files

LLVM/project 70ea615llvm/test/tools/llvm-readobj/ELF many-segments.test file-headers.test, llvm/tools/llvm-readobj ELFDumper.cpp

fixup! [Object,ELF] Implement PN_XNUM extension for program headers (#162288)
DeltaFile
+12-47llvm/test/tools/llvm-readobj/ELF/many-segments.test
+7-4llvm/test/tools/llvm-readobj/ELF/file-headers.test
+6-4llvm/test/tools/llvm-readobj/ELF/invalid-e_phnum.test
+1-2llvm/tools/llvm-readobj/ELFDumper.cpp
+1-0llvm/test/tools/llvm-readobj/ELF/many-sections.s
+27-575 files

LLVM/project 6701b66llvm/include/llvm/Object ELF.h

[Object][ELF] Fix section header zero check

The PN_XUM is a necessary condition for reading shdr0
regardless of the value of e_shoff. Without this,
readShdrZero falsely returns the garbage value in ELF
header instead of emitting warning.
DeltaFile
+12-7llvm/include/llvm/Object/ELF.h
+12-71 files

LLVM/project 9180eddllvm/test/tools/llvm-readobj/ELF many-segments.test file-headers.test, llvm/test/tools/llvm-readobj/ELF/Inputs many-segments.o.gz

fixup! [llvm-readobj, ELF] Support reading binary with more than PN_XNUM segments.
DeltaFile
+45-60llvm/test/tools/llvm-readobj/ELF/many-segments.test
+34-33llvm/tools/llvm-readobj/ELFDumper.cpp
+8-8llvm/test/tools/llvm-readobj/ELF/file-headers.test
+7-7llvm/test/tools/llvm-readobj/ELF/many-sections.s
+8-4llvm/test/tools/llvm-readobj/ELF/invalid-e_phnum.test
+0-0llvm/test/tools/llvm-readobj/ELF/Inputs/many-segments.o.gz
+102-1126 files

LLVM/project 0e1cc61offload/test lit.cfg

[Offload][test] Use just-compiled lld and llvm-symbolizer (#181793)

In a bootstrapping build with LLVM_ENABLE_PROJECTS=lld, the lld
executable will be found in LLVM's bin/ directory. But `check-offload`
will currently ignore it because the JIT plugin will look for `lld` in
`$PATH`. Similarly, the sanitizer tests require llvm-symbolizer during
execution to FileCheck the expected stack trace.

Add the llvm tools directory to `$PATH` so tests can use lld and
llvm-symbolizer in it. It should be prefered over a system-installed
lld/llvm-symbolizer.

Fixes the JIT and sanitizer tests of
[openmp-offload-amdgpu-clang-flang](https://lab.llvm.org/staging/#/builders/105).
DeltaFile
+15-0offload/test/lit.cfg
+15-01 files