diff options
author | wren romano <2998727+wrengr@users.noreply.github.com> | 2022-03-30 12:32:33 -0700 |
---|---|---|
committer | wren romano <2998727+wrengr@users.noreply.github.com> | 2022-04-01 11:08:52 -0700 |
commit | 63bdcaf92a5ed5dc8c9bdc0ea2d1a13b8ddb3c68 (patch) | |
tree | cd39ea0430c89180323ad92f5f4a7792b1d104f3 /clang/lib/CodeGen/CodeGenModule.h | |
parent | ec0b332cd8b57815eb3f905c0cca69864e90f3d2 (diff) | |
download | llvm-63bdcaf92a5ed5dc8c9bdc0ea2d1a13b8ddb3c68.zip llvm-63bdcaf92a5ed5dc8c9bdc0ea2d1a13b8ddb3c68.tar.gz llvm-63bdcaf92a5ed5dc8c9bdc0ea2d1a13b8ddb3c68.tar.bz2 |
[mlir][sparse] Moving `delete coo` into codegen instead of runtime library
Prior to this change there were a number of places where the allocation and deallocation of SparseTensorCOO objects were not cleanly paired, leading to inconsistencies regarding whether each function released its tensor/coo arguments or not, as well as making it easy to run afoul of memory leaks, use-after-free, or double-free errors. This change cleans up the codegen vs runtime boundary to resolve those issues. Now, the only time the runtime library frees an object is either (a) because it's a function explicitly designed to do so, or (b) because the allocated object is entirely local to the function and would be a memory leak if not released. Thus, now the codegen takes complete responsibility for releasing any objects it caused to be allocated.
Reviewed By: aartbik
Differential Revision: https://reviews.llvm.org/D122435
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
0 files changed, 0 insertions, 0 deletions