1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

[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.

llvm-svn: 266509
This commit is contained in:
Davide Italiano 2016-04-16 02:27:56 +00:00
parent ff544fe603
commit 7f528bf893

View File

@ -1868,13 +1868,16 @@ class DILocalVariable : public DIVariable {
friend class LLVMContextImpl;
friend class MDNode;
unsigned Arg;
unsigned Flags;
unsigned Arg : 16;
unsigned Flags : 16;
DILocalVariable(LLVMContext &C, StorageType Storage, unsigned Line,
unsigned Arg, unsigned Flags, ArrayRef<Metadata *> Ops)
: DIVariable(C, DILocalVariableKind, Storage, Line, Ops), Arg(Arg),
Flags(Flags) {}
Flags(Flags) {
assert(Flags < ((1 << 16) - 1) && "DILocalVariable: Flags out of range");
assert(Arg < ((1 << 16) - 1) && "DILocalVariable: Arg out of range");
}
~DILocalVariable() = default;
static DILocalVariable *getImpl(LLVMContext &Context, DIScope *Scope,