This is an archive of the discontinued LLVM Phabricator instance.

[mlir][affine] More efficient `makeComposedFolded...` helpers
ClosedPublic

Authored by springerm on Jun 20 2023, 2:37 AM.

Details

Summary

The old code used to materialize constants as ops, immediately folded them into the resulting affine map and then deleted the constant ops again. Instead, directly fold the attributes into the affine map. Furthermore, all helpers accept OpFoldResult instead of Value now. This makes the code at call sites more efficient, because it is no longer necessary to materialize a Value, just to be able to use these helper functions.

Note: The API has changed (accepts OpFoldResult instead of Value), otherwise this change is NFC.

Diff Detail

Event Timeline

springerm created this revision.Jun 20 2023, 2:37 AM
Herald added a project: Restricted Project. · View Herald Transcript
springerm requested review of this revision.Jun 20 2023, 2:37 AM
Herald added a reviewer: dcaballe. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
nicolasvasilache accepted this revision.Jun 22 2023, 1:36 AM
This revision is now accepted and ready to land.Jun 22 2023, 1:36 AM