This is an archive of the discontinued LLVM Phabricator instance.

[mlir] add a dynamic user-after-parent-freed transform dialect check
ClosedPublic

Authored by ftynse on Jun 10 2022, 2:58 AM.

Details

Summary

In the transform dialect, a transform IR handle may be pointing to a payload IR
operation that is an ancestor of another payload IR operation pointed to by
another handle. If such a "parent" handle is consumed by a transformation, this
indicates that the associated operation is likely rewritten, which in turn
means that the "child" handle may now be associated with a dangling pointer or
a pointer to a different operation than originally. Add a handle invalidation
mechanism to guard against such situations by reporting errors at runtime.

Diff Detail

Event Timeline

ftynse created this revision.Jun 10 2022, 2:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 10 2022, 2:58 AM
ftynse requested review of this revision.Jun 10 2022, 2:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 10 2022, 2:58 AM
springerm accepted this revision.Jun 10 2022, 3:47 AM
springerm added inline comments.
mlir/include/mlir/Dialect/Transform/IR/TransformDialect.td
159

transformation

177

transform

179

transformation

This revision is now accepted and ready to land.Jun 10 2022, 3:47 AM
This revision was landed with ongoing or failed builds.Jun 10 2022, 4:05 AM
This revision was automatically updated to reflect the committed changes.
ftynse marked 3 inline comments as done.