[all-commits] [llvm/llvm-project] b244a4: [profi][NFC] Get rid of afdo_detail::TypeMap

Amir Ayupov via All-commits all-commits at lists.llvm.org
Tue Jun 6 13:48:51 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b244a4c4c92150eca3ae5c75323bb91bc4f83155
      https://github.com/llvm/llvm-project/commit/b244a4c4c92150eca3ae5c75323bb91bc4f83155
  Author: Amir Ayupov <aaupov at fb.com>
  Date:   2023-06-06 (Tue, 06 Jun 2023)

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

  Log Message:
  -----------
  [profi][NFC] Get rid of afdo_detail::TypeMap

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) in stale profile matching (D144500).

Reviewed By: hoy

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




More information about the All-commits mailing list