This is an archive of the discontinued LLVM Phabricator instance.

[mlir] more side effect verification in transform dialect
ClosedPublic

Authored by ftynse on Jan 23 2023, 7:01 AM.

Details

Summary

Add a verifier checking that if a transform operation consumes a handle
(which is associated with a payload operation being erased or
recreated), it also indicates modification of the payload IR. This
hasn't been consistent in the past because of the "no-aliasing"
assumption where we couldn't have had more than one handle to an
operation, requiring some handle-manipulation operations, such as
transform.merge_handles to consume their operands. That assumption has
been liften and it is no longer necessary for these operations to
consume handles and thus make the life harder for the clients.

Additionally, remove TransformEffects.td that uses the ODS mechanism for
indicating side effects that works only for operands and results. It
was being used incorrectly to also indicate effects on the payload IR,
not assocaited with any IR value, and lacked the consume/produce
semantics available via helpers in C++.

Diff Detail

Event Timeline

ftynse created this revision.Jan 23 2023, 7:01 AM
ftynse requested review of this revision.Jan 23 2023, 7:01 AM
Herald added a reviewer: dcaballe. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
nicolasvasilache accepted this revision.Feb 3 2023, 7:17 AM

Very nice, thanks much for this QoL cleanup!

This revision is now accepted and ready to land.Feb 3 2023, 7:17 AM
This revision was automatically updated to reflect the committed changes.
mlir/include/mlir/Dialect/SCF/TransformOps/SCFTransformOps.td