Add the ability to "intern" FoldingSetNodeID data into a
authorDan Gohman <gohman@apple.com>
Thu, 18 Mar 2010 16:16:38 +0000 (16:16 +0000)
committerDan Gohman <gohman@apple.com>
Thu, 18 Mar 2010 16:16:38 +0000 (16:16 +0000)
commitc93b4cff89d85a13d4eaf1551af9fab276b88450
treeb0a5d281ffed3074c035b42af991edbb096ff38c
parent7c4a1211102d6a5d1eccbeb21fe60319cf1d3e99
Add the ability to "intern" FoldingSetNodeID data into a
BumpPtrAllocator-allocated region to allow it to be stored in a more
compact form and to avoid the need for a non-trivial destructor call.

Use this new mechanism in ScalarEvolution instead of
FastFoldingSetNode to avoid leaking memory in the case where a
FoldingSetNodeID uses heap storage, and to reduce overall memory
usage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98829 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/FoldingSet.h
include/llvm/Analysis/ScalarEvolution.h
include/llvm/Analysis/ScalarEvolutionExpressions.h
lib/Analysis/ScalarEvolution.cpp
lib/Support/FoldingSet.cpp