Page MenuHomePhabricator

[MLIR] Eliminate unnecessary affine stores
ClosedPublic

Authored by wsmoses on Jun 28 2021, 10:31 AM.

Details

Summary

Deduce circumstances where an affine store could not possibly be read by an operation (such as an affine load), and if so, eliminate the store

Diff Detail

Event Timeline

wsmoses created this revision.Jun 28 2021, 10:31 AM
wsmoses requested review of this revision.Jun 28 2021, 10:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 28 2021, 10:31 AM
wsmoses updated this revision to Diff 354948.Jun 28 2021, 10:36 AM

Fix rebase errors

Typo in the description: Deduce circumstances where an affine load ... ; this last word was meant to be store I think. Looks good to me in general!

mlir/lib/Dialect/Affine/Transforms/AffineScalarReplacement.cpp
72

The name is slightly misleading, as this isn't "removing" anything, what about findUnusedStore instead?

274
wsmoses edited the summary of this revision. (Show Details)Jun 28 2021, 6:54 PM
wsmoses updated this revision to Diff 355099.Jun 28 2021, 8:11 PM

Address comments

ftynse accepted this revision.Jun 30 2021, 12:25 AM
ftynse added inline comments.
mlir/lib/Dialect/Affine/Transforms/AffineScalarReplacement.cpp
267
351–353

Rebase gone wrong?

This revision is now accepted and ready to land.Jun 30 2021, 12:25 AM
This revision was automatically updated to reflect the committed changes.