[cfe-dev] Memory consumption measurement results, for revision 100183

ihusar ihusar at fit.vutbr.cz
Fri Apr 2 06:24:31 PDT 2010


On Wed, 31 Mar 2010 18:33:08 +0200, Chris Lattner <clattner at apple.com>  
wrote:

> On Mar 31, 2010, at 4:33 AM, ihusar wrote:
>>   so I did some memory consumption measurement and the results are as
>> follows:
>>
>> source file size: 12MB
>> resulting .bc file with debug info has 250MB
>>
>> clang: max. 4.8 GB
>> clang -fsyntax-only: max. ~120 MB
>> llvm-gcc: max. 4.1 GB
>> gcc 4.4.1: max 1.4 GB
>> opt -O3: max. 3.6 GB
>>
>>
>> source file size: 24MB
>>
>> clang: max. 7.5 GB, stopped after 1 hour
>> gcc: after 11 seconds: gcc: Internal error: Segmentation fault (program
>> cc1), max. 1.4 GB
>
> This is interesting.  I infer that these memory usage numbers are for  
> "clang -O0 -g"?  If so, you might want to try a new build, last night  
> several memory and compile time improvements went in for debug info, and  
> more are coming.
>
> -Chris


Hello,
   I made some tests for the latest revision 100183
and the memory consumption has gotten even higher compared to revision  
99809.

For the same 12MB file:

clang (no args): 5GB
clang -O0 -g0: 5GB
clang -O0 -g: 6.3GB, stopped after 33 minutes
opt --disable-output: 3.7 GB
opt -O3 --disable-output: 3.9 GB

Details can be found here:  
http://lissom.aps-brno.cz/tmp/clang_rev100183.xls
and http://lissom.aps-brno.cz/tmp/clang_rev99809.xls

I will probably solve this problem by splitting this large file into
smaller ones and by buying more memory, but I think it would be at
least interesting to see, what is the main reason that the memory  
consumption
is so much higher than in gcc.

Best regards
   Adam



More information about the cfe-dev mailing list