diff options
author | Chris Lattner <sabre@nondot.org> | 2006-08-08 01:09:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-08-08 01:09:31 +0000 |
commit | f06f35e30b4c4d7db304f717a3d4dc6595fbd078 (patch) | |
tree | b2a4aae9b9f4a46e9c18fd56f665694739baea5b /include/llvm/CodeGen/SelectionDAGNodes.h | |
parent | 8de353df9da7e5931688075c85d01e3153c73185 (diff) |
Eliminate some malloc traffic by allocating vectors on the stack. Change some
method that took std::vector<SDOperand> to take a pointer to a first operand
and #operands.
This speeds up isel on kc++ by about 3%.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29561 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SelectionDAGNodes.h')
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGNodes.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index 855e33824f..fe6975b19f 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -865,13 +865,13 @@ protected: Prev = 0; Next = 0; NextInBucket = 0; } - SDNode(unsigned Opc, const std::vector<SDOperand> &Nodes) + SDNode(unsigned Opc, const SDOperand *Ops, unsigned NumOps) : NodeType(Opc), NodeId(-1) { - NumOperands = Nodes.size(); + NumOperands = NumOps; OperandList = new SDOperand[NumOperands]; - for (unsigned i = 0, e = Nodes.size(); i != e; ++i) { - OperandList[i] = Nodes[i]; + for (unsigned i = 0, e = NumOps; i != e; ++i) { + OperandList[i] = Ops[i]; SDNode *N = OperandList[i].Val; N->Uses.push_back(this); } |