This is an archive of the discontinued LLVM Phabricator instance.

[mlir] harden expensive-checks mode against ops with repeated operands
ClosedPublic

Authored by ftynse on May 26 2023, 8:58 AM.

Details

Summary

Transform operations may indicate that they may accept and consume
several handles pointing to the same or nested payload entities. The
initial implementation of the expensive-checks mode was simply ignoring
such cases as consuming the second handle would fail the check after the
first handle invalidated it by consuming the same payload. Additional
checks had been added since then, which could now trigger assertions in
the expensive-checks module itself (instead of or in addition to
use-after-free assertions down the road), specifically because the
payload associations for invalidated handles is removed from the state
to enable other kinds of checking.

Rework the handling of transform operations with repeated handles so
use-after-consume is still reported properly if the consumption happened
by a preceding operation, as opposed to the a preceding operand of the
same operation that is still (corretly) ignored if the op requests that.

Depends on: D151560

Diff Detail

Event Timeline

ftynse created this revision.May 26 2023, 8:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 26 2023, 8:58 AM
ftynse requested review of this revision.May 26 2023, 8:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 26 2023, 8:58 AM
springerm accepted this revision.May 28 2023, 12:21 PM
This revision is now accepted and ready to land.May 28 2023, 12:21 PM
This revision was landed with ongoing or failed builds.May 30 2023, 12:53 AM
This revision was automatically updated to reflect the committed changes.