[all-commits] [llvm/llvm-project] 6103b6: [SampleFDO][NFC] Refactor: make SampleProfileLoade...

xur-llvm via All-commits all-commits at lists.llvm.org
Thu Feb 25 08:27:13 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6103b6ad69fed0fe300f518b5115837cf6b74148
      https://github.com/llvm/llvm-project/commit/6103b6ad69fed0fe300f518b5115837cf6b74148
  Author: Rong Xu <xur at google.com>
  Date:   2021-02-25 (Thu, 25 Feb 2021)

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

  Log Message:
  -----------
  [SampleFDO][NFC] Refactor: make SampleProfileLoaderBaseImpl a template class

This patch makes SampleProfileLoaderBaseImpl a template class so it
can be used in CodeGen transformation.

Noticeable changes:
 * use one template parameter and use IRTraits to get other used
   types an type specific functions.
 * remove the temporary "inline" keywords in previous refactor
   patch.
 * change the template function findEquivalencesFor to a regular
   function. This function has a single caller with type of
   PostDominatorTree. It's simpler to use the type directly
   because MachinePostDominatorTree is not a derived type of
   template DominatorTreeBase.

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




More information about the All-commits mailing list