diff options
author | Hongbin Zheng <etherzhhb@gmail.com> | 2016-02-17 15:49:21 +0000 |
---|---|---|
committer | Hongbin Zheng <etherzhhb@gmail.com> | 2016-02-17 15:49:21 +0000 |
commit | 8831eb7db4f45ad8cc41c25263d8cb5efbaa2471 (patch) | |
tree | 4d4f1e0c6ed7ec3407c3604a753f2f657684db10 /llvm/lib/Object/Error.cpp | |
parent | ce2fbddd1903b078e4837e42071e6555b0baecf5 (diff) | |
download | llvm-8831eb7db4f45ad8cc41c25263d8cb5efbaa2471.zip llvm-8831eb7db4f45ad8cc41c25263d8cb5efbaa2471.tar.gz llvm-8831eb7db4f45ad8cc41c25263d8cb5efbaa2471.tar.bz2 |
[Refactor] Move isl_ctx into Scop.
After we moved isl_ctx into Scop, we need to free the isl_ctx after
freeing all isl objects, which requires the ScopInfo pass to be freed
at last. But this is not guaranteed by the PassManager, and we need
extra code to free the isl_ctx at the right time.
We introduced a shared pointer to manage the isl_ctx, and distribute
it to all analyses that create isl objects. As such, whenever we free
an analyses with the shared_ptr (and also free the isl objects which
are created by the analyses), we decrease the (shared) reference
counter of the shared_ptr by 1. Whenever the reference counter reach
0 in the releaseMemory function of an analysis, that analysis will
be the last one that hold any isl objects, and we can safely free the
isl_ctx with that analysis.
Differential Revision: http://reviews.llvm.org/D17241
llvm-svn: 261100
Diffstat (limited to 'llvm/lib/Object/Error.cpp')
0 files changed, 0 insertions, 0 deletions