[llvm-commits] [llvm] r50147 - /llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.cpp
Bill Wendling
isanbard at gmail.com
Wed Apr 23 18:43:55 PDT 2008
On Apr 23, 2008, at 3:56 AM, Gabor Greif wrote:
> 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);
Magic numbers? :-) Could you put a comment in there describing why
you're using 2 and 100?
-bw
More information about the llvm-commits
mailing list