This is an archive of the discontinued LLVM Phabricator instance.

add dealloc alias check to bufferization
ClosedPublic

Authored by kushanam on Aug 12 2022, 11:32 AM.

Details

Summary

Traverse the cloneOp for aliases to find the alloc op

Diff Detail

Event Timeline

kushanam created this revision.Aug 12 2022, 11:32 AM
kushanam requested review of this revision.Aug 12 2022, 11:32 AM
kushanam updated this revision to Diff 452255.Aug 12 2022, 11:43 AM

add dealloc alias check to bufferization
Traverse the cloneOp for aliases to find the alloc op

frgossen accepted this revision.Aug 12 2022, 11:52 AM

Great! Thank's for fixing this.

mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp
454

Can we call this canonicalSource?

457

Dont think this is needed. The while loop will already check this, no?

This revision is now accepted and ready to land.Aug 12 2022, 11:52 AM
kushanam updated this revision to Diff 453196.Aug 16 2022, 9:29 PM

add dealloc alias check to bufferization
Traverse the cloneOp for aliases to find the alloc op

bondhugula accepted this revision.Aug 17 2022, 3:21 AM
bondhugula added a subscriber: bondhugula.

LGTM

mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp
452–453

Find the dealloc op for the canonical source...?

frgossen requested changes to this revision.Aug 17 2022, 10:51 AM

Nice, exactly what we want.
Can you address Uday's comment and the failing CI? I believe this is just a formatting issue:

ERROR   git-clang-format returned an non-zero exit code 1
This revision now requires changes to proceed.Aug 17 2022, 10:51 AM
kushanam updated this revision to Diff 453351.Aug 17 2022, 11:07 AM
kushanam marked 2 inline comments as done.

add dealloc alias check to bufferization
Traverse the cloneOp for aliases to find the alloc op

frgossen accepted this revision.Aug 17 2022, 11:13 AM

Thanks. Will land this when the CI passes

This revision is now accepted and ready to land.Aug 17 2022, 11:13 AM

It's still failing the linter
You can likely just run git-clang-format HEAD~1 to fix this.

kushanam updated this revision to Diff 453438.Aug 17 2022, 2:45 PM

add dealloc alias check to bufferization
Traverse the cloneOp for aliases to find the alloc op

It's still failing the linter
You can likely just run git-clang-format HEAD~1 to fix this.

Thanks Frederik, I ran the clang formatter and resubmitted.

The Ci is running but I do not see any changed. This is strange.

This comment was removed by kushanam.
kushanam updated this revision to Diff 453446.Aug 17 2022, 3:11 PM

add dealloc alias check to bufferization
Traverse the cloneOp for aliases to find the alloc op

Sorry, the issue was with my amend. Resubmitted the patch..

This revision was automatically updated to reflect the committed changes.