This is an archive of the discontinued LLVM Phabricator instance.

[mlir] refactor Linalg LoopNestBuilder to use common infra
ClosedPublic

Authored by ftynse on Jun 15 2020, 1:01 PM.

Details

Summary

Recent work has introduced support for constructing loops via ::build with
callbacks that construct loop bodies using only the core OpBuilder. This is now
supported on all loop types that Linalg lowers to. Refactor LoopNestBuilder in
Linalg to rely on this functionality instead of using a custom EDSC-based
approach to creating loop nests.

The specialization targeting parallel loops is also simplified by factoring out
the recursive call into a separate static function and considering only two
alternatives: top-level loop is parallel or sequential.

This removes the last remaining in-tree use of edsc::LoopBuilder, which is now
deprecated and will be removed soon.

Depends On D81872

Diff Detail

Event Timeline

ftynse created this revision.Jun 15 2020, 1:01 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2020, 1:01 PM
This revision is now accepted and ready to land.Jun 16 2020, 11:37 AM
This revision was automatically updated to reflect the committed changes.