SelectionDAG: Use correctly sized allocation functions for SDNodes
authorJustin Bogner <mail@justinbogner.com>
Wed, 2 Mar 2016 19:01:11 +0000 (19:01 +0000)
committerJustin Bogner <mail@justinbogner.com>
Wed, 2 Mar 2016 19:01:11 +0000 (19:01 +0000)
commitb2ecee9c31e93f786cff56d0faf816ebe6268e34
tree351242b9534c3653e81b4bac16bd63b4f663c80c
parent8c1ec1ef38e361c76a7f71f8078e21220619cca4
SelectionDAG: Use correctly sized allocation functions for SDNodes

The placement new calls here were all calling the allocation function
in RecyclingAllocator/Recycler for SDNode, instead of the function for
the specific subclass we were constructing.

Since this particular allocator always overallocates it more or less
worked, but would hide what we're actually doing from any memory
tools. Also, if you tried to change this allocator so something like a
BumpPtrAllocator or MallocAllocator, the compiler would crash horribly
all the time.

Part of llvm.org/PR26808.

llvm-svn: 262500
llvm/include/llvm/CodeGen/SelectionDAG.h
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp