[PATCH] D140949: [MemProf] Context disambiguation cloning pass [patch 2/3]

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 3 20:25:07 PST 2023


tejohnson created this revision.
tejohnson added reviewers: snehasish, davidxl.
Herald added subscribers: ormris, steven_wu, mgrang, hiraditya.
Herald added a project: All.
tejohnson requested review of this revision.
Herald added a project: LLVM.

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 <https://reviews.llvm.org/D140908>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D140949

Files:
  llvm/lib/Transforms/IPO/PGHOContextDisambiguation.cpp
  llvm/test/ThinLTO/X86/pgho-basic.ll
  llvm/test/ThinLTO/X86/pgho-duplicate-context-ids.ll
  llvm/test/ThinLTO/X86/pgho-indirectcall.ll
  llvm/test/ThinLTO/X86/pgho-inlined.ll
  llvm/test/Transforms/PGHOContextDisambiguation/basic.ll
  llvm/test/Transforms/PGHOContextDisambiguation/duplicate-context-ids.ll
  llvm/test/Transforms/PGHOContextDisambiguation/indirectcall.ll
  llvm/test/Transforms/PGHOContextDisambiguation/inlined.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140949.486156.patch
Type: text/x-patch
Size: 70240 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230104/743d8b18/attachment-0001.bin>


More information about the llvm-commits mailing list