LLVM/project 0ebd433llvm/lib/Target/AMDGPU AMDGPULowerModuleLDSPass.cpp, llvm/test/CodeGen/AMDGPU lower-module-lds-precise-allocate-to-module-struct.ll

[AMDGPU] Be less optimistic when allocating module scope lds (#161464)

Make the test for when additional variables can be added to the struct
allocated at address zero more stringent. Previously, variables can be
added to it (for faster access) even when that increases the lds
requested by a kernel. This corrects that oversight.

Test case diff shows the change from all variables being allocated into
the module lds to only some being, in particular the introduction of
uses of the offset table and that some kernels now use less lds than
before.

Alternative to PR 160181
DeltaFile
+42-47llvm/test/CodeGen/AMDGPU/lower-module-lds-precise-allocate-to-module-struct.ll
+4-1llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
+46-482 files

LLVM/project 879d2c9llvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll memory-legalizer-flat-cluster.ll, llvm/test/CodeGen/PowerPC vector-popcnt-128-ult-ugt.ll

Rebase

Created using spr 1.3.7
DeltaFile
+48,151-46,275llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+22,442-22,438llvm/test/CodeGen/PowerPC/vector-popcnt-128-ult-ugt.ll
+40,677-0llvm/test/CodeGen/RISCV/rvv/nontemporal-vp-scalable.ll
+25,726-0llvm/test/CodeGen/AMDGPU/memory-legalizer-flat-cluster.ll
+11,782-12,656llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+23,810-0llvm/test/CodeGen/AMDGPU/memory-legalizer-global-cluster.ll
+172,588-81,36916,757 files not shown
+1,382,454-507,45916,763 files

LLVM/project a2b6602llvm/lib/Target/NVPTX NVPTXISelLowering.cpp, llvm/test/CodeGen/NVPTX f32x2-convert-i32x2.ll

[NVPTX] expand trunc/ext on v2i32 (#161715)

#153478 made v2i32 legal on newer GPUs, but we can not lower all
operations yet. Expand the `trunc/ext` operation until we implement
efficient lowering.
DeltaFile
+145-0llvm/test/CodeGen/NVPTX/f32x2-convert-i32x2.ll
+5-0llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
+150-02 files

LLVM/project 96782aallvm/runtimes CMakeLists.txt

Revert "[PATCH] offload-tunnel-cmake with proper escape (#161552)"

This reverts commit 3f3a20f654f913f7e251e3bf4bd5a63e73e5571a.
DeltaFile
+2-6llvm/runtimes/CMakeLists.txt
+2-61 files

LLVM/project 6048c2fflang/lib/Parser prescan.cpp parsing.cpp, flang/test/Semantics/OpenACC acc-sentinel.f90

[flang][openacc] Suppport !@acc compiler sentinel (#161706)

DeltaFile
+14-0flang/test/Semantics/OpenACC/acc-sentinel.f90
+5-0flang/lib/Parser/prescan.cpp
+1-0flang/lib/Parser/parsing.cpp
+20-03 files

LLVM/project 11faf88llvm/include/llvm/IR IntrinsicInst.h, llvm/lib/Transforms/InstCombine InstCombineCompares.cpp InstCombineInternal.h

[InstCombine] Fold icmp with clamp into unsigned bound check (#161303)

Fix #157315 

alive2: https://alive2.llvm.org/ce/z/TEnuFV

The equality comparison of `min(max(X, Lo), Hi)` and `X` is actually a
range check on `X`. This PR folds this into an unsigned bound check `(X
- Lo) u< (Hi - Lo + 1)`.

---------

Co-authored-by: Yingwei Zheng <dtcxzyw at qq.com>
DeltaFile
+295-0llvm/test/Transforms/InstCombine/icmp-clamp.ll
+44-1llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+20-0llvm/include/llvm/IR/IntrinsicInst.h
+1-0llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+360-14 files

LLVM/project 6943906llvm/lib/Target/RISCV RISCVInstrInfoA.td RISCVGISel.td

[RISCV][GISel] Share an atomic load isel pattern GISel RV64 and SDAG RV32. NFC (#161721)

Use stricter type for RV64 only patterns.

Stores are different because atomic_store doesn't differentiate
truncating and non-truncating stores.
DeltaFile
+4-5llvm/lib/Target/RISCV/RISCVInstrInfoA.td
+1-1llvm/lib/Target/RISCV/RISCVGISel.td
+5-62 files

LLVM/project 902fe02offload/libomptarget exports, offload/libomptarget/OpenMP InteropAPI.cpp

[OFFLOAD] Restore interop functionality (#161429)

This implements two pieces to restore the interop functionality (that I
broke) when the 6.0 interfaces were added:

* A set of wrappers that support the old interfaces on top of the new
ones
* The same level of interop support for the CUDA amd AMD plugins
DeltaFile
+44-0offload/plugins-nextgen/cuda/src/rtl.cpp
+37-4offload/libomptarget/OpenMP/InteropAPI.cpp
+31-0offload/plugins-nextgen/amdgpu/src/rtl.cpp
+4-1offload/libomptarget/exports
+116-54 files

LLVM/project 8779ab6llvm/lib/Target/RISCV RISCVInstrInfoZalasr.td

[RISCV] Always use XLenVT for pointer operand in PatLAQ and PatSRL. NFC (#161709)

The vt argument is not used today so it always gets the default XLenVT
which is why this is NFC. I plan to use it in a future patch.
DeltaFile
+3-2llvm/lib/Target/RISCV/RISCVInstrInfoZalasr.td
+3-21 files

LLVM/project 44d471elibc/include unistd.yaml, libc/src/unistd faccessat.h

[libc] Implement faccessat  (#161065)

#160404

- Implement POSIX function "faccessat"
- Remove redundant param in facessat syscall in access implementation,
faccessat syscall does not take a flags arg
DeltaFile
+115-0libc/test/src/unistd/faccessat_test.cpp
+37-0libc/src/unistd/linux/faccessat.cpp
+20-0libc/src/unistd/faccessat.h
+17-0libc/test/src/unistd/CMakeLists.txt
+13-0libc/src/unistd/linux/CMakeLists.txt
+9-0libc/include/unistd.yaml
+211-06 files not shown
+228-112 files

LLVM/project 1d7ec60llvm/lib/Target/RISCV RISCVInstrInfoVPseudos.td

[RISCV] Improve formatting in RISCVInstrInfoVPseudos.td. NFC (#161470)

Primarily focused on changes from RISCVVPseudo recently inheriting from
Pseudo.
DeltaFile
+22-30llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
+22-301 files

LLVM/project 49603bdllvm/include/llvm/Analysis MemoryProfileInfo.h, llvm/lib/Analysis MemoryProfileInfo.cpp

Revert "[MemProf] Add ambigous memprof attribute" (#161717)

Reverts llvm/llvm-project#157204

This caused issues in ThinLTO binaries because of the checking here,
that didn't expect allocations needing cloning to have memprof metadata:
https://github.com/llvm/llvm-project/blob/9133fc8cb04f8e45c9b46de85a8de99bf01e55c7/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp#L5572-L5582

I need to move the assert into the if check and guard by that condition.
And add a more thorough test.
DeltaFile
+0-22llvm/lib/Analysis/MemoryProfileInfo.cpp
+7-14llvm/unittests/Analysis/MemoryProfileInfoTest.cpp
+0-8llvm/include/llvm/Analysis/MemoryProfileInfo.h
+0-2llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+7-464 files

LLVM/project f1650cfclang/docs ReleaseNotes.rst, clang/lib/Sema SemaChecking.cpp

Revert "[clang] Convert second arg of __builtin_assume_aligned to ConstantExpr (#161314)" (#161719)

This reverts commit 8f77621574176387f906b8ceef9e1abb90bf22f6 (#161314).

Reason: Causing crashes when building https://github.com/google/highway.
See the original PR for details.
DeltaFile
+0-6clang/test/SemaCXX/builtin-assume-aligned.cpp
+0-3clang/lib/Sema/SemaChecking.cpp
+0-2clang/docs/ReleaseNotes.rst
+0-113 files

LLVM/project 819f34aclang/include/clang/AST OpenACCClause.h, clang/lib/CIR/CodeGen CIRGenOpenACCRecipe.h CIRGenOpenACCClause.cpp

[NFC][OpenACC] Remove 'initExpr' from AST/etc. (#161674)

I originally expected that we were going to need the initExpr stored
separately from the allocaDecl when doing arrays/pointers, however after
implementing it, we found that the idea of having the allocaDecl just
store its init directly still works perfectly. This patch removes the
extra field from the AST.
DeltaFile
+26-4clang/lib/Sema/SemaOpenACC.cpp
+8-13clang/include/clang/AST/OpenACCClause.h
+8-12clang/lib/CIR/CodeGen/CIRGenOpenACCRecipe.h
+3-16clang/lib/CIR/CodeGen/CIRGenOpenACCClause.cpp
+6-9clang/lib/Serialization/ASTReader.cpp
+2-7clang/tools/libclang/CIndex.cpp
+53-613 files not shown
+62-789 files

LLVM/project 4ed1b49clang/lib/CIR/CodeGen TargetInfo.h

address minor attr ret type
DeltaFile
+1-1clang/lib/CIR/CodeGen/TargetInfo.h
+1-11 files

LLVM/project 847e1e1clang/lib/Format TokenAnnotator.cpp ContinuationIndenter.cpp

[clang-format][NFC] Introduce isNoneOf (#161021)

And apply throughout the code base.
DeltaFile
+53-53clang/lib/Format/TokenAnnotator.cpp
+25-25clang/lib/Format/ContinuationIndenter.cpp
+21-21clang/lib/Format/UnwrappedLineParser.cpp
+3-3clang/lib/Format/UnwrappedLineFormatter.cpp
+4-1clang/lib/Format/FormatToken.h
+2-2clang/lib/Format/NamespaceEndCommentsFixer.cpp
+108-1058 files not shown
+119-11614 files

LLVM/project 5be4fc2mlir/lib/Dialect/Arith/Transforms EmulateUnsupportedFloats.cpp, mlir/test/Dialect/Arith emulate-unsupported-floats.mlir

[mlir][Arith] arith.select doesn't need to be emulated for small floats (#161707)

arith.select isn't an arithmetic operation in the sense of things like
addf or mulf, which the emulate-unsupported-floats rewrites using extf
and truncf.

This patch adds select as a legal operation to prevent a pointless
conversion aronud conditional moves.

Fixes https://github.com/iree-org/iree/issues/22181
DeltaFile
+11-0mlir/test/Dialect/Arith/emulate-unsupported-floats.mlir
+2-1mlir/lib/Dialect/Arith/Transforms/EmulateUnsupportedFloats.cpp
+13-12 files

LLVM/project 68b143dmlir/lib/Dialect/XeGPU/Transforms XeGPUWgToSgDistribute.cpp, mlir/test/Dialect/XeGPU xegpu-wg-to-sg-unify-ops.mlir

[MLIR][XeGPU] Use operand layouts for store scatter (#161447)

The PR adds a change to use the layouts from the operands since store
doesn't have a result
DeltaFile
+14-10mlir/lib/Dialect/XeGPU/Transforms/XeGPUWgToSgDistribute.cpp
+12-7mlir/test/Dialect/XeGPU/xegpu-wg-to-sg-unify-ops.mlir
+26-172 files

LLVM/project e1ae245llvm/include/llvm/Analysis MemoryProfileInfo.h, llvm/lib/Analysis MemoryProfileInfo.cpp

Revert "[MemProf] Add ambigous memprof attribute (#157204)"

This reverts commit cf44f19e57210844334e05cf7ed79fb5695cc68f.
DeltaFile
+0-22llvm/lib/Analysis/MemoryProfileInfo.cpp
+7-14llvm/unittests/Analysis/MemoryProfileInfoTest.cpp
+0-8llvm/include/llvm/Analysis/MemoryProfileInfo.h
+0-2llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+7-464 files

LLVM/project 9133fc8llvm/test/Analysis/LoopAccessAnalysis early-exit-runtime-checks.ll, llvm/test/Transforms/LoopVectorize single-early-exit-deref-assumptions.ll

[LAA,LV] Add early-exit tests with deref assumes and nofree via context.

Add tests with early exits and dereferenceable assumptions that need
proving no-free via the context.
DeltaFile
+126-0llvm/test/Analysis/LoopAccessAnalysis/early-exit-runtime-checks.ll
+47-0llvm/test/Transforms/LoopVectorize/single-early-exit-deref-assumptions.ll
+173-02 files

LLVM/project 1f22567llvm/lib/Transforms/Vectorize VPlanTransforms.cpp

[VPlan] Improve code using VPlan::getFalse (NFC) (#161681)

DeltaFile
+1-2llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+1-21 files

LLVM/project abf8984llvm/include/llvm/CodeGen MIR2Vec.h, llvm/lib/CodeGen MIR2Vec.cpp

MIRVocabulary changes
DeltaFile
+18-13llvm/include/llvm/CodeGen/MIR2Vec.h
+22-6llvm/unittests/CodeGen/MIR2VecTest.cpp
+12-6llvm/lib/CodeGen/MIR2Vec.cpp
+52-253 files

LLVM/project 39467a8llvm/include/llvm/CodeGen MIR2Vec.h, llvm/lib/Analysis/models x86SeedEmbeddingVocab100D.json

Introducing MIR2Vec
DeltaFile
+6,882-0llvm/test/CodeGen/MIR2Vec/Inputs/reference_x86_vocab_wo=0.5_print.txt
+6,882-0llvm/test/CodeGen/MIR2Vec/Inputs/reference_x86_vocab_print.txt
+677-0llvm/lib/Analysis/models/x86SeedEmbeddingVocab100D.json
+300-0llvm/lib/CodeGen/MIR2Vec.cpp
+201-0llvm/unittests/CodeGen/MIR2VecTest.cpp
+181-0llvm/include/llvm/CodeGen/MIR2Vec.h
+15,123-08 files not shown
+15,219-6514 files

LLVM/project 8f67cddllvm/lib/Target/AArch64 AArch64FrameLowering.cpp AArch64PrologueEpilogue.cpp, llvm/test/CodeGen/AArch64 stack-hazard.ll split-sve-stack-frame-layout.ll

[AArch64][SME] Support split ZPR and PPR area allocation (#142392)

For a while we have supported the `-aarch64-stack-hazard-size=<size>`
option, which adds "hazard padding" between GPRs and FPR/ZPRs. However,
there is currently a hole in this mitigation as PPR and FPR/ZPR accesses
to the same area also cause streaming memory hazards (this is noted by
`-pass-remarks-analysis=sme -aarch64-stack-hazard-remark-size=<val>`),
and the current stack layout places PPRs and ZPRs within the same area.

Which looks like:

```
------------------------------------  Higher address
| callee-saved gpr registers        |
|---------------------------------- |
| lr,fp  (a.k.a. "frame record")    |
|-----------------------------------| <- fp(=x29)
|   <hazard padding>                |
|-----------------------------------|

    [54 lines not shown]
DeltaFile
+544-332llvm/test/CodeGen/AArch64/stack-hazard.ll
+824-0llvm/test/CodeGen/AArch64/split-sve-stack-frame-layout.ll
+587-0llvm/test/CodeGen/AArch64/framelayout-split-sve.mir
+232-65llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
+117-8llvm/lib/Target/AArch64/AArch64PrologueEpilogue.cpp
+18-2llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h
+2,322-4079 files not shown
+2,350-43515 files

LLVM/project b86ddaeclang-tools-extra/include-cleaner/unittests RecordTest.cpp, clang/include/clang/Frontend CompilerInstance.h

[clang] NFCI: Clean up `CompilerInstance::create{File,Source}Manager()` (#160748)

The `CompilerInstance::createSourceManager()` function currently accepts
the `FileManager` to be used. However, all clients call
`CompilerInstance::createFileManager()` prior to creating the
`SourceManager`, and it never makes sense to use a `FileManager` in the
`SourceManager` that's different from the rest of the compiler. Passing
the `FileManager` explicitly is redundant, error-prone, and deviates
from the style of other `CompilerInstance` initialization APIs.

This PR therefore removes the `FileManager` parameter from
`createSourceManager()` and also stops returning the `FileManager`
pointer from `createFileManager()`, since that was its primary use. Now,
`createSourceManager()` internally calls `getFileManager()` instead.
DeltaFile
+7-6clang/lib/Frontend/CompilerInstance.cpp
+4-7clang/lib/Frontend/FrontendAction.cpp
+6-5clang/lib/Tooling/DependencyScanning/DependencyScannerImpl.cpp
+4-3clang-tools-extra/include-cleaner/unittests/RecordTest.cpp
+2-4clang/include/clang/Frontend/CompilerInstance.h
+2-2clang/unittests/Serialization/ForceCheckFileInputTest.cpp
+25-279 files not shown
+34-3715 files

LLVM/project 99d8590mlir/lib/Target/IRDLToCpp IRDLToCpp.cpp, mlir/lib/Target/IRDLToCpp/Templates PerOperationDecl.txt

[mlir] [irdl] Add support for regions in irdl-to-cpp (#158540)

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

For the input

```mlir
irdl.dialect @conditional_dialect {
  // A conditional operation with regions
  irdl.operation @conditional {
      // Create region constraints
      %r0 = irdl.region                    // Unconstrained region
      %r1 = irdl.region()                  // Region with no entry block arguments
      %v0 = irdl.any
      %r2 = irdl.region(%v0)               // Region with one i1 entry block argument

      irdl.regions(cond: %r2, then: %r0, else: %r1)
  }
}

    [70 lines not shown]
DeltaFile
+160-2mlir/lib/Target/IRDLToCpp/IRDLToCpp.cpp
+31-22mlir/lib/Target/IRDLToCpp/Templates/PerOperationDecl.txt
+50-1mlir/test/lib/Dialect/TestIRDLToCpp/test_irdl_to_cpp.irdl.mlir
+27-4mlir/test/lib/Dialect/TestIRDLToCpp/TestIRDLToCppDialect.cpp
+3-24mlir/test/lib/Dialect/TestIRDLToCpp/test_irdl_to_cpp_invalid_unsupported_types.irdl.mlir
+16-2mlir/test/lib/Dialect/TestIRDLToCpp/test_conversion.testd.mlir
+287-552 files not shown
+299-598 files

LLVM/project ec34722llvm/include/llvm/Analysis IR2Vec.h, llvm/lib/Analysis IR2Vec.cpp

[NFC][IR2Vec]Moving  to
DeltaFile
+43-43llvm/lib/Analysis/IR2Vec.cpp
+7-2llvm/include/llvm/Analysis/IR2Vec.h
+50-452 files

LLVM/project 67c000eclang/include/clang/AST TypeBase.h, clang/lib/Sema HLSLBuiltinTypeDeclBuilder.cpp HLSLExternalSemaSource.cpp

[HLSL] [SPIR-V] Add counter member for typed buffer (#161414)

This is part 1 of implementing the typed buffer counters proposal:

https://github.com/llvm/wg-hlsl/blob/main/proposals/0023-typed-buffer-counters.md

This patch adds the initial plumbing for supporting counter variables
associated with structured buffers for the SPIR-V backend. It introduces
an `IsCounter` attribute to `HLSLAttributedResourceType` and threads it
through the AST, type printing, and mangling. It also adds a
`__counter_handle` member to the relevant buffer types in
`HLSLBuiltinTypeDeclBuilder`.

Contributes to https://github.com/llvm/llvm-project/issues/137032
DeltaFile
+98-12clang/lib/Sema/HLSLBuiltinTypeDeclBuilder.cpp
+30-17clang/test/CodeGenHLSL/resources/RWStructuredBuffer-elementtype.hlsl
+13-13clang/test/CodeGenHLSL/resources/RasterizerOrderedStructuredBuffer-elementtype.hlsl
+13-13clang/lib/Sema/HLSLExternalSemaSource.cpp
+19-4clang/test/AST/HLSL/StructuredBuffers-AST.hlsl
+13-6clang/include/clang/AST/TypeBase.h
+186-6511 files not shown
+239-7517 files

LLVM/project 0b7129allvm/lib/Transforms/InstCombine InstCombineCompares.cpp, llvm/test/Transforms/InstCombine fcmp.ll

[InstCombine] Fix FMF propagation in `foldFCmpFSubIntoFCmp` (#161539)

Proof: https://alive2.llvm.org/ce/z/orSP-S
Closes https://github.com/llvm/llvm-project/issues/161525.
DeltaFile
+40-0llvm/test/Transforms/InstCombine/fcmp.ll
+3-0llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+43-02 files

LLVM/project c470982libc/fuzzing/stdlib strtointeger_differential_fuzz.cpp

[libc] Fix issue with fuzz input too short for atoi diff fuzz (#161705)

The string to integer differential fuzzer assumes at least one byte of
meaningful input, but wasn't explicitly checking that. Now it does.
DeltaFile
+4-0libc/fuzzing/stdlib/strtointeger_differential_fuzz.cpp
+4-01 files