Skip to content
Commit 1dfb9a64 authored by wren romano's avatar wren romano
Browse files

[mlir][sparse] LICM for SparseTensorReader::readCOO

This commit performs two related changes.  First we adjust `readCOOValue` to take the `IsPattern` bool as a template parameter rather than a function argument.  Second we factor `readCOOLoop` out from `readCOO`, and template it on `IsPattern` and `IsSymmetric`.  Together this moves all the assertions and header-dependent conditionals out of the main for-loop of `readCOO`.  The only remaining conditional is in the `IsSymmetric=true` variant: checking whether the element is on the diagonal or not (which cannot be lifted out of the loop).

Depends On D138363

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D138365
parent 0d588347
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment