[llvm] [ThinLTO]Record import type (declaration or definition) in GlobalValueSummary::GVFlags (PR #87597)
Mingming Liu via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 5 11:01:09 PDT 2024
================
@@ -737,6 +737,7 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(live);
KEYWORD(dsoLocal);
KEYWORD(canAutoHide);
+ KEYWORD(importAsDec);
----------------
minglotus-6 wrote:
IIUC your point is the new field in `struct GVFlags` should carry 3 states in the field, `Definition`, `Declaration` and `Summary` since there is a known use case for import summaries.
I can see two different ways to do that
1. Rename `importAsDec` to `importType` and make it two bits.
2. Keep the current way to represent def vs decl. For the import summary use case, add another one-bit field.
I like 1 better since join two 1-bit fields to represent 3 states is not very natural. If this sounds good, I could make the change.
https://github.com/llvm/llvm-project/pull/87597
More information about the llvm-commits
mailing list