This is an archive of the discontinued LLVM Phabricator instance.

[mlir][SCF][bufferize] Bufferize scf.if/execute_region terminators separately
ClosedPublic

Authored by springerm on Jun 25 2022, 3:25 AM.

Details

Summary

This allows for better type inference during bufferization and is in preparation of supporting memory spaces.

Depends On D128580

Diff Detail

Event Timeline

springerm created this revision.Jun 25 2022, 3:25 AM
springerm requested review of this revision.Jun 25 2022, 3:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 25 2022, 3:25 AM
nicolasvasilache accepted this revision.Jun 25 2022, 6:48 AM
This revision is now accepted and ready to land.Jun 25 2022, 6:48 AM
bondhugula added inline comments.
mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp
78–82

Use llvm::hasSingleElement - it's O(1) instead of O(n) (since the blocks are a linked list).

187

Rephrase to

"mismatch in memory spaces between then/else ..."

?

This revision was landed with ongoing or failed builds.Jun 27 2022, 4:22 AM
This revision was automatically updated to reflect the committed changes.