[all-commits] [llvm/llvm-project] d0649a: [MemProf] Context disambiguation cloning pass [pat...

Teresa Johnson via All-commits all-commits at lists.llvm.org
Fri Apr 21 14:32:04 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d0649a6ad8be778abf7569f502148d577f8bc6f1
      https://github.com/llvm/llvm-project/commit/d0649a6ad8be778abf7569f502148d577f8bc6f1
  Author: Teresa Johnson <tejohnson at google.com>
  Date:   2023-04-21 (Fri, 21 Apr 2023)

  Changed paths:
    M llvm/include/llvm/IR/ModuleSummaryIndex.h
    M llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
    M llvm/test/ThinLTO/X86/memprof-basic.ll
    M llvm/test/ThinLTO/X86/memprof-duplicate-context-ids.ll
    M llvm/test/ThinLTO/X86/memprof-indirectcall.ll
    M llvm/test/ThinLTO/X86/memprof-inlined.ll
    M llvm/test/Transforms/MemProfContextDisambiguation/basic.ll
    M llvm/test/Transforms/MemProfContextDisambiguation/duplicate-context-ids.ll
    M llvm/test/Transforms/MemProfContextDisambiguation/indirectcall.ll
    M llvm/test/Transforms/MemProfContextDisambiguation/inlined.ll

  Log Message:
  -----------
  [MemProf] Context disambiguation cloning pass [patch 2/3]

Performs cloning on the CallsiteContextGraph (not on the IR or summary
index), in order to uniquely identify the allocation behavior of an
allocation call given its context. In order to do this, the graph is
recursively traversed starting from the allocation nodes, until we
identify a point where the allocation behavior is unambiguous (the edges
have a single allocation type). Nodes are then cloned as we unwind the
recursion. We try to perform the minimal amount of cloning required to
disambiguate the contexts.

The follow-on patch will contain the support for applying the cloning to
the IR.

Depends on D140908 and D145836.

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




More information about the All-commits mailing list