This is an archive of the discontinued LLVM Phabricator instance.

Free the memory allocated by mlirOperationStateAddXXX methods in mlirOperationCreate.
ClosedPublic

Authored by Jing on Aug 10 2020, 12:24 AM.

Details

Summary

Previously, the memory leaks on heap. Since the MlirOperationState is not intended to be used again after mlirOperationCreate, the patch simplify frees the memory in mlirOperationCreate instead of creating any new API.

Diff Detail

Event Timeline

Jing created this revision.Aug 10 2020, 12:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 10 2020, 12:24 AM
Jing requested review of this revision.Aug 10 2020, 12:24 AM
Jing edited the summary of this revision. (Show Details)Aug 10 2020, 12:27 AM
Jing added a reviewer: ftynse.
ftynse accepted this revision.Aug 10 2020, 12:46 AM

Hmm, apparently I uploaded the patch, but landed the previous version. Thanks!

This revision is now accepted and ready to land.Aug 10 2020, 12:46 AM
Jing added a comment.Aug 10 2020, 1:03 AM

Thanks! I don't have commit access. Can someone help me land it?

This revision was automatically updated to reflect the committed changes.