diff options
| author | Teresa Johnson <tejohnson@google.com> | 2025-10-22 07:30:43 -0700 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-22 07:30:43 -0700 | 
| commit | eb74d8e03cef0bb29bccf221f5ea565e47d7ab26 (patch) | |
| tree | e323ac29b8982053569ed74bdb96a5d3c8689965 /llvm/lib/IR/ModuleSummaryIndex.cpp | |
| parent | 7ae7a5ad51f32118161ee0aaa13b11368aa5d29b (diff) | |
| download | llvm-eb74d8e03cef0bb29bccf221f5ea565e47d7ab26.zip llvm-eb74d8e03cef0bb29bccf221f5ea565e47d7ab26.tar.gz llvm-eb74d8e03cef0bb29bccf221f5ea565e47d7ab26.tar.bz2  | |
[ThinLTO] Add index flag for internalization/promotion status (#164530)
Add an index-wide flag indicating whether index-based internalization
and promotion have completed. This will be used in a follow on change.
Diffstat (limited to 'llvm/lib/IR/ModuleSummaryIndex.cpp')
| -rw-r--r-- | llvm/lib/IR/ModuleSummaryIndex.cpp | 8 | 
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/IR/ModuleSummaryIndex.cpp b/llvm/lib/IR/ModuleSummaryIndex.cpp index a6353664..62fd62c 100644 --- a/llvm/lib/IR/ModuleSummaryIndex.cpp +++ b/llvm/lib/IR/ModuleSummaryIndex.cpp @@ -111,11 +111,13 @@ uint64_t ModuleSummaryIndex::getFlags() const {      Flags |= 0x100;    if (hasUnifiedLTO())      Flags |= 0x200; +  if (withInternalizeAndPromote()) +    Flags |= 0x400;    return Flags;  }  void ModuleSummaryIndex::setFlags(uint64_t Flags) { -  assert(Flags <= 0x2ff && "Unexpected bits in flag"); +  assert(Flags <= 0x7ff && "Unexpected bits in flag");    // 1 bit: WithGlobalValueDeadStripping flag.    // Set on combined index only.    if (Flags & 0x1) @@ -154,6 +156,10 @@ void ModuleSummaryIndex::setFlags(uint64_t Flags) {    // Set on combined index only.    if (Flags & 0x200)      setUnifiedLTO(); +  // 1 bit: WithInternalizeAndPromote flag. +  // Set on combined index only. +  if (Flags & 0x400) +    setWithInternalizeAndPromote();  }  // Collect for the given module the list of function it defines  | 
