[mlir] make transform.loop.outline also return the call handle

Outlining is particularly interesting when the outlined function is
replaced with something else, e.g., a microkernel. It is good to have a
handle to the call in this case.

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D149849
This commit is contained in:
Alex Zinenko
2023-05-04 14:13:06 +00:00
parent 3b6bc87520
commit d906426944
6 changed files with 36 additions and 24 deletions

View File

@@ -33,7 +33,7 @@ def loopOutline():
sequence = transform.SequenceOp(transform.FailurePropagationMode.PROPAGATE,
[], transform.OperationType.get("scf.for"))
with InsertionPoint(sequence.body):
loop.LoopOutlineOp(pdl.OperationType.get(), sequence.bodyTarget, func_name="foo")
loop.LoopOutlineOp(transform.AnyOpType.get(), transform.AnyOpType.get(), sequence.bodyTarget, func_name="foo")
transform.YieldOp()
# CHECK-LABEL: TEST: loopOutline
# CHECK: = transform.loop.outline %