diff options
| author | Dan Gohman <gohman@apple.com> | 2010-02-05 19:24:11 +0000 | 
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2010-02-05 19:24:11 +0000 | 
| commit | 4739e41ce91ccff84e94c6689b37030267edaaf5 (patch) | |
| tree | 54e628d8188e8c4e7abca3abbcc197e466edaa28 /llvm/lib/Transforms | |
| parent | 342762fdbac9407625836b6753290001aaf3afbd (diff) | |
| download | bcm5719-llvm-4739e41ce91ccff84e94c6689b37030267edaaf5.tar.gz bcm5719-llvm-4739e41ce91ccff84e94c6689b37030267edaaf5.zip  | |
Implement releaseMemory in CodeGenPrepare and free the BackEdges
container data. This prevents it from holding onto dangling
pointers and potentially behaving unpredictably.
llvm-svn: 95409
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp index c3139a511bb..fa60d3f2906 100644 --- a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/llvm/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;  | 

