Implement releaseMemory in CodeGenPrepare and free the BackEdges

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
This commit is contained in:
Dan Gohman 2010-02-05 19:24:11 +00:00
parent a62fe66f99
commit aa0e523287

View File

@ -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;