[all-commits] [llvm/llvm-project] c6964b: [mlir][IR] `DenseElementsAttr`: Remove `i1` dense ...

Matthias Springer via All-commits all-commits at lists.llvm.org
Wed Feb 11 07:56:30 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c6964b1b4dcda0f19f91cef186314f4cc2e0feb8
      https://github.com/llvm/llvm-project/commit/c6964b1b4dcda0f19f91cef186314f4cc2e0feb8
  Author: Matthias Springer <me at m-sp.org>
  Date:   2026-02-11 (Wed, 11 Feb 2026)

  Changed paths:
    M mlir/include/mlir/Bindings/Python/IRAttributes.h
    M mlir/include/mlir/IR/BuiltinAttributes.h
    M mlir/lib/Bindings/Python/IRAttributes.cpp
    M mlir/lib/IR/AttributeDetail.h
    M mlir/lib/IR/BuiltinAttributes.cpp
    R mlir/test/IR/attribute-roundtrip.mlir
    M mlir/test/IR/parse-literal.mlir
    M mlir/test/python/ir/array_attributes.py
    M mlir/unittests/IR/AttributeTest.cpp

  Log Message:
  -----------
  [mlir][IR] `DenseElementsAttr`: Remove `i1` dense packing special case (#180397)

`DenseElementsAttr` stores elements in a `ArrayRef<char>` buffer, where
each element is padded to a full byte. Before this commit, there used to
be a special storage format for `i1` elements: they used to be densely
packed, i.e., 1 bit per element. This commit removes the dense packing
special case for `i1`.

This commit removes complexity from `DenseElementsAttr`. If dense
packing is needed in the future it could be implemented in a general way
that works for all element types (based on #179122).

Discussion:
https://discourse.llvm.org/t/denseelementsattr-i1-element-type/62525



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list