llvm.org GIT mirror llvm / b5fd6b3
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266509 91177308-0d34-0410-b5e6-96231b3b80d8 Davide Italiano 3 years ago
1 changed file(s) with 6 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
18671867 friend class LLVMContextImpl;
18681868 friend class MDNode;
18691869
1870 unsigned Arg;
1871 unsigned Flags;
1870 unsigned Arg : 16;
1871 unsigned Flags : 16;
18721872
18731873 DILocalVariable(LLVMContext &C, StorageType Storage, unsigned Line,
18741874 unsigned Arg, unsigned Flags, ArrayRef Ops)
18751875 : DIVariable(C, DILocalVariableKind, Storage, Line, Ops), Arg(Arg),
1876 Flags(Flags) {}
1876 Flags(Flags) {
1877 assert(Flags < ((1 << 16) - 1) && "DILocalVariable: Flags out of range");
1878 assert(Arg < ((1 << 16) - 1) && "DILocalVariable: Arg out of range");
1879 }
18771880 ~DILocalVariable() = default;
18781881
18791882 static DILocalVariable *getImpl(LLVMContext &Context, DIScope *Scope,