Commit c4d7ea8
authored
[llvm-debuginfo-analyzer] Apply various memory savings in Core/LVxxx base classes (llvm#144399)
This small changelist reduces memory footprint of instances of the Core
classes. Specifically,
- For `LVProperties`, use underlying type of `uint32_t` if there are at
most 32 properties to keep track of. Otherwise, fallback to the generic
`std::bitset<N>`.
The use of `llvm::SmallBitVector` is disregarded in this case, as the
upper bound on the size of the bitset can be determined statically (no
heap alloc ever needed).
- Reorder members in `LVElement` s.t. padding between members is
reduced.
- `LVScopeCompileUnit`: fix a couple of members which should be `static
constexpr` instead.1 parent d10079e commit c4d7ea8
File tree
3 files changed
+31
-12
lines changed- llvm/include/llvm/DebugInfo/LogicalView/Core
3 files changed
+31
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
112 | 110 | | |
113 | 111 | | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | 112 | | |
118 | 113 | | |
119 | 114 | | |
120 | 115 | | |
121 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
476 | | - | |
| 476 | + | |
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
| |||
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
513 | | - | |
| 513 | + | |
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
41 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
46 | | - | |
47 | | - | |
48 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
49 | 68 | | |
50 | 69 | | |
51 | 70 | | |
| |||
0 commit comments