[llvm-commits] [llvm] r50147 - /llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.cpp
Gabor Greif
ggreif at gmail.com
Wed Apr 23 03:56:21 PDT 2008
Author: ggreif
Date: Wed Apr 23 05:56:15 2008
New Revision: 50147
URL: http://llvm.org/viewvc/llvm-project?rev=50147&view=rev
Log:
remove horrible quadratic complexity when reallocating
Modified:
llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.cpp
Modified: llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.cpp?rev=50147&r1=50146&r2=50147&view=diff
==============================================================================
--- llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.cpp (original)
+++ llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.cpp Wed Apr 23 05:56:15 2008
@@ -154,7 +154,7 @@
if (Desired > Capacity)
{
- Use *New = allocHungoffUses(Desired);
+ Use *New = allocHungoffUses(Desired*2+100);
for (int i(getNumOperands() - 1); i >= 0; --i)
New[i] = getOperand(i);
Use *Old = OperandList;
More information about the llvm-commits
mailing list