[PATCH] D152187: [profi][NFC] Get rid of afdo_detail::TypeMap

Amir Ayupov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 5 12:14:51 PDT 2023


Amir created this revision.
Herald added subscribers: wlei, ormris, wenlei, hiraditya.
Herald added a project: All.
Amir requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Parametrize SampleProfileInference and SampleProfileLoaderBaseImpl by function
type (Function/MachineFunction) instead of block type
(BasicBlock/MachineBasicBlock). Move out specializations to appropriate
locations.

This change makes it possible to use GraphTraits instead of a custom TypeMap and
make SampleProfileInference not dependent on LLVM types, paving the way for
generalizing SampleProfileInference interfaces to BOLT IR types
(BinaryFunction/BinaryBasicBlock).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D152187

Files:
  llvm/include/llvm/Transforms/Utils/SampleProfileInference.h
  llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h
  llvm/lib/CodeGen/MIRSampleProfile.cpp
  llvm/lib/Transforms/IPO/SampleProfile.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152187.528538.patch
Type: text/x-patch
Size: 8122 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230605/7aa6c4cc/attachment.bin>


More information about the llvm-commits mailing list