aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/InstrSelection/InstrForest.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-06-16 22:29:09 +0000
committerChris Lattner <sabre@nondot.org>2003-06-16 22:29:09 +0000
commit2eb9a257c86d6194ec572d8556f86af97452bebe (patch)
tree15c154d1432a5dd80f68240e76685ef6793b0ff8 /lib/CodeGen/InstrSelection/InstrForest.cpp
parent5b1688d73be263590c25ca210efa4ebee7534cea (diff)
Actually, change it to use explicit new/delete, which is more likely to be
optimized INTO an alloca git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6727 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/InstrSelection/InstrForest.cpp')
-rw-r--r--lib/CodeGen/InstrSelection/InstrForest.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/InstrSelection/InstrForest.cpp b/lib/CodeGen/InstrSelection/InstrForest.cpp
index 9ff681805b..ea2ccadab9 100644
--- a/lib/CodeGen/InstrSelection/InstrForest.cpp
+++ b/lib/CodeGen/InstrSelection/InstrForest.cpp
@@ -255,7 +255,7 @@ InstrForest::buildTreeForInstruction(Instruction *instr)
// if a fixed array is too small.
//
int numChildren = 0;
- std::vector<InstrTreeNode*> childArray(instr->getNumOperands());
+ InstrTreeNode** childArray = new InstrTreeNode*[instr->getNumOperands()];
//
// Walk the operands of the instruction
@@ -362,6 +362,7 @@ InstrForest::buildTreeForInstruction(Instruction *instr)
assert(n == 1);
setRightChild(parent, childArray[numChildren - 1]);
}
-
+
+ delete [] childArray;
return treeNode;
}