Page MenuHomePhabricator

[mlir] Provide OpBuilder-based replacements for edsc::BlockBuilder
ClosedPublic

Authored by ftynse on Jun 17 2020, 5:32 AM.

Details

Summary

The ScopedBuilder class in EDSC is being gradually phased out in favor of core
OpBuilder-based helpers with callbacks. Provide helper functions that are
compatible with edsc::ScopedContext and can be used to create and populate
blocks using callbacks that take block arguments as callback arguments. This
removes the need for edsc::BlockHandle, forward-declaration of Values used
for block arguments and the tag edsc::Append class, leading to noticable
reduction in the verbosity of the code using helper functions.

Remove "eager mode" construction tests that are only relevant to the
BlockBuilder-based approach.

edsc::BlockHandle and edsc::BlockBuilder are now deprecated and will be
removed soon.

Diff Detail

Event Timeline

ftynse created this revision.Jun 17 2020, 5:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 17 2020, 5:32 AM
rriddle accepted this revision.Jun 17 2020, 12:56 PM
rriddle added inline comments.
mlir/lib/Dialect/Linalg/EDSC/Builders.cpp
140

Can you just pass regionBuilder directly?

This revision is now accepted and ready to land.Jun 17 2020, 12:56 PM
ftynse marked an inline comment as done.Jun 18 2020, 2:42 AM
ftynse added inline comments.
mlir/lib/Dialect/Linalg/EDSC/Builders.cpp
140

Sure, thanks, I forgot I cleaned up those signatures!

ftynse updated this revision to Diff 271626.Jun 18 2020, 2:47 AM

Address review and rebase

This revision was automatically updated to reflect the committed changes.