This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Fix affine loop fusion private memref alloc
ClosedPublic

Authored by bondhugula on Jun 23 2020, 2:00 PM.

Details

Summary

Drop stale code that provided the wrong operands to alloc.

Reported-by: rjnw on discourse

Diff Detail

Event Timeline

bondhugula created this revision.Jun 23 2020, 2:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 23 2020, 2:00 PM
bondhugula edited the summary of this revision. (Show Details)Jun 23 2020, 2:02 PM
andydavis1 accepted this revision.Jun 23 2020, 3:29 PM
andydavis1 added inline comments.
mlir/lib/Transforms/LoopFusion.cpp
915

Should you assert that 'newShape' is always constant?

This revision is now accepted and ready to land.Jun 23 2020, 3:29 PM
dcaballe accepted this revision.Jun 23 2020, 4:07 PM

Thanks for fixing this! LGTM

bondhugula marked 2 inline comments as done.Jun 24 2020, 9:30 AM
bondhugula added inline comments.
mlir/lib/Transforms/LoopFusion.cpp
915

It's coming right out of getConstantBoundingSizeAndShape above and there is an assert on the numElements return value being constant; so I didn't add an assert here.

This revision was automatically updated to reflect the committed changes.
bondhugula marked an inline comment as done.