This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Do not use pass labels in unrolled ProgressiveVectorToSCF
ClosedPublic

Authored by springerm on May 10 2021, 6:38 PM.

Details

Summary

Do not rely on pass labels to detect if the pattern was already applied in the past (which allows for more some extra optimizations to avoid extra InsertOps and ExtractOps). Instead, check if these optimizations can be applied on-the-fly.

This also fixes a bug, where vector.insert and vector.extract ops sometimes disappeared in the middle of the pass because they get folded away, but the next application of the pattern expected them to be there.

Diff Detail

Event Timeline

springerm created this revision.May 10 2021, 6:38 PM
springerm requested review of this revision.May 10 2021, 6:38 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 10 2021, 6:38 PM
nicolasvasilache requested changes to this revision.May 13 2021, 4:46 AM

As discussed offline, it should be easy and more powerful to drop the reliance on the attribute altogether and perform a minimal, conservative, 1-hop use-def analysis to get the information we want.
Putting a blocker to resolve this.

This revision now requires changes to proceed.May 13 2021, 4:46 AM
springerm updated this revision to Diff 345108.May 13 2021, 5:58 AM

rewrite commit as discussed

nicolasvasilache accepted this revision.May 13 2021, 6:04 AM

Great, thanks!

This revision is now accepted and ready to land.May 13 2021, 6:04 AM

Please update the commit message though

springerm retitled this revision from [mlir] Fix disappearing vector.insert/extract ops in ProgressiveVectorToSCF to [mlir] Do not use pass labels in unrolled ProgressiveVectorToSCF.May 13 2021, 6:07 AM
springerm edited the summary of this revision. (Show Details)
This revision was landed with ongoing or failed builds.May 13 2021, 6:16 AM
This revision was automatically updated to reflect the committed changes.