LLVM/project 785490emlir/include/mlir/Transforms Passes.h Passes.td, mlir/lib/Transforms OpStats.cpp LoopInvariantCodeMotion.cpp

[MLIR] Remove `let constructor = ` from mlir/include/mlir/Transforms/Passes.td (#183950)

This makes the constructor auto-generated.
DeltaFile
+20-69mlir/include/mlir/Transforms/Passes.h
+15-32mlir/include/mlir/Transforms/Passes.td
+18-18mlir/test/Pass/ir-printing.mlir
+18-16mlir/lib/Transforms/OpStats.cpp
+10-10mlir/test/Transforms/composite-pass.mlir
+4-12mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
+85-15718 files not shown
+145-25724 files

LLVM/project b7e2044mlir/include/mlir/IR OpBase.td, mlir/test/lib/Dialect/Test TestOps.td

[MLIR][ODS] Fix AllElementCountsMatch crash on dynamic shaped types (#183948)

The AllElementCountsMatch trait called ShapedType::getNumElements() on
operands or results with dynamic dimensions, which unconditionally
asserts hasStaticShape(). This caused mlir-opt to crash instead of
failing gracefully when the trait was used with dynamically-shaped
types.

Fix this by rewriting AllElementCountsMatch to use an And<> predicate
combining Neg<AnyMatchOperatorPred> (requiring all types to be
statically shaped) with AllMatchSameOperatorPred (requiring equal
element counts). When any type has dynamic dimensions the verification
now fails with a diagnostic instead of crashing.

Update the regression test to expect a verification failure rather than
success when dynamic shapes are present.

Fixes #159740
DeltaFile
+21-0mlir/test/mlir-tblgen/types.mlir
+12-2mlir/include/mlir/IR/OpBase.td
+7-0mlir/test/lib/Dialect/Test/TestOps.td
+40-23 files

LLVM/project 2cb2fe7mlir/lib/Dialect/SCF/IR SCF.cpp, mlir/test/Dialect/SCF invalid.mlir

[mlir][scf] Fix crash in ForOp verifier when body block has no arguments (#183946)

A malformed `scf.for` whose body block contains no arguments caused
`getRegionIterArgs()` to crash via an out-of-bounds `drop_front(1)`
call. This happened because `verifyLoopLikeOpInterface` (a
`verifyRegionTrait`) invokes `getRegionIterArgs()` during
`verifyRegionInvariants`, which runs before `verifyRegions()` has a
chance to report a proper diagnostic.

Fix by adding an explicit check in `ForOp::verify()` (which runs in
`verifyInvariants`, before any region trait verifiers execute) that
ensures the body block has at least as many arguments as there are
induction variables. This prevents the crash and produces a clear error
message.

Fixes #159737
DeltaFile
+16-0mlir/lib/Dialect/SCF/IR/SCF.cpp
+15-0mlir/test/Dialect/SCF/invalid.mlir
+31-02 files

LLVM/project 9801e75llvm/lib/Target/ARM ARMInstrThumb.td, llvm/test/tools/llvm-mca/ARM simple-cortex-m33.s

[ARM] tADDrSPi no side effects change (#183071)

This is pulled out of #182771 in case it causes issues. The mis-compile
I believe is no longer present, as tADDrSPi is used in several test
cases which do not change due to of marking tADDrSPi as not affect side
effects.
DeltaFile
+4-1llvm/test/tools/llvm-mca/ARM/simple-cortex-m33.s
+1-3llvm/lib/Target/ARM/ARMInstrThumb.td
+5-42 files

LLVM/project 74c0ee7llvm/include/llvm/Analysis TargetTransformInfo.h, llvm/include/llvm/CodeGen BasicTTIImpl.h

[TTI] Remove TargetLibraryInfo from IntrinsicCostAttributes (NFC) (#183764)

This is a remnant from when `sincos` costs used the vector mappings from
`TargetLibraryInfo::getVectorMappingInfo`.
DeltaFile
+7-13llvm/lib/Analysis/CostModel.cpp
+9-8llvm/lib/Analysis/TargetTransformInfo.cpp
+2-5llvm/include/llvm/Analysis/TargetTransformInfo.h
+1-2llvm/include/llvm/CodeGen/BasicTTIImpl.h
+1-1llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+1-1llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+21-306 files

LLVM/project 6fa90a3mlir/lib/IR SymbolTable.cpp, mlir/test/Dialect/IRDL invalid.irdl.mlir

[MLIR][SymbolTable] Fix crash when SymbolTable is built on unverified IR (#183945)

The SymbolTable::SymbolTable constructor asserted that all symbol names
in the region were unique. This could cause mlir-opt to crash instead of
producing a proper diagnostic when the IR contained both:

1. An IsolatedFromAbove op (e.g., irdl.dialect) with a symbol user that
looks up symbols in an ancestor symbol table, and
2. Duplicate symbols in that ancestor (e.g., two func.func @test).

The crash occurred because IsolatedFromAbove ops are verified in
verifyOnExit() before verifyRegionInvariants() runs the SymbolTable
trait's verifyRegionTrait (which produces the proper duplicate-symbol
diagnostic). When the isolated op's symbol use verification triggered
SymbolTableCollection::getSymbolTable() on the ancestor, the constructor
would assert instead of gracefully handling the invalid-but-not-yet-
reported duplicate symbols.

The fix removes the assertion and silently skips duplicate symbol

    [7 lines not shown]
DeltaFile
+20-0mlir/test/Dialect/IRDL/invalid.irdl.mlir
+7-4mlir/lib/IR/SymbolTable.cpp
+27-42 files

LLVM/project 64d5a9cmlir/include/mlir/IR BuiltinAttributes.h BuiltinAttributes.td, mlir/lib/Bindings/Python IRAttributes.cpp

[mlir][IR] Rename + merge DenseElementsAttr

move to TD

rename
DeltaFile
+122-580mlir/include/mlir/IR/BuiltinAttributes.h
+263-41mlir/include/mlir/IR/BuiltinAttributes.td
+40-66mlir/lib/IR/BuiltinAttributes.cpp
+5-21mlir/lib/IR/AsmPrinter.cpp
+4-6mlir/lib/Bindings/Python/IRAttributes.cpp
+5-5mlir/lib/IR/BuiltinDialectBytecode.cpp
+439-71914 files not shown
+469-75020 files

LLVM/project cd22c55mlir/include/mlir/IR BuiltinAttributes.td BuiltinAttributes.h, mlir/lib/AsmParser AttributeParser.cpp

[mlir][IR] Separate `DenseStringElementsAttr` from `DenseElementsAttr`
DeltaFile
+97-17mlir/include/mlir/IR/BuiltinAttributes.td
+24-44mlir/lib/IR/BuiltinAttributes.cpp
+26-15mlir/lib/CAPI/IR/BuiltinAttributes.cpp
+24-13mlir/unittests/IR/AttributeTest.cpp
+24-10mlir/lib/AsmParser/AttributeParser.cpp
+0-25mlir/include/mlir/IR/BuiltinAttributes.h
+195-1245 files not shown
+224-13711 files

LLVM/project d68d47dllvm/test/CodeGen/ARM vselect_imax.ll, llvm/test/CodeGen/Thumb pr35836_2.ll pr35836.ll

[ARM] Explicitly mark certain instructions as having no side effects. (#182771)

This goes through some Arm instructions and adds hasSideEffects = 0 to
ones where it was not already implied. This should help with scheduling
and instruction movement.
DeltaFile
+46-40llvm/test/CodeGen/Thumb/pr35836_2.ll
+10-35llvm/test/CodeGen/Thumb/pr35836.ll
+22-22llvm/test/tools/llvm-mca/ARM/cortex-a57-neon-instructions.s
+21-21llvm/test/CodeGen/ARM/vselect_imax.ll
+13-13llvm/test/tools/llvm-mca/ARM/m55-int.s
+13-13llvm/test/tools/llvm-mca/ARM/m85-int.s
+125-14418 files not shown
+242-23524 files

LLVM/project d71adeamlir/include/mlir/IR BuiltinAttributes.td BuiltinAttributes.h, mlir/lib/AsmParser AttributeParser.cpp

[mlir][IR] Separate `DenseStringElementsAttr` from `DenseElementsAttr`
DeltaFile
+97-17mlir/include/mlir/IR/BuiltinAttributes.td
+24-44mlir/lib/IR/BuiltinAttributes.cpp
+26-15mlir/lib/CAPI/IR/BuiltinAttributes.cpp
+24-13mlir/unittests/IR/AttributeTest.cpp
+26-10mlir/lib/AsmParser/AttributeParser.cpp
+0-25mlir/include/mlir/IR/BuiltinAttributes.h
+197-1244 files not shown
+215-13610 files

LLVM/project d09aecelibcxx/test/std/algorithms/alg.nonmodifying/alg.fold left_folds.pass.cpp

improve fold_left test
DeltaFile
+5-4libcxx/test/std/algorithms/alg.nonmodifying/alg.fold/left_folds.pass.cpp
+5-41 files

LLVM/project 0f63db5llvm/lib/Transforms/IPO Attributor.cpp

Attributor: Avoid calling identifyDefaultAbstractAttributes on declarations (#182663)

Previously it would be called and inserted into a visited map,
but would never be used. This could possibly go one step further
and never add declarations to the SetVector of Functions. If I try
that, only one call graph printing test fails.
DeltaFile
+8-2llvm/lib/Transforms/IPO/Attributor.cpp
+8-21 files

LLVM/project 7affbbdlibcxx/test/std/algorithms/alg.nonmodifying/alg.fold ranges.fold_left_first.pass.cpp

improve check_lvalue_range test
DeltaFile
+4-4libcxx/test/std/algorithms/alg.nonmodifying/alg.fold/ranges.fold_left_first.pass.cpp
+4-41 files

LLVM/project 5768ee2clang/lib/Interpreter IncrementalParser.cpp, clang/test/Interpreter incremental-c-implicit-error.c incremental-c-implicit-undo.c

[clang-repl] fix CleanUpPTU by removing decl according to C implicitly FuncitonDecl. (#178648)

fix #171440

---------

Co-authored-by: Vassil Vassilev <v.g.vassilev at gmail.com>
DeltaFile
+25-0clang/lib/Interpreter/IncrementalParser.cpp
+18-0clang/test/Interpreter/incremental-c-implicit-error.c
+17-0clang/test/Interpreter/incremental-c-implicit-undo.c
+60-03 files

LLVM/project d74c6b1mlir/include/mlir/IR BuiltinTypeInterfaces.td BuiltinAttributes.td, mlir/lib/AsmParser AttributeParser.cpp

[mlir][IR] Generalize `DenseElementsAttr` to custom element types (#183920)

`DenseElementsAttr` supports only a hard-coded list of element types:
`int`, `index`, `float`, `complex`. This commit generalizes the
`DenseElementsAttr` infrastructure: it now supports arbitrary element
types, as long as they implement the new `DenseElementTypeInterface`.

The `DenseElementTypeInterface` has the following helper functions:
- `getDenseElementBitSize`: Query the size of an element in bits. (When
storing an element in memory, each element is padded to a full byte.
This is an existing limitation of the `DenseElementsAttr`; with an
exception for `i1`.)
- `convertToAttribute`: Attribute factory / deserializer. Converts bytes
into an MLIR attribute. The attribute provides the assembly format /
printer for a single element.
- `convertFromAttribute`: Serializer. Converts an MLIR attribute into
bytes.

Note: `convertToAttribute` / `convertFromAttribute` are mainly for

    [26 lines not shown]
DeltaFile
+124-1mlir/lib/AsmParser/AttributeParser.cpp
+25-92mlir/lib/IR/BuiltinAttributes.cpp
+87-0mlir/lib/IR/BuiltinTypes.cpp
+83-0mlir/test/IR/dense-elements-type-interface.mlir
+74-1mlir/include/mlir/IR/BuiltinTypeInterfaces.td
+32-13mlir/include/mlir/IR/BuiltinAttributes.td
+425-1079 files not shown
+597-12415 files

LLVM/project 9ffa08fmlir/test/mlir-tblgen op-properties-predicates.td

[mlir][NFC] Fix typo in property predicate tests (#183987)

DeltaFile
+1-1mlir/test/mlir-tblgen/op-properties-predicates.td
+1-11 files

LLVM/project b872179llvm/test/CodeGen/AArch64 div-i256.ll bitcnt-i256.ll

[AArch64][test] Add i256 codegen baseline tests (#183587)

## Summary

Add baseline codegen tests for i256 operations on AArch64:
- `bitcnt-i256.ll`: ctpop, ctlz, cttz, Hamming distance, parity (3 RUN
lines: +neon, +sve, +cssc)
- `cmp-i256.ll`: 8 icmp variants (slt/sgt/sle/sge/ult/ugt/ule/uge) +
select
- `div-i256.ll`: udiv, sdiv, urem, srem, power-of-2, and constant
division
- `mul-i256.ll`: multiply, multiply-by-constant, add, sub, and, or, xor
- `shift-i256.ll`: variable shl/lshr/ashr, constant shifts, narrow (i32)
amounts

These are test-only NFC pre-patches for `__int256` builtin type support
(#182733). i256 is already a valid LLVM IR type; these tests capture the
current baseline codegen. The main PR will update the CHECK lines to
show codegen improvements (e.g., direct libcall routing for

    [17 lines not shown]
DeltaFile
+1,118-0llvm/test/CodeGen/AArch64/div-i256.ll
+261-0llvm/test/CodeGen/AArch64/bitcnt-i256.ll
+157-0llvm/test/CodeGen/AArch64/shift-i256.ll
+133-0llvm/test/CodeGen/AArch64/cmp-i256.ll
+124-0llvm/test/CodeGen/AArch64/mul-i256.ll
+1,793-05 files

LLVM/project d412b04compiler-rt/lib/ubsan ubsan_diag.h

[UBSan] Wrap Location variants in anonymous union (#168866)

(Addresses the FIXME)
DeltaFile
+5-4compiler-rt/lib/ubsan/ubsan_diag.h
+5-41 files

LLVM/project 10b1b78compiler-rt/test/asan/TestCases shadowed-stack-serialization.cpp fakeframe-right-redzone.cpp

[ASan] Mark recent integration tests as accordingly for MSVC (#135889)

Both of these tests will cause an unsuccessful pass when using msvc.

`shadowed-stack-serialization.cpp` - XFAIL due to the metadata not being
generated.
`fakeframe-right-redzone.cpp` - UNSUPPORTED due to the optimization
limitations of the msvc compiler.

---------

Co-authored-by: MacGyver Codilla <mcodilla at microsoft.com>
DeltaFile
+2-0compiler-rt/test/asan/TestCases/shadowed-stack-serialization.cpp
+1-0compiler-rt/test/asan/TestCases/fakeframe-right-redzone.cpp
+3-02 files

LLVM/project b2ce908compiler-rt CMakeLists.txt, compiler-rt/lib/gwp_asan CMakeLists.txt

[compiler-rt][CMake] Fix build when specifying --stdlib= (with 2 dashes) (#136111)

You can pass the stdlib argument either as -stdlib and --stdlib - the
previous regex did not account for this however - which caused the build
to fail, as a --stdlib argument would be replaced with a single dash,
causing clang to assume reading from stdin and the build to fail:

clang++: error: -E or -x required when input is from standard input
clang++: error: cannot specify -o when generating multiple output files

The files
[libcxxabi/CMakeLists.txt](https://github.com/llvm/llvm-project/blob/bf6986f9f09f79da38006a83c339226c429bb686/libcxxabi/CMakeLists.txt#L261)
and
[libunwind/CMakeLists.txt](https://github.com/llvm/llvm-project/blob/bf6986f9f09f79da38006a83c339226c429bb686/libunwind/CMakeLists.txt#L257)
account for this by removing --stdlib first.

Co-authored-by: Vitaly Buka <vitalybuka at google.com>
DeltaFile
+2-2compiler-rt/CMakeLists.txt
+1-1compiler-rt/lib/gwp_asan/CMakeLists.txt
+1-1compiler-rt/lib/msan/tests/CMakeLists.txt
+1-1compiler-rt/lib/profile/CMakeLists.txt
+1-1compiler-rt/lib/scudo/standalone/CMakeLists.txt
+6-65 files

LLVM/project bf4ed79clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers vector initializer_list, clang-tools-extra/test/clang-tidy/checkers/modernize return-braced-init-list.cpp use-emplace-ignore-implicit-constructors.cpp

[clang-tidy][NFC] Use singe mock vector header in tests (#183963)

In new tests we should encourage to use these "source of truth" files if
possible.
DeltaFile
+91-0clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers/vector
+3-43clang-tools-extra/test/clang-tidy/checkers/performance/inefficient-vector-operation.cpp
+2-42clang-tools-extra/test/clang-tidy/checkers/modernize/return-braced-init-list.cpp
+34-0clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers/initializer_list
+0-32clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/smart-ptr/initializer_list.h
+3-26clang-tools-extra/test/clang-tidy/checkers/modernize/use-emplace-ignore-implicit-constructors.cpp
+133-14324 files not shown
+196-34930 files

LLVM/project a5f5d4bclang/include/clang/Basic BuiltinsAMDGPU.td BuiltinsAMDGPUDocs.td

[AMDGPU][Clang][Doc] Add documentation for WMMA builtins
DeltaFile
+268-67clang/include/clang/Basic/BuiltinsAMDGPU.td
+326-0clang/include/clang/Basic/BuiltinsAMDGPUDocs.td
+594-672 files

LLVM/project c35a726clang/test/TableGen builtin-docs.td, clang/utils/TableGen ClangBuiltinsEmitter.cpp

[Clang][TableGen] Sort undocumented builtins after documented ones in generated docs (#183938)

The builtin documentation emitter previously sorted all categories
purely alphabetically, which placed the "Undocumented" section before
categories like "WMMA" in the generated RST. This made the output
confusing since stub entries appeared before real documentation.

Push the "Undocumented" category to the end of the output so that all
documented categories appear first, regardless of their names.
DeltaFile
+20-10clang/test/TableGen/builtin-docs.td
+10-3clang/utils/TableGen/ClangBuiltinsEmitter.cpp
+30-132 files

LLVM/project da8d181libc/shared/math log1p.h log2.h

[libc][math] Cleanup shared/math (#183971)

DeltaFile
+4-3libc/shared/math/log1p.h
+4-3libc/shared/math/log2.h
+4-3libc/shared/math/log10.h
+4-3libc/shared/math/log.h
+1-3libc/shared/math/hypotf16.h
+2-1libc/shared/math/tanpif16.h
+19-1698 files not shown
+123-44104 files

LLVM/project 4673cecmlir/include/mlir-c Rewrite.h, mlir/lib/Bindings/Python Rewrite.cpp

[MLIR][Python] Add support of `convert_region_types` and the bf integration test (#183664)

This PR adds the `convert_region_types` API to
`ConversionPatternRewriter` and introduces a new integration test,
`bf.py`, which demonstrates how to combine a Python-defined dialect, the
dialect conversion API, the pass manager, and the execution engine to
build a pure-Python JIT compilation pipeline.
DeltaFile
+284-0mlir/test/python/integration/dialects/bf.py
+12-3mlir/lib/Bindings/Python/Rewrite.cpp
+7-0mlir/lib/CAPI/Transforms/Rewrite.cpp
+6-0mlir/include/mlir-c/Rewrite.h
+309-34 files

LLVM/project 910988bllvm/lib/Target/AMDGPU/Utils AMDGPUBaseInfo.h, llvm/test/CodeGen/AMDGPU amdpal-chain-metadata.ll

[AMDGPU] Stop treating AMDGPU_CS_ChainPreserve as a module entry funtion (#183718)

Starting with AMD PAL metadata v3.6, pipeline ELFs cannot have a
`.shader_functions` section. However, dynamic VGPR retry helpers use
the `AMDGPU_CS_ChainPreserve` calling convention, which LLVM previously
treated as a module entrypoint, incorrectly emitting this metadata.
DeltaFile
+6-1llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
+7-0llvm/test/CodeGen/AMDGPU/amdpal-chain-metadata.ll
+13-12 files

LLVM/project c2a4e3fclang/lib/Sema SemaExpr.cpp, clang/test/Sema sugar-common-types.c

[clang] fix common type calculation for l-values of 'void' type

Fixes #111300
DeltaFile
+5-1clang/test/Sema/sugar-common-types.c
+2-2clang/lib/Sema/SemaExpr.cpp
+7-32 files

LLVM/project 1d5726elibc/shared/math log.h log10.h

[libc][math] Cleanup shared/math
DeltaFile
+4-3libc/shared/math/log.h
+4-3libc/shared/math/log10.h
+4-3libc/shared/math/log1p.h
+4-3libc/shared/math/log2.h
+1-3libc/shared/math/hypotf16.h
+2-1libc/shared/math/asinf16.h
+19-1698 files not shown
+123-44104 files

LLVM/project 88ffa46clang/include/clang/Basic BuiltinsAMDGPU.td BuiltinsAMDGPUDocs.td

[AMDGPU][Clang][Doc] Add documentation for WMMA builtins
DeltaFile
+268-67clang/include/clang/Basic/BuiltinsAMDGPU.td
+326-0clang/include/clang/Basic/BuiltinsAMDGPUDocs.td
+594-672 files

LLVM/project 0b423a5mlir/test/Dialect/GPU module-to-binary-invalid-format.mlir

[MLIR] Fix invalid test after improving the error message (NFC)
DeltaFile
+1-1mlir/test/Dialect/GPU/module-to-binary-invalid-format.mlir
+1-11 files