[PATCH] D17241: [Refactor] Move isl_ctx into Scop.

Hongbin Zheng via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 13 09:15:48 PST 2016


etherzhhb marked an inline comment as done.

================
Comment at: lib/Analysis/ScopInfo.cpp:2800
@@ -2800,1 +2799,3 @@
     isl_set_free(std::get<2>(IAClass));
+
+  isl_ctx_free(IslCtx);
----------------
jdoerfert wrote:
> You have to free __all__ isl_objects that were created with this Ctx first. Missing are at least:
>   - The ScopArrayInfoObjects
>   - The Statements
>     - The MemoryAccesses
> Maybe even more.
> 
> 
> ```
> Stmts.clear();            // Takes care of all Statement objects
> AccFuncMap.clear();       //  ... " " ........ MemoryAccesses objects
> ScopArrayInfoMap.clear(); //  ... " " ........ ScopArrayInfo objects
> ```
> 
> Did that catch all?
We also need to make sure we delete the context after we delete Dependences and IslAst, which also create isl objects with the context.

I am going to use a shared_ptr to manage that.


Repository:
  rL LLVM

http://reviews.llvm.org/D17241





More information about the llvm-commits mailing list