LLVM/project 9db9f6dmlir/test/Dialect/EmitC/tosa td.mlir ops.mlir, mlir/test/Integration/Dialect/EmitC td.mlir tosa.mlir

[mlir][emitc] Refactor the e2e test for TOSA -> EmitC lowering (#194686)

Update the TOSA -> EmitC test, mlir/test/Dialect/EmitC/tosa/ops.mlir, to also
compile the generated source with a C++ compiler. This adds an `mlir-translate`
step, making the overall flow:

    mlir-opt tosa.mlir | mlir-translate | c++ -Wall -Werror -c

Although the test still does not execute the generated code, compiling it with
a host compiler increases coverage and makes the test closer to an integration
test. For this reason, move it to:

    mlir/test/Integration/Dialect/EmitC/

The source generated by the translator uses `size_t`, which requires the
`stddef.h` header. This is currently provided explicitly in the compile step
with `-include stddef.h`; a follow-up should consider emitting the required
include from the translator instead.
DeltaFile
+0-44mlir/test/Dialect/EmitC/tosa/td.mlir
+44-0mlir/test/Integration/Dialect/EmitC/td.mlir
+0-43mlir/test/Dialect/EmitC/tosa/ops.mlir
+37-0mlir/test/Integration/Dialect/EmitC/tosa.mlir
+0-2mlir/test/Dialect/EmitC/tosa/lit.local.cfg
+2-0mlir/test/Integration/Dialect/EmitC/lit.local.cfg
+83-896 files

LLVM/project 0c27430mlir/include/mlir/Dialect/SPIRV/Transforms Passes.td

[mlir][spirv][nfc] Fix the summary of SPIRVLowerABIAttributesPass (#195043)
DeltaFile
+1-1mlir/include/mlir/Dialect/SPIRV/Transforms/Passes.td
+1-11 files

LLVM/project c61b06ellvm/test/CodeGen/X86 vector-reduce-smin.ll vector-reduce-smax.ll, llvm/test/tools/llvm-mca/AArch64/Cortex C1Premium-sve-instructions.s C1Premium-writeback.s

Merge branch 'main' into users/kparzysz/a01-nontemporal-arguments
DeltaFile
+6,873-0llvm/test/tools/llvm-mca/AArch64/Cortex/C1Premium-sve-instructions.s
+2,928-1,388llvm/test/CodeGen/X86/vector-reduce-smin.ll
+2,924-1,389llvm/test/CodeGen/X86/vector-reduce-smax.ll
+3,979-0llvm/test/tools/llvm-mca/AArch64/Cortex/C1Premium-writeback.s
+2,677-1,279llvm/test/CodeGen/X86/vector-reduce-umax.ll
+2,628-1,271llvm/test/CodeGen/X86/vector-reduce-umin.ll
+22,009-5,3272,250 files not shown
+99,997-34,8912,256 files

LLVM/project 8a0c5d3llvm/include/llvm/CodeGen SelectionDAG.h SelectionDAGNodes.h, llvm/lib/CodeGen/SelectionDAG SelectionDAG.cpp DAGCombiner.cpp

[DAG] Replace llvm::isNeutralConstant with SelectionDAG::isIdentityElement (#195827)

Initial step towards generalising this - move to SelectionDAG like other
valuetracker helpers, add DemandedElts/Depth controls, etc.

We can add target node handling when it becomes necessary.

Renamed to "IdentityElement" to match llvm naming conventions.
DeltaFile
+17-11llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+16-3llvm/include/llvm/CodeGen/SelectionDAG.h
+4-4llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+0-6llvm/include/llvm/CodeGen/SelectionDAGNodes.h
+2-2llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+2-2llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+41-281 files not shown
+42-297 files

LLVM/project 90c3df2

Merge commit 'llvmorg-23-init-13816-g0135cf99f3a2' into HEAD

Conflicts:
        llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
DeltaFile
+0-00 files

LLVM/project 243edbfclang/test/CoverageMapping macro-expressions.cpp macroscopes.cpp, llvm/lib/ProfileData/Coverage CoverageMappingReader.cpp CoverageMapping.cpp

Revise w/ expansion walker

Conflicts:
        llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
DeltaFile
+1-77llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
+42-15llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
+17-17clang/test/CoverageMapping/macro-expressions.cpp
+15-15clang/test/CoverageMapping/macroscopes.cpp
+12-12clang/test/CoverageMapping/macroception.c
+10-10clang/test/CoverageMapping/macros.c
+97-14617 files not shown
+156-20223 files

LLVM/project 3dfc955llvm/lib/ProfileData/Coverage CoverageMappingReader.cpp

Dissolve one condition to invert the loop
DeltaFile
+11-15llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
+11-151 files

LLVM/project af0a4a0llvm/lib/ProfileData/Coverage CoverageMappingReader.cpp

Get rid of the assumption "[0] is the root"
DeltaFile
+2-12llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
+2-121 files

LLVM/project d496262llvm/lib/ProfileData/Coverage CoverageMappingReader.cpp

[Coverage] Improve performance of propagating Counter of Expansions

This improves `-dump-coverage-mapping` (939,498 lines) for
`RISCVInstructionSelector.cpp` from 30m to 1m18s and also improves
`llvm-cov` for `check-llvm` from 33m to 24s.

The current implementation behaved O(N^2) order with hundreds
thousands of Expansions.

This assumes:
  - Records are partitioned by FileID.
    - ExpandedFileID doesn't point FileID==0, since it is the root.
  - The Count in Expansion is propagated from 1st Record in
    ExpandedFileID.

Therefore another fact below can be assumed.
  - Propagation chain consists of Expansions at each 1st Record.

This scans the Record at most a few times. O(N) is expected.

    [2 lines not shown]
DeltaFile
+84-16llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
+84-161 files

LLVM/project fcaa4d0clang-tools-extra/clang-tidy/modernize UseStringViewCheck.cpp UseStringViewCheck.h, clang-tools-extra/test/clang-tidy/checkers/modernize use-string-view-overloaded.cpp use-string-view.cpp

Revert "[clang-tidy] An option for conditional skipping overloaded functions …" (#195701)

Reverts llvm/llvm-project#194133
DeltaFile
+0-146clang-tools-extra/test/clang-tidy/checkers/modernize/use-string-view-overloaded.cpp
+91-0clang-tools-extra/test/clang-tidy/checkers/modernize/use-string-view.cpp
+3-7clang-tools-extra/clang-tidy/modernize/UseStringViewCheck.cpp
+0-4clang-tools-extra/clang-tidy/modernize/UseStringViewCheck.h
+94-1574 files

LLVM/project e036243llvm/test/Transforms/SLPVectorizer/X86 broadcast-load-cost.ll

[SLP][NFC]Add a test with broacast of loads estimation



Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/195833
DeltaFile
+41-0llvm/test/Transforms/SLPVectorizer/X86/broadcast-load-cost.ll
+41-01 files

LLVM/project 462b60bllvm/include/llvm/ADT Bitset.h, llvm/unittests/ADT BitsetTest.cpp

[ADT] Bitset: add shift operators, word accessors, and etc (#193400)

This PR is split out from #191757 per reviewer request. It has the
following changes to `llvm::Bitset<N>`:
* Added `operator<<`/`<<=`/`>>`/`>>=`, `getNumWords()`, `getWord()`, and
`findLastSet()`.
* Moved the `std::array<>` constructor from protected to **public** and
**explicit**.
 
A follow-up PR will use these to re-implement `LaneBitmask` as a
`llvm::Bitset` wrapper.

---
The unit test in the PR is largely generated by LLMs. I have reviewed it
and manually applied changes to cover more edge cases.
DeltaFile
+313-111llvm/unittests/ADT/BitsetTest.cpp
+100-4llvm/include/llvm/ADT/Bitset.h
+413-1152 files

LLVM/project b2e063bclang/include/clang/StaticAnalyzer/Core/PathSensitive CoreEngine.h, clang/lib/StaticAnalyzer/Core ExprEngine.cpp

[NFC][analyzer] Introduce specialized variants of makeNode (#194459)

This commit introduces new methods `makePostStmtNode` and
`makeNodeWithBinding` of `CoreEngine`, which will be used instead of the
5-parameter overloads of `NodeBuilder::generateNode` and
`NodeBuilder::generateSink` (which were originally methods of the class
`StmtNodeBuilder` that was deleted in commit
fb46677a858697afa116c4252e84050a07bc6a70).

This commit applies the newly introduced methods in a few places (as
examples), but there are 80+ call sites that use the 5-parameter
`NodeBuilder::generateNode` or `generateSink`, so this transition will
be completed in multiple follow-up commits.

I decided to introduce these methods because after the transition there
will be 20+ calls to `makePostStmtNode` and 30+ calls to
`makeNodeWithBinding` and it would be cumbersome to use plain `makeNode`
instead of these specialized variants.


    [2 lines not shown]
DeltaFile
+29-37clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
+23-0clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
+52-372 files

LLVM/project 3d555a9clang/include/clang/Analysis AnalysisDeclContext.h, clang/include/clang/StaticAnalyzer/Core/PathSensitive MemRegion.h

[analyzer][NFC] Rename class `StackFrameContext` to `StackFrame` (#195802)

This patch continues the refactoring roadmap described in issue #190973
by renaming the `StackFrameContext` class to just `StackFrame`. Many
variables of type `const StackFrame *` also had their names updated to
reflect the new class name `StackFrame`.
DeltaFile
+53-63clang/lib/StaticAnalyzer/Core/CallEvent.cpp
+55-58clang/lib/StaticAnalyzer/Core/MemRegion.cpp
+52-53clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
+39-41clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
+23-23clang/include/clang/Analysis/AnalysisDeclContext.h
+19-20clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
+241-25844 files not shown
+458-50150 files

LLVM/project cc0d0f4clang/lib/CIR/CodeGen CIRGenBuiltinAArch64.cpp, clang/test/CodeGen/AArch64 v8.2a-fp16-intrinsics.c

[clang][CIR] Add lowering for fp16 intrinsics (#194865)

This PR adds lowering for the following intrinsic groups:
* https://arm-software.github.io/acle/neon_intrinsics/advsimd.html#absolute-difference-1
* https://arm-software.github.io/acle/neon_intrinsics/advsimd.html#reciprocal-estimate-1
* https://arm-software.github.io/acle/neon_intrinsics/advsimd.html#reciprocal-estimate-1

It also moves the corresponding tests from:
  * clang/test/CodeGen/AArch64/v8.2a-fp16-intrinsics.c

to:
  * clang/test/CodeGen/AArch64/neon/fullfp16.c

The lowering follows the existing implementation in
CodeGen/TargetBuiltins/ARM.cpp.
DeltaFile
+68-0clang/test/CodeGen/AArch64/neon/fullfp16.c
+0-35clang/test/CodeGen/AArch64/v8.2a-fp16-intrinsics.c
+5-0clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp
+73-353 files

LLVM/project ae9f1eamlir/include/mlir/Dialect/SPIRV/IR SPIRVCLOps.td, mlir/test/Dialect/SPIRV/IR ocl-ops.mlir

[mlir][spirv] Support OpenCL.std clz in the SPIR-V dialect (#195317)

Add support for the OpenCL.std clz extended instruction in the MLIR
SPIR-V dialect. From Spriv Specs - Op Name: "clz", Op Code: "151"
DeltaFile
+50-0mlir/test/Dialect/SPIRV/IR/ocl-ops.mlir
+23-0mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCLOps.td
+2-0mlir/test/Target/SPIRV/ocl-ops.mlir
+75-03 files

LLVM/project f5c52a0clang/lib/AST/ByteCode Compiler.cpp, clang/unittests/AST EvaluateAsRValueTest.cpp

[clang][bytecode] Don't evaluate bound member function expressions in new constant interpreter (#194851)

**Problem:**

A crash is triggered by clangd's hover feature when using C++23 and the
new bytecode interpreter, which calls `Expr::EvaluateAsRValue()` to
attempt constant folding on an expression under the cursor, even when it
is not a valid constant expression.

Tested versions: 22.1.3, Trunk (x86_64-pc-linux-gnu)

**How to reproduce:**
```cpp
struct S { void f(); };
void g() { S s; s.f(); }
```
Running `clangd --check=repro.cpp` 
(with `compile_flags.txt` containing `-std=c++23
-fexperimental-new-constant-interpreter`)

    [69 lines not shown]
DeltaFile
+51-0clang/unittests/AST/EvaluateAsRValueTest.cpp
+7-0clang/lib/AST/ByteCode/Compiler.cpp
+58-02 files

LLVM/project 17c084cmlir/lib/Dialect/SPIRV/IR SPIRVTypes.cpp, mlir/test/Dialect/SPIRV/Transforms vce-deduction.mlir

[mlir][SPIR-V] Refine OpTypeImage capability inference (#195060)

Capability requirements for OpTypeImage are determined by Dim, Sampled,
MS, and Arrayed

related to LLVM SPIR-V backend PR
https://github.com/llvm/llvm-project/pull/192626
DeltaFile
+108-0mlir/test/Dialect/SPIRV/Transforms/vce-deduction.mlir
+66-4mlir/lib/Dialect/SPIRV/IR/SPIRVTypes.cpp
+55-1mlir/test/Target/SPIRV/image.mlir
+229-53 files

LLVM/project f3f0830offload/test/offloading/fortran dump_map_tables.f90

[offload] Update test after ed07c92c9629. (#195822)

We now get `a(:n) at dump_map_tables.f90:20:11` so test has been updated
accordingly. This should fix the regression seen after
https://github.com/llvm/llvm-project/pull/195346.
DeltaFile
+1-1offload/test/offloading/fortran/dump_map_tables.f90
+1-11 files

LLVM/project a3c18c0llvm/lib/Target/AArch64 AArch64SchedC1Premium.td, llvm/test/tools/llvm-mca/AArch64/Cortex C1Premium-sve-instructions.s C1Premium-writeback.s

[AArch64] Add C1-Premium scheduling model (#185398)

This patch adds the C1-Premium scheduling model. Values are derived from
Arm's SWOG for this core which can be found at

https://developer.arm.com/documentation/111080/3-0

Assisted-by Codex
DeltaFile
+6,873-0llvm/test/tools/llvm-mca/AArch64/Cortex/C1Premium-sve-instructions.s
+3,979-0llvm/test/tools/llvm-mca/AArch64/Cortex/C1Premium-writeback.s
+3,163-0llvm/test/tools/llvm-mca/AArch64/Cortex/C1Premium-neon-instructions.s
+2,565-0llvm/test/tools/llvm-mca/AArch64/Cortex/C1Premium-forwarding.s
+2,523-0llvm/test/tools/llvm-mca/AArch64/Cortex/C1Premium-basic-instructions.s
+2,348-0llvm/lib/Target/AArch64/AArch64SchedC1Premium.td
+21,451-014 files not shown
+22,332-14420 files

LLVM/project 6e27684llvm/docs LangRef.rst

[LangRef] Patchable function attributes (#195764)

Langref should document the expected layout for patchable-function-entry
/ patchable-function-prefix attrs (prefix nops go before the function
label, entry nops go after the label, both are before the prologue).

Fixes #195693.
DeltaFile
+11-0llvm/docs/LangRef.rst
+11-01 files

LLVM/project 3a5c7a7lldb/source/Host/posix MainLoopPosix.cpp, lldb/source/Plugins/Language/CPlusPlus LibStdcpp.cpp MsvcStlDeque.cpp

[lldb] fix unconsumed llvm::Expected's errors (#193257)
DeltaFile
+12-3lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
+10-4lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
+8-3lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp
+8-3lldb/source/Plugins/Language/CPlusPlus/MsvcStlDeque.cpp
+8-3lldb/source/Plugins/Language/CPlusPlus/MsvcStlVector.cpp
+8-2lldb/source/Host/posix/MainLoopPosix.cpp
+54-1811 files not shown
+102-3117 files

LLVM/project cfdec0eclang/include/clang/Analysis/Analyses/LifetimeSafety FactsGenerator.h

[LifetimeSafety] Update doc for `handleInvalidatingCall` (#195281)
DeltaFile
+1-1clang/include/clang/Analysis/Analyses/LifetimeSafety/FactsGenerator.h
+1-11 files

LLVM/project 31d1ce8lldb/docs/resources lldbdap-contributing.md, lldb/tools/lldb-dap/extension package.json

[lldb-dap][vscode] add instructions for debugging the VSCode extension (#195280)
DeltaFile
+66-0lldb/docs/resources/lldbdap-contributing.md
+1-0lldb/tools/lldb-dap/extension/package.json
+67-02 files

LLVM/project 39ee115mlir/lib/Dialect/Shard/Transforms Simplify.cpp, mlir/test/Dialect/Shard simplify.mlir

[MLIR][Shard] Fold all_gather/all_slice inverse pairs (#193906)

Add a simplify pattern that replaces all_gather(all_slice(x))/all_slice(all_gather(x))
with x when grid, grid axes, and gather/slice axis match.

Co-authored-by: Cursor <cursoragent at cursor.com>
DeltaFile
+102-1mlir/test/Dialect/Shard/simplify.mlir
+54-3mlir/lib/Dialect/Shard/Transforms/Simplify.cpp
+156-42 files

LLVM/project fc00af7llvm/lib/Target/AArch64 AArch64Processors.td, llvm/test/Transforms/LoopVectorize/AArch64 scalable-vectorization-cost-tuning.ll force-scalable-vectorization-always.ll

[AArch64] Enable SVE MaxBW for Neoverse-N2, prefer fixed at same cost (#195108)

This should be using the same settings as other 128b SVE cores. Very
slight performance improvement from MaxBW, regressions alleviated
by preferring fixed VFs over scalable when they're the same cost.
DeltaFile
+6-6llvm/test/Transforms/LoopVectorize/AArch64/scalable-vectorization-cost-tuning.ll
+1-1llvm/lib/Target/AArch64/AArch64Processors.td
+1-1llvm/test/Transforms/LoopVectorize/AArch64/force-scalable-vectorization-always.ll
+8-83 files

LLVM/project 6d8d7d0openmp CMakeLists.txt, openmp/cmake/modules LibompUtils.cmake

[OpenMP] Add target to build OpenMP runtime (#189557)

This adds a top-level target to build the OpenMP runtime, similar to
what was done in https://github.com/llvm/llvm-project/pull/186099 for
the Offload runtime.

Having this top-level target enables us to execute the build in the
pre-commit CI as shown in
https://github.com/llvm/llvm-project/pull/174955 (I actually just
cherry-picked the commit from that branch)
DeltaFile
+9-0openmp/cmake/modules/LibompUtils.cmake
+6-0openmp/CMakeLists.txt
+3-0openmp/runtime/src/CMakeLists.txt
+2-0openmp/libompd/src/CMakeLists.txt
+2-0openmp/device/CMakeLists.txt
+2-0openmp/libompd/gdb-plugin/CMakeLists.txt
+24-03 files not shown
+30-09 files

LLVM/project 1f8efdcmlir/include/mlir/Dialect/SPIRV/IR SPIRVAtomicOps.td SPIRVBase.td, mlir/test/Dialect/SPIRV/IR atomic-ops.mlir

[mlir][SPIR-V] Add AtomicLoad and AtomicStore ops (#195797)
DeltaFile
+89-0mlir/include/mlir/Dialect/SPIRV/IR/SPIRVAtomicOps.td
+60-0mlir/test/Dialect/SPIRV/IR/atomic-ops.mlir
+8-0mlir/test/Target/SPIRV/atomic-ops.mlir
+4-1mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
+161-14 files

LLVM/project 5035d76clang/include/clang/CIR MissingFeatures.h, clang/lib/CIR/CodeGen CIRGenModule.cpp

[CIR] Implement function target/tune attrs and FMV metadata.
DeltaFile
+244-0clang/test/CIR/CodeGen/attr-target-aarch64.c
+186-0clang/test/CIR/CodeGen/attr-target-x86.c
+74-0clang/test/CIR/CodeGenHIP/attr-target-amdgpu.hip
+66-3clang/lib/CIR/CodeGen/CIRGenModule.cpp
+0-1clang/include/clang/CIR/MissingFeatures.h
+570-45 files

LLVM/project ed07c92mlir/include/mlir/Target/LLVMIR/Dialect OpenMPCommon.h, mlir/lib/Target/LLVMIR/Dialect OpenMPCommon.cpp

[MLIR] Fix offload map metadata order (#195346)

This fixes one part of
https://github.com/llvm/llvm-project/issues/195333.

There are two different semicolon-field orders in
offload/include/Shared/SourceInfo.h:

1. Per-map strings (`map_var_info_t`): first field is the mapped name,
second
is the file path:
```
/// Type alias for source location information for variable mappings with
/// data layout ";name;filename;row;col;;\0" from clang.
using map_var_info_t = void *;
```

2. `ident_t` region strings: first field is the file path, second is the
function name:

    [46 lines not shown]
DeltaFile
+9-6mlir/lib/Target/LLVMIR/Dialect/OpenMPCommon.cpp
+7-7mlir/test/Target/LLVMIR/openacc-llvm.mlir
+6-2mlir/include/mlir/Target/LLVMIR/Dialect/OpenMPCommon.h
+22-153 files