Change SCEVNAryExpr's operand array from a SmallVector to a plain
authorDan Gohman <gohman@apple.com>
Wed, 17 Mar 2010 18:51:01 +0000 (18:51 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 17 Mar 2010 18:51:01 +0000 (18:51 +0000)
commit0afc29c3e6ba240ee187fd34ba1ecbe1175c879e
tree129fc3c259d89f2819f514e055a4e825bfc53a61
parentf9cf8b35bb525ba68cb8e49bab8a960094e0891a
Change SCEVNAryExpr's operand array from a SmallVector to a plain
pointer and length, and allocate the arrays in ScalarEvolution's
BumpPtrAllocator, so that they get released when their owning
SCEV gets released. SCEVs are immutable, so they don't need to worry
about operand array resizing. This fixes a memory leak reported
in PR6637.

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