diff options
author | Chris Lattner <sabre@nondot.org> | 2003-10-09 22:46:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-10-09 22:46:58 +0000 |
commit | 2ec9de30cd9dbc4d02e1a3f47a6cf988166e681b (patch) | |
tree | 4d5e45f45f2cf2d03019c21bc5fd71ae25381962 /llvm/lib | |
parent | 5a485c811717f666b30543706a6bb00246bd0e71 (diff) | |
download | bcm5719-llvm-2ec9de30cd9dbc4d02e1a3f47a6cf988166e681b.tar.gz bcm5719-llvm-2ec9de30cd9dbc4d02e1a3f47a6cf988166e681b.zip |
Reserve space for PHI nodes when we read them in. This provides a VERY
tasty 15% speedup on the testcase from Bill.
llvm-svn: 8993
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Bytecode/Reader/InstructionReader.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Bytecode/Reader/InstructionReader.cpp b/llvm/lib/Bytecode/Reader/InstructionReader.cpp index a763d66b227..b415025a578 100644 --- a/llvm/lib/Bytecode/Reader/InstructionReader.cpp +++ b/llvm/lib/Bytecode/Reader/InstructionReader.cpp @@ -125,6 +125,7 @@ Instruction *BytecodeParser::ParseInstruction(const unsigned char *&Buf, throw std::string("Invalid phi node encountered!\n"); PHINode *PN = new PHINode(InstTy); + PN->op_reserve(Args.size()); for (unsigned i = 0, e = Args.size(); i != e; i += 2) PN->addIncoming(getValue(RI.Type, Args[i]), getBasicBlock(Args[i+1])); return PN; |