This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Remove successor operands from the Operation class
ClosedPublic

Authored by rriddle on Feb 27 2020, 4:45 PM.

Details

Summary

This revision removes all of the functionality related to successor operands on the core Operation class. This greatly simplifies a lot of handling of operands, as well as successors. For example, DialectConversion no longer needs a special "matchAndRewrite" for branching terminator operations.(Note, the existing method was also broken for operations with variadic successors!!)

This also enables terminator operations to define their own relationships with successor arguments, instead of the hardcoded "pass-through" behavior that exists today.

Depends On D75317

Diff Detail

Event Timeline

rriddle created this revision.Feb 27 2020, 4:45 PM
mravishankar resigned from this revision.Mar 4 2020, 10:34 AM
jpienaar accepted this revision.Mar 4 2020, 3:44 PM

Looks good thanks!

mlir/lib/Transforms/Utils/RegionUtils.cpp
286

Super nit: ++argI

This revision is now accepted and ready to land.Mar 4 2020, 3:44 PM
rriddle updated this revision to Diff 248534.Mar 5 2020, 10:13 AM

Resolve comments

This revision was automatically updated to reflect the committed changes.