This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Make store to load fwd condition less conservative
ClosedPublic

Authored by bondhugula on Jun 11 2021, 10:15 PM.

Details

Summary

Make store to load fwd condition for -memref-dataflow-opt less
conservative. Post dominance info is not really needed. Add additional
check for common cases.

Diff Detail

Event Timeline

bondhugula created this revision.Jun 11 2021, 10:15 PM
bondhugula requested review of this revision.Jun 11 2021, 10:15 PM

Fix stale comments.

Looks great. Minor comments -

mlir/lib/Transforms/MemRefDataFlowOpt.cpp
44–45 ↗(On Diff #351634)

Nit: op's => ops (unrelated to this change)

Should the comment change to
does not dominate all store => does not dominate any store ?

bondhugula marked an inline comment as done.

Fix comments.

Make the test case simpler/direct.

Looks great! Minor comments:

mlir/lib/Transforms/MemRefDataFlowOpt.cpp
47 ↗(On Diff #351651)

dominate any store op

267 ↗(On Diff #351651)

dominate any op in depSrcStores

Looks good, saves PostDominanceInfo calculation.
Minor: comments at some places need to change to does not dominate any ... at a couple of places as pointed out by @ayzhuang .

This revision is now accepted and ready to land.Jun 16 2021, 7:59 AM
bondhugula marked 2 inline comments as done.

Address reviewer comments. Rebase on tip.

Thank you for the reviews!

This revision was landed with ongoing or failed builds.Jun 16 2021, 12:57 PM
This revision was automatically updated to reflect the committed changes.