Commit 0b23d98
Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (llvm#129934)
This mitigates a regression introduced in llvm#87824.
The mitigation here is to store pointers the deduplicated AST nodes, rather than copies of the nodes themselves. This allows a pointer-optimized set to be used and saves a lot of memory because `clang::DynTypedNode` is ~5 times larger than a pointer.
Fixes llvm#129808.
(cherry picked from commit 8c7f0ea)1 parent 073ae08 commit 0b23d98
1 file changed
+11
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
| 17 | + | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
72 | | - | |
73 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
74 | 77 | | |
75 | 78 | | |
76 | | - | |
| 79 | + | |
| 80 | + | |
77 | 81 | | |
| 82 | + | |
78 | 83 | | |
79 | 84 | | |
80 | 85 | | |
81 | | - | |
82 | | - | |
| 86 | + | |
| 87 | + | |
83 | 88 | | |
84 | 89 | | |
85 | 90 | | |
| |||
0 commit comments