[all-commits] [llvm/llvm-project] 474594: [MemProf] ThinLTO summary support

Teresa Johnson via All-commits all-commits at lists.llvm.org
Tue Nov 15 06:45:38 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 47459455009db4790ffc3765a2ec0f8b4934c2a4
      https://github.com/llvm/llvm-project/commit/47459455009db4790ffc3765a2ec0f8b4934c2a4
  Author: Teresa Johnson <tejohnson at google.com>
  Date:   2022-11-15 (Tue, 15 Nov 2022)

  Changed paths:
    M llvm/include/llvm/Analysis/MemoryProfileInfo.h
    M llvm/include/llvm/AsmParser/LLParser.h
    M llvm/include/llvm/AsmParser/LLToken.h
    M llvm/include/llvm/AsmParser/Parser.h
    M llvm/include/llvm/Bitcode/BitcodeReader.h
    M llvm/include/llvm/Bitcode/LLVMBitCodes.h
    M llvm/include/llvm/IR/ModuleSummaryIndex.h
    M llvm/include/llvm/IR/ModuleSummaryIndexYAML.h
    M llvm/lib/Analysis/MemoryProfileInfo.cpp
    M llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
    M llvm/lib/AsmParser/LLLexer.cpp
    M llvm/lib/AsmParser/LLParser.cpp
    M llvm/lib/AsmParser/Parser.cpp
    M llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp
    M llvm/lib/Bitcode/Reader/BitcodeReader.cpp
    M llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
    M llvm/lib/IR/AsmWriter.cpp
    M llvm/lib/LTO/LTO.cpp
    A llvm/test/Assembler/thinlto-memprof-summary.ll
    A llvm/test/ThinLTO/X86/memprof-summary.ll
    M llvm/unittests/Analysis/MemoryProfileInfoTest.cpp

  Log Message:
  -----------
  [MemProf] ThinLTO summary support

Implements the ThinLTO summary support for memprof related metadata.

This includes support for the assembly format, and for building the
summary from IR during ModuleSummaryAnalysis.

To reduce space in both the bitcode format and the in memory index,
we do 2 things:
1. We keep a single vector of all uniq stack id hashes, and record the
   index into this vector in the callsite and allocation memprof
   summaries.
2. When building the combined index during the LTO link, the callsite
   and allocation memprof summaries are only kept on the FunctionSummary
   of the prevailing copy.

Differential Revision: https://reviews.llvm.org/D135714




More information about the All-commits mailing list