This is an archive of the discontinued LLVM Phabricator instance.

[mlir] relax transform dialect multi-handle restriction
ClosedPublic

Authored by ftynse on Sep 30 2022, 7:20 AM.

Details

Summary

Relax the restriction in the transform dialect interpreter utilities
that expected a payload IR op to be assocaited with at most one
transform IR handle value. This was useful during the initial
bootstrapping to avoid use-after-free error equivalents when a payload
IR op could be erased through one of the handles associated with it and
then accessed through another. It was, however, possible to erase an
ancestor of the payload IR operation in question. The expensive-checks
mode of interpretation is able to detect both cases and has proven
sufficiently robust in debugging use-after-free errors.

Diff Detail

Event Timeline

ftynse created this revision.Sep 30 2022, 7:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 30 2022, 7:20 AM
ftynse requested review of this revision.Sep 30 2022, 7:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 30 2022, 7:20 AM
springerm accepted this revision.Oct 4 2022, 12:53 AM
springerm added inline comments.
mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.cpp
174–178

nit: You could wrap this in #ifndef NDEBUG instead of (void)handles

This revision is now accepted and ready to land.Oct 4 2022, 12:53 AM
ftynse updated this revision to Diff 464965.Oct 4 2022, 4:57 AM
ftynse marked an inline comment as done.

Address review and fix Bazel.

This revision was landed with ongoing or failed builds.Oct 4 2022, 4:57 AM
This revision was automatically updated to reflect the committed changes.