This is an archive of the discontinued LLVM Phabricator instance.

[mlir][transform] Add C++ builder to SequenceOp
ClosedPublic

Authored by springerm on Nov 9 2022, 6:10 AM.

Details

Summary

This change adds a builder that populates the body of a SequenceOp. This is useful for constructing SequenceOps from C++.

Diff Detail

Event Timeline

springerm created this revision.Nov 9 2022, 6:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 9 2022, 6:10 AM
springerm requested review of this revision.Nov 9 2022, 6:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 9 2022, 6:10 AM
ftynse added inline comments.Nov 16 2022, 12:40 PM
mlir/lib/Dialect/Transform/IR/TransformOps.cpp
774

The "core" transform dialect moved away from using PDL types. We should use the same type as root operand.

775

Use the builder to construct everything. If this is called from a pattern, chaos will ensue.

springerm updated this revision to Diff 476110.Nov 17 2022, 6:48 AM

address comments

springerm marked 2 inline comments as done.Nov 17 2022, 6:48 AM
springerm added inline comments.
mlir/lib/Dialect/Transform/IR/TransformOps.cpp
774

What if no root was provided?

ftynse added inline comments.Nov 17 2022, 6:50 AM
mlir/lib/Dialect/Transform/IR/TransformOps.cpp
774

Then the user should provide the type.

springerm updated this revision to Diff 476113.Nov 17 2022, 6:55 AM
springerm marked an inline comment as done.

address comments

springerm marked an inline comment as done.Nov 17 2022, 6:56 AM
ftynse accepted this revision.Nov 17 2022, 6:56 AM
This revision is now accepted and ready to land.Nov 17 2022, 6:56 AM
This revision was landed with ongoing or failed builds.Nov 17 2022, 7:02 AM
This revision was automatically updated to reflect the committed changes.