[all-commits] [llvm/llvm-project] fe5370: [mlir] Store segment sizes in std::array

Tobias Gysi via All-commits all-commits at lists.llvm.org
Thu Aug 3 01:31:43 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fe5370dd50e48f827aaee9f5fa80e751b1759a25
      https://github.com/llvm/llvm-project/commit/fe5370dd50e48f827aaee9f5fa80e751b1759a25
  Author: Tobias Gysi <tobias.gysi at nextsilicon.com>
  Date:   2023-08-03 (Thu, 03 Aug 2023)

  Changed paths:
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
    M mlir/tools/mlir-tblgen/OpFormatGen.cpp
    M mlir/unittests/IR/AdaptorTest.cpp

  Log Message:
  -----------
  [mlir] Store segment sizes in std::array

This revision uses std::array instead of normal c arrays to store the
operand and result segment sizes. This is a follow up to
https://reviews.llvm.org/D155919, which converted the operand and result
segment sizes to properties. Its use of c arrays triggered warnings in
downstream projects due to the direct comparison of c arrays. This
revision fixes the warnings using std::arrays that implement a
proper comparison operator, which compares the array elements rather
that the array pointers.

Note: it seems the comparison operator is effectively dead code for now.
It still seems useful to fix the warning and ensure the comparison works
as expected assume someone starts using it at some point in time.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D156888




More information about the All-commits mailing list