[PATCH] D136565: [clang] Instantiate alias templates with sugar
Alexander Kornienko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 7 18:54:45 PST 2022
alexfh added a comment.
In D136565#3913065 <https://reviews.llvm.org/D136565#3913065>, @mizvekov wrote:
> In D136565#3911884 <https://reviews.llvm.org/D136565#3911884>, @alexfh wrote:
>
>> Hi Matheus, 279fe6281d2ca5b2318c7437316c28750feaac8d <https://reviews.llvm.org/rG279fe6281d2ca5b2318c7437316c28750feaac8d> causes compilation timeout on some of our internal files.
>
> Hi @alexfh. It looks like somehow we may be creating a crazy amount of extra UsingTypes in your test scenario.
>
> There is a clang flag that prints some performance statistics, including the amount of AST nodes created. I can't lookup the spelling as I am on vacations / on a cellphone for the next two weeks, but I believe this is documented.
>
> One idea to get a reduction here is to perhaps tie your creduce interestingness test to that UsingType count.
Something related to using types has definitely changed. The diff of what `-Xclang=-print-stats` prints in clang edf1a2e89340c8fa64a679e7d4ec2b5ee92ec40f <https://reviews.llvm.org/rGedf1a2e89340c8fa64a679e7d4ec2b5ee92ec40f> (a few commits before this one) and clang a few commits after this one (ee1f132d2c4d399be711275a62698ea9e766c199 <https://reviews.llvm.org/rGee1f132d2c4d399be711275a62698ea9e766c199>):
*** AST Context Stats:
- 2570192 types total.
+ 2647700 types total.
2 Decayed types, 48 each (96 bytes)
194 ConstantArray types, 56 each (10864 bytes)
58 DependentSizedArray types, 64 each (3712 bytes)
28 IncompleteArray types, 40 each (1120 bytes)
18 Atomic types, 40 each (720 bytes)
2 Attributed types, 48 each (96 bytes)
62 Builtin types, 24 each (1488 bytes)
268 Decltype types, 40 each (10720 bytes)
10 Auto types, 48 each (480 bytes)
39 DeducedTemplateSpecialization types, 48 each (1872 bytes)
- 1763 DependentName types, 48 each (84624 bytes)
- 126 DependentTemplateSpecialization types, 48 each (6048 bytes)
- 1034975 Elaborated types, 48 each (49678800 bytes)
- 5301 FunctionProto types, 40 each (212040 bytes)
+ 1759 DependentName types, 48 each (84432 bytes)
+ 129 DependentTemplateSpecialization types, 48 each (6192 bytes)
+ 1074359 Elaborated types, 48 each (51569232 bytes)
+ 5329 FunctionProto types, 40 each (213160 bytes)
1174 InjectedClassName types, 40 each (46960 bytes)
110 MemberPointer types, 48 each (5280 bytes)
- 444 PackExpansion types, 40 each (17760 bytes)
+ 424 PackExpansion types, 40 each (16960 bytes)
129 Paren types, 40 each (5160 bytes)
- 1221 Pointer types, 40 each (48840 bytes)
- 1582 LValueReference types, 40 each (63280 bytes)
- 525 RValueReference types, 40 each (21000 bytes)
- 19 SubstTemplateTypeParmPack types, 48 each (912 bytes)
- 2138 SubstTemplateTypeParm types, 40 each (85520 bytes)
+ 1174 Pointer types, 40 each (46960 bytes)
+ 1598 LValueReference types, 40 each (63920 bytes)
+ 555 RValueReference types, 40 each (22200 bytes)
+ 33 SubstTemplateTypeParmPack types, 48 each (1584 bytes)
+ 859 SubstTemplateTypeParm types, 40 each (34360 bytes)
84 Enum types, 32 each (2688 bytes)
1334 Record types, 32 each (42688 bytes)
1276440 TemplateSpecialization types, 40 each (51057600 bytes)
43125 TemplateTypeParm types, 40 each (1725000 bytes)
1071 Typedef types, 40 each (42840 bytes)
197249 UnaryTransform types, 48 each (9467952 bytes)
- 669 Using types, 40 each (26760 bytes)
+ 40052 Using types, 40 each (1602080 bytes)
32 Vector types, 40 each (1280 bytes)
-Total bytes = 112674200
+Total bytes = 116089696
The test is still being reduced.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136565/new/
https://reviews.llvm.org/D136565
More information about the cfe-commits
mailing list