[cfe-dev] Memory consumption measurement results
Fariborz Jahanian
fjahanian at apple.com
Wed Mar 31 13:46:33 PDT 2010
On Mar 31, 2010, at 4:33 AM, ihusar wrote:
> On Mon, 29 Mar 2010 18:15:01 +0200, Douglas Gregor <dgregor at apple.com>
> wrote:
>
>>
>> On Mar 29, 2010, at 9:10 AM, ihusar wrote:
>>
>>> Hello, right after I sent previous message, I realized that I had
>>> wrong
>>> paths set,
>>> sorry for that.
>>> The previous results were for unoptimized clang,
>>> here i fix it and results are for optimized clang.
>>> Now the times match those of llvm-g++, however the huge memory
>>> consumption,
>>> especially compared to standard gcc, did not change.
>>> I am not sure if this is still a problem, however, on a 32-bit
>>> machine,
>>> it will not be possible to compile the testing code.
>>
>> The memory consumption still looks like it could be an issue.
>> However,
>> we still need to know which part of the compiler is requiring so much
>> memory: I'm guessing it's the LLVM back-end, since both llvm-g++ and
>> clang++ are affected (and we've rarely seen Clang itself take more
>> memory than GCC). Could you measure the memory usage difference
>> between
>> using -fsyntax-only and using -emit-llvm?
>>
>> - Doug
>
> Hello,
>
> 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
>
> llvm-gcc: max. 4.1 GB
I am curious what these two numbers tell us? Does clang's memory
consumption is higher than gcc's fe or
clang's output forces more memory consumption on the part of llvm back-
end? I think it is the latter rather
than the former, as we generally consume less memory in clang than
gcc's fe.
- Fariborz
More information about the cfe-dev
mailing list