This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Refactor affine loop nest builders
ClosedPublic

Authored by ftynse on Jun 16 2020, 11:17 AM.

Details

Summary

Existing implementation of affine loop nest builders relies on EDSC
ScopedContext, which is not used pervasively. Provide a common OpBuilder-based
helper function to construct a perfect nest of affine loops with the body of
the innermost loop populated by a callback. Use this function to implement the
EDSC version.

Affine "for" loops differ from SCF "for" loops by (1) not allowing to yield
values and (2) supporting short-hand form for constant bounds, which justifies
a separate implementation of the loop nest builder for the same of simplicity.

Diff Detail

Event Timeline

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