[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
Loading
Please sign in to comment