[mlir][sparse] Updating the `Merger::{exp,lat,set}` methods to return const
authorwren romano <2998727+wrengr@users.noreply.github.com>
Fri, 24 Mar 2023 21:17:11 +0000 (14:17 -0700)
committerwren romano <2998727+wrengr@users.noreply.github.com>
Fri, 24 Mar 2023 21:48:33 +0000 (14:48 -0700)
commit7c7c10a0233fc8060aab4082094a189803cbe5ac
treed945e47f3f2f4b299ac973c4070cac53ff71d714
parent23349d83a98f23e67ff0321dad7c378b117ce6aa
[mlir][sparse] Updating the `Merger::{exp,lat,set}` methods to return const

This helps the `Merger` maintain invariants, as well as clarifying the immutability of the underlying objects (with the one exception of `TensorExp::val`).

Depends On: D146559

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D146083
mlir/include/mlir/Dialect/SparseTensor/Utils/Merger.h
mlir/lib/Dialect/SparseTensor/Transforms/CodegenEnv.cpp
mlir/lib/Dialect/SparseTensor/Transforms/CodegenEnv.h
mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp