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

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 5 10:44:52 PST 2023


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

Applies cloning decisions to the IR, cloning functions and updating
calls. For Regular LTO, the IR is updated directly during function
assignment, whereas for ThinLTO it is recorded in the summary index and
applied to the IR via the index during the ThinLTO backend. The function
assignment and cloning proceeds greedily, and we create new clones as
needed when we find an incompatible assignment of function clones to
callsite clones (i.e. when different callers need to invoke different
combinations of callsite clones).

Depends on D140949 <https://reviews.llvm.org/D140949>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D141077

Files:
  llvm/include/llvm/Analysis/ModuleSummaryAnalysis.h
  llvm/include/llvm/IR/InstrTypes.h
  llvm/include/llvm/IR/ModuleSummaryIndex.h
  llvm/include/llvm/Transforms/IPO/PGHOContextDisambiguation.h
  llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
  llvm/lib/Bitcode/Reader/BitcodeReader.cpp
  llvm/lib/IR/ModuleSummaryIndex.cpp
  llvm/lib/Passes/PassBuilderPipelines.cpp
  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-funcassigncloning.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/funcassigncloning.ll
  llvm/test/Transforms/PGHOContextDisambiguation/indirectcall.ll
  llvm/test/Transforms/PGHOContextDisambiguation/inlined.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141077.486628.patch
Type: text/x-patch
Size: 138366 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230105/c5125b04/attachment-0001.bin>


More information about the llvm-commits mailing list