[PATCH] D62635: Add enums as global variables in the IR metadata.

2019-06-18 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D62635#1548721 , @rnk wrote: > In D62635#1548648 , @dblaikie wrote: > > > In D62635#1548157 , @rnk wrote: > > > > > We did things this way to tra

[PATCH] D62635: Add enums as global variables in the IR metadata.

2019-06-18 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D62635#1548648 , @dblaikie wrote: > In D62635#1548157 , @rnk wrote: > > > We did things this way to track which **enumerators** were used, not which > > enums were used. Size data showed it

[PATCH] D62635: Add enums as global variables in the IR metadata.

2019-06-18 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D62635#1548157 , @rnk wrote: > We did things this way to track which **enumerators** were used, not which > enums were used. Size data showed it was worth doing (6%). The existing > format doesn't support tracking usage of in

[PATCH] D62635: Add enums as global variables in the IR metadata.

2019-06-18 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. We did things this way to track which **enumerators** were used, not which enums were used. Size data showed it was worth doing (6%). The existing format doesn't support tracking usage of individual enumerators, so we pretended they were const integers to avoid changing the

[PATCH] D62635: Add enums as global variables in the IR metadata.

2019-06-17 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. They should all be there, but emitting the unused enums makes the binary sizes larger. (I think around 6% increase? I forget the size difference for only emitting used enums) Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62635/new/ https

[PATCH] D62635: Add enums as global variables in the IR metadata.

2019-06-17 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D62635#1547352 , @akhuang wrote: > I think the main issue was keeping track of which enums are used? The used enums would still end up in the 'enums' list for the DICompileUnit, right? (If CodeView needs more enums in the li

[PATCH] D62635: Add enums as global variables in the IR metadata.

2019-06-17 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. I think the main issue was keeping track of which enums are used? Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62635/new/ https://reviews.llvm.org/D62635 ___ cfe-commits mailing list cfe-comm

[PATCH] D62635: Add enums as global variables in the IR metadata.

2019-06-17 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Is it practical/possible to do this in LLVM rather than in Clang? I'd have thought it'd be best to keep the IR metadata as output-format agnostic as practical/possible to reduce divergent codepaths, etc? Repository: rL LLVM CHANGES SINCE LAST ACTION https://revie

[PATCH] D62635: Add enums as global variables in the IR metadata.

2019-05-30 Thread Amy Huang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL362166: Add enums as global variables in the IR metadata. (authored by akhuang, committed by ). Changed prior to commit: https://reviews.llvm.org/D62635?vs=202079&id=202312#toc Repository: rL LLVM C

[PATCH] D62635: Add enums as global variables in the IR metadata.

2019-05-30 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm That was... easier and more painless than I would've imagined. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62635/new/ https://reviews.llvm.org

[PATCH] D62635: Add enums as global variables in the IR metadata.

2019-05-29 Thread Amy Huang via Phabricator via cfe-commits
akhuang created this revision. akhuang added a reviewer: rnk. Herald added subscribers: llvm-commits, cfe-commits, aprantl. Herald added projects: clang, LLVM. Keeps track of the enums that were used by saving them as DIGlobalVariables, since CodeView emits debug info for global constants. Repos