This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Add structural type conversions for SCF dialect.
ClosedPublic

Authored by silvas on Oct 19 2020, 6:38 PM.

Details

Summary

NOTE: This is an updated version of D89526. I finally figured out how to do the proper source/target type materializations to eliminate the need for a single mega-conversion pass, even for structural conversions :)

A "structural" type conversion is one where the underlying ops are
completely agnostic to the actual types involved and simply need to update
their types. An example of this is scf.if -- the scf.if op and the
corresponding scf.yield ops need to update their types accordingly to the
TypeConverter, but otherwise don't care what type conversions are happening.

To test the structural type conversions, it is convenient to define a
bufferize pass for a dialect, which exercises them nicely.

Diff Detail

Event Timeline

silvas created this revision.Oct 19 2020, 6:38 PM
silvas requested review of this revision.Oct 19 2020, 6:38 PM
silvas edited the summary of this revision. (Show Details)Oct 19 2020, 6:43 PM
silvas updated this revision to Diff 299242.Oct 19 2020, 7:09 PM

small fixes

herhut accepted this revision.Oct 21 2020, 7:47 AM
This revision is now accepted and ready to land.Oct 21 2020, 7:47 AM
This revision was landed with ongoing or failed builds.Oct 21 2020, 11:59 AM
This revision was automatically updated to reflect the committed changes.