mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-05 02:49:18 +00:00
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
This commit is contained in:
parent
b6367d9414
commit
b8883ea999
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user