This is an archive of the discontinued LLVM Phabricator instance.

[mlir][EDSC] Make use of InsertGuard
ClosedPublic

Authored by nicolasvasilache on Apr 30 2020, 2:45 PM.

Details

Summary

This revision cleans up a layer of complexity in ScopedContext and uses InsertGuard instead of previously manual bookkeeping.
The method getBuilder is renamed to getBuilderRef and spurious copies of OpBuilder are tracked.

This results in some canonicalizations not happening anymore in the Linalg matmul to vector test. This test is retired because relying on DRRs for this has been shaky at best. The solution will be better support to write fused passes in C++ with more idiomatic pattern composition and application.

Diff Detail

Event Timeline

Herald added a reviewer: ftynse. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
rriddle accepted this revision.Apr 30 2020, 2:54 PM
rriddle marked an inline comment as done.
rriddle added inline comments.
mlir/lib/EDSC/Builders.cpp
86

You should be able to just do res.block->addArguments(argTypes)

This revision is now accepted and ready to land.Apr 30 2020, 2:54 PM

ADdress comment.

This revision was automatically updated to reflect the committed changes.
mlir/test/lib/Transforms/CMakeLists.txt