This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] Factoring out type-based function-name suffixes
ClosedPublic

Authored by wrengr on Dec 2 2021, 4:57 PM.

Details

Summary

Depends On D115010

This changes a couple of places that used to return failure(); to now use llvm_unreachable() instead. However, Transforms/Sparsification.cpp should be doing the necessary type checks to ensure that those cases are in fact unreachable.

Diff Detail

Event Timeline

wrengr created this revision.Dec 2 2021, 4:57 PM
wrengr requested review of this revision.Dec 2 2021, 4:57 PM
wrengr edited the summary of this revision. (Show Details)Dec 2 2021, 5:04 PM

It is okay to make all cases unreachable instead of failure provided that we check up front for the right types in the sparsification pass, which I was planning to do anyway to limit the possibilities of primary storage type up front
(note that later we may want to add e.g. complex and some of the lower fp types)

wrengr added a comment.Dec 3 2021, 4:56 PM

It is okay to make all cases unreachable instead of failure provided that we check up front for the right types in the sparsification pass, which I was planning to do anyway to limit the possibilities of primary storage type up front
(note that later we may want to add e.g. complex and some of the lower fp types)

Cool cool. I just wanted to be sure, since this differential changes some prior behavior (not that any of our invalidity tests seem to care); and cuz I want to maximize the helpfulness of error messages for users.

wrengr updated this revision to Diff 391785.Dec 3 2021, 5:07 PM

Resolved all my fixme notes. Also removed a spurious code cleanup that's already handled by D115004.

wrengr edited the summary of this revision. (Show Details)Dec 3 2021, 5:09 PM
aartbik accepted this revision.Dec 6 2021, 1:50 PM

Good to go when parent of this chain goes in.

This revision is now accepted and ready to land.Dec 6 2021, 1:50 PM
wrengr updated this revision to Diff 392523.Dec 7 2021, 1:44 PM

rebasing to updated D115008

wrengr updated this revision to Diff 395536.Dec 20 2021, 3:49 PM

Rebasing to updated D115008