[llvm-commits] CVS: llvm/lib/Bytecode/Reader/InstructionReader.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Oct 9 17:48:01 PDT 2003
Changes in directory llvm/lib/Bytecode/Reader:
InstructionReader.cpp updated: 1.58 -> 1.59
---
Log message:
Reserve space for PHI nodes when we read them in. This provides a VERY
tasty 15% speedup on the testcase from Bill.
---
Diffs of the changes: (+1 -0)
Index: llvm/lib/Bytecode/Reader/InstructionReader.cpp
diff -u llvm/lib/Bytecode/Reader/InstructionReader.cpp:1.58 llvm/lib/Bytecode/Reader/InstructionReader.cpp:1.59
--- llvm/lib/Bytecode/Reader/InstructionReader.cpp:1.58 Thu Oct 9 17:39:30 2003
+++ llvm/lib/Bytecode/Reader/InstructionReader.cpp Thu Oct 9 17:46:58 2003
@@ -125,6 +125,7 @@
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;
More information about the llvm-commits
mailing list