This is an archive of the discontinued LLVM Phabricator instance.

[mlir][EDSC] Allow conditionBuilder to capture the IfOp
ClosedPublic

Authored by nicolasvasilache on Jul 17 2020, 6:56 AM.

Details

Summary

When the IfOp returns values, it can easily be obtained from one of the Values.
However, when no values are returned, the information is lost.
This revision lets the caller specify a capture IfOp* to return the produced
IfOp.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJul 17 2020, 6:56 AM
ftynse accepted this revision.Jul 17 2020, 7:03 AM

What's the use case?

mlir/lib/Dialect/SCF/EDSC/Builders.cpp
84

Nit: I used auto here since the type is obvious from the context (create returns an instance of the created op)

This revision is now accepted and ready to land.Jul 17 2020, 7:03 AM

Address review.

I've been using this for some fast/slow path lowering of vector.transfer ops, a bunch of stacked revisions are necessary to get there.

This revision was automatically updated to reflect the committed changes.