diff options
| author | Teresa Johnson <tejohnson@google.com> | 2025-05-09 16:28:49 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-09 16:28:49 -0700 |
| commit | a3d027f92308890c9b1ace7b8a5a7f7d69ce5f0e (patch) | |
| tree | 45ba68d909ef66ae61e50d2ce273ad854e995a5b /llvm/lib/AsmParser/LLParser.cpp | |
| parent | 34ecc4b9b8329a833234a84e4cf81c2b7741b4de (diff) | |
[MemProf] Disable alloc context in combined summary for ndebug builds (#139161)
Since we currently only use the context information in the alloc info
summary in the LTO backend for assertion checking, there is no need to
write this into the combined summary index for distributed ThinLTO for
NDEBUG builds. Put this under a new -combined-index-memprof-context
option which is off by default for NDEBUG.
The advantage is that we save time (not having to sort in preparation
for building the radix trees), and space in the generated bitcode files.
We could also do so for the callsite info records, but those are smaller
and less expensive to prepare.
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.cpp')
| -rw-r--r-- | llvm/lib/AsmParser/LLParser.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index 96f86eb52f15..2dfc8254d588 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -10781,12 +10781,15 @@ bool LLParser::parseMemProfs(std::vector<MIBInfo> &MIBs) { return true; SmallVector<unsigned> StackIdIndices; - do { - uint64_t StackId = 0; - if (parseUInt64(StackId)) - return true; - StackIdIndices.push_back(Index->addOrGetStackIdIndex(StackId)); - } while (EatIfPresent(lltok::comma)); + // Combined index alloc records may not have a stack id list. + if (Lex.getKind() != lltok::rparen) { + do { + uint64_t StackId = 0; + if (parseUInt64(StackId)) + return true; + StackIdIndices.push_back(Index->addOrGetStackIdIndex(StackId)); + } while (EatIfPresent(lltok::comma)); + } if (parseToken(lltok::rparen, "expected ')' in stackIds")) return true; |
