[all-commits] [llvm/llvm-project] 329f2f: [mlir][sparse] refactoring SparseTensorUtils: (3 o...

wren romano via All-commits all-commits at lists.llvm.org
Thu Sep 29 14:44:27 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 329f2f103af14b675daf9c3969c117dcfb785a8a
      https://github.com/llvm/llvm-project/commit/329f2f103af14b675daf9c3969c117dcfb785a8a
  Author: wren romano <2998727+wrengr at users.noreply.github.com>
  Date:   2022-09-29 (Thu, 29 Sep 2022)

  Changed paths:
    M mlir/include/mlir/ExecutionEngine/SparseTensor/COO.h
    M mlir/include/mlir/ExecutionEngine/SparseTensor/File.h
    M mlir/include/mlir/ExecutionEngine/SparseTensor/Storage.h
    M mlir/lib/ExecutionEngine/SparseTensor/File.cpp
    M mlir/lib/ExecutionEngine/SparseTensor/NNZ.cpp
    M mlir/lib/ExecutionEngine/SparseTensor/Storage.cpp
    M mlir/lib/ExecutionEngine/SparseTensorUtils.cpp

  Log Message:
  -----------
  [mlir][sparse] refactoring SparseTensorUtils: (3 of 4) code-cleanup

Previously, the SparseTensorUtils.cpp library contained a C++ core implementation, but hid it in an anonymous namespace and only exposed a C-API for accessing it. Now we are factoring out that C++ core into a standalone C++ library so that it can be used directly by downstream clients (per request of one such client). This refactoring has been decomposed into a stack of differentials in order to simplify the code review process, however the full stack of changes should be considered together.

* D133462: Part 1: split one file into several
* D133830: Part 2: Reorder chunks within files
* (this): Part 3: General code cleanup
* D133833: Part 4: Update documentation

This part performs some general code cleanup including:
* making more things `const`, especially for the targets of pointers
* using preincrement wherever possible ([[ https://llvm.org/docs/CodingStandards.html#prefer-preincrement | per LLVM style guide ]])
* adding messages to most `assert` statments.
* moving argument casting from the core function/method definitions to the CPP wrappers

Depends On D133830

Reviewed By: aartbik

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




More information about the All-commits mailing list