Skip to content
Commit a7026288 authored by Alex Zinenko's avatar Alex Zinenko
Browse files

[mlir] add support for transform dialect value handles

Introduce support for the third kind of values in the transform dialect:
value handles. Similarly to operation handles, value handles are
pointing to a set of values in the payload IR. This enables
transformation to be targeted at specific values, such as individual
results of a multi-result payload operation without indirecting through
the producing op or block arguments that previously could not be easily
addressed. This is expected to support a broad class of memory-oriented
transformations such as selective bufferization, buffer assignment, and
memory transfer management.

Value handles are functionally similar to operation handles and require
similar implementation logic. The most important change concerns the
handle invalidation mechanism where operation and value handles can
affect each other.

This patch includes two cleanups that make it easier to introduce value
handles:

  - `RaggedArray` structure that encapsulates the SmallVector of
    ArrayRef backed by flat SmallVector logic, frequently used in the
    transform interfaces implementation;

  - rewrite the tests that associated payload handles with an integer
    value `reinterpret_cast`ed as a pointer, which were a frequent
    source of confusion and crashes when adding more debugging
    facilities that can inspect the payload.

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D143385
parent ed66b81f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment