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
This commit is contained in:
Chris Lattner
2003-06-16 22:29:09 +00:00
parent 5b1688d73b
commit 2eb9a257c8
5 changed files with 27 additions and 22 deletions
+3 -2
View File
@@ -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;
}