[llvm] r266509 - [DebugInfo] Reduce size of DILocalVariable from 40 to 32 bytes.
Duncan P. N. Exon Smith via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 15 20:38:26 PDT 2016
> On 2016-Apr-15, at 20:34, Davide Italiano <davide at freebsd.org> wrote:
>
> On Fri, Apr 15, 2016 at 8:21 PM, Duncan P. N. Exon Smith
> <dexonsmith at apple.com> wrote:
>>
>>> On 2016-Apr-15, at 20:14, Davide Italiano <davide at freebsd.org> wrote:
>>>
>>> On Fri, Apr 15, 2016 at 7:57 PM, Duncan P. N. Exon Smith
>>> <dexonsmith at apple.com> wrote:
>>>>
>>>>> On 2016-Apr-15, at 19:27, Davide Italiano via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>>>>>
>>>>> Author: davide
>>>>> Date: Fri Apr 15 21:27:56 2016
>>>>> New Revision: 266509
>>>>>
>>>>> URL: http://llvm.org/viewvc/llvm-project?rev=266509&view=rev
>>>>> Log:
>>>>> [DebugInfo] Reduce size of DILocalVariable from 40 to 32 bytes.
>>>>>
>>>>> This significantly contributes to peak memory usage during a
>>>>> LTO Release+DebugInfo build of clang. In my profile the peak usage
>>>>> is around 164MB before this change and ~130MB after.
>>>>>
>>>>> Modified:
>>>>> llvm/trunk/include/llvm/IR/DebugInfoMetadata.h
>>>>>
>>>>> Modified: llvm/trunk/include/llvm/IR/DebugInfoMetadata.h
>>>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugInfoMetadata.h?rev=266509&r1=266508&r2=266509&view=diff
>>>>> ==============================================================================
>>>>> --- llvm/trunk/include/llvm/IR/DebugInfoMetadata.h (original)
>>>>> +++ llvm/trunk/include/llvm/IR/DebugInfoMetadata.h Fri Apr 15 21:27:56 2016
>>>>> @@ -1868,13 +1868,16 @@ class DILocalVariable : public DIVariabl
>>>>> friend class LLVMContextImpl;
>>>>> friend class MDNode;
>>>>>
>>>>> - unsigned Arg;
>>>>> - unsigned Flags;
>>>>> + unsigned Arg : 16;
>>>>> + unsigned Flags : 16;
>>>>
>>>> How does this save memory? Are you on a 32-bit platform?
>>>>
>>>
>>> No, x86_64.
>>
>> Yup, I missed the 32-bits in DIVariable.
>>
>> You may be able to shave some bits off of MDNode::NumOperands and
>> MDNode::NumUnresolved. I'm not sure you can get enough to help, but
>> maybe.
>>
>
> The failures should be fixed (r266512). I missed because I ran tests
> without assertions, sorry :|
> Your suggestion is nice, I'll take a look at it.
BTW, I think there should be fairly major memory savings available
from PR27352.
More information about the llvm-commits
mailing list