Page MenuHomePhabricator

[mlir] Keep track of region signature conversions as argument replacements
ClosedPublic

Authored by ftynse on Jan 29 2021, 10:41 AM.

Details

Summary

In dialect conversion, signature conversions essentially perform block argument
replacement and are added to the general value remapping. However, the replaced
values were not tracked, so if a signature conversion was rolled back, the
construction of operand lists for the following patterns could have obtained
block arguments from the mapping and give them to the pattern leading to
use-after-free. Keep track of signature conversions similarly to normal block
argument replacement, and erase such replacements from the general mapping when
the conversion is rolled back.

Diff Detail

Event Timeline

ftynse created this revision.Jan 29 2021, 10:41 AM
ftynse requested review of this revision.Jan 29 2021, 10:41 AM
rriddle accepted this revision.Feb 1 2021, 11:33 AM

LGTM, thanks!

This revision is now accepted and ready to land.Feb 1 2021, 11:33 AM