mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user