projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a62fe66
)
Implement releaseMemory in CodeGenPrepare and free the BackEdges
author
Dan Gohman
<gohman@apple.com>
Fri, 5 Feb 2010 19:24:11 +0000
(19:24 +0000)
committer
Dan Gohman
<gohman@apple.com>
Fri, 5 Feb 2010 19:24:11 +0000
(19:24 +0000)
container data. This prevents it from holding onto dangling
pointers and potentially behaving unpredictably.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95409
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/CodeGenPrepare.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/CodeGenPrepare.cpp
b/lib/Transforms/Scalar/CodeGenPrepare.cpp
index c3139a511bb58f9e032929ca8958020ee1064e7e..fa60d3f29060bdf1dd03c6dac851bebc1eaa9f78 100644
(file)
--- a/
lib/Transforms/Scalar/CodeGenPrepare.cpp
+++ b/
lib/Transforms/Scalar/CodeGenPrepare.cpp
@@
-63,6
+63,10
@@
namespace {
AU.addPreserved<ProfileInfo>();
}
+ virtual void releaseMemory() {
+ BackEdges.clear();
+ }
+
private:
bool EliminateMostlyEmptyBlocks(Function &F);
bool CanMergeBlocks(const BasicBlock *BB, const BasicBlock *DestBB) const;