This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Update Toy tutorial to use callback-based loop constructors
ClosedPublic

Authored by ftynse on Jun 18 2020, 8:54 AM.

Details

Summary

We recently introduced support for building loops or loop nests using callbacks
that populate the body. Use these in the tutorial instead of setInsertionPoint
manipulations.

Depends On D81955

Diff Detail

Event Timeline

ftynse created this revision.Jun 18 2020, 8:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 18 2020, 8:54 AM
rriddle accepted this revision.Jun 18 2020, 9:52 AM
rriddle added inline comments.
mlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp
74

nit: One of these is Value and the other is value.

mlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp
75

nit: One of these is Value and the other is value.

This revision is now accepted and ready to land.Jun 18 2020, 9:52 AM
rriddle added inline comments.Jun 18 2020, 9:53 AM
mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp
74

Same here.

ftynse updated this revision to Diff 271842.Jun 18 2020, 2:02 PM

Thanks for the review! Addressed.

This revision was automatically updated to reflect the committed changes.