Start eliminating temporary vectors used to create DAG nodes. Instead, pass
authorChris Lattner <sabre@nondot.org>
Tue, 8 Aug 2006 02:23:42 +0000 (02:23 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 8 Aug 2006 02:23:42 +0000 (02:23 +0000)
commitbd564bfc63163e31f320c3da9749db70992dc35e
tree77b5cd90a35a31a43cec09750d0dcd45a72f62a7
parent4257ccb1a703db6acaa4626e81c56182a7c11c38
Start eliminating temporary vectors used to create DAG nodes.  Instead, pass
in the start of an array and a count of operands where applicable.  In many
cases, the number of operands is known, so this static array can be allocated
on the stack, avoiding the heap.  In many other cases, a SmallVector can be
used, which has the same benefit in the common cases.

I updated a lot of code calling getNode that takes a vector, but ran out of
time.  The rest of the code should be updated, and these methods should be
removed.

We should also do the same thing to eliminate the methods that take a
vector of MVT::ValueTypes.

It would be extra nice to convert the dagiselemitter to avoid creating vectors
for operands when calling getTargetNode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29566 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/SelectionDAG.h
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
lib/Target/PowerPC/PPCISelDAGToDAG.cpp
lib/Target/Sparc/SparcISelDAGToDAG.cpp
lib/Target/X86/X86ISelLowering.cpp
utils/TableGen/DAGISelEmitter.cpp