Page MenuHomePhabricator

[mlir] Add structural type conversions for SCF dialect.

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



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

Unit TestsFailed

170 mswindows > LLVM.Other::statistic.ll
Script: -- : 'RUN: at line 1'; c:\ws\w16c2-1\llvm-project\premerge-checks\build\bin\opt.exe < C:\ws\w16c2-1\llvm-project\premerge-checks\llvm\test\Other\statistic.ll -o /dev/null -instsimplify -stats -stats-json 2>&1 | c:\ws\w16c2-1\llvm-project\premerge-checks\build\bin\filecheck.exe C:\ws\w16c2-1\llvm-project\premerge-checks\llvm\test\Other\statistic.ll --check-prefix=JSON

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.