[all-commits] [llvm/llvm-project] c3e337: [NFC] Refactor MBB hotness/coldness into templated...
Han Shen via All-commits
all-commits at lists.llvm.org
Mon Jun 26 21:58:08 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c3e33720403c010e140c17313eeefd9a0f25887a
https://github.com/llvm/llvm-project/commit/c3e33720403c010e140c17313eeefd9a0f25887a
Author: Han Shen <shenhan at google.com>
Date: 2023-06-26 (Mon, 26 Jun 2023)
Changed paths:
M llvm/include/llvm/Analysis/ProfileSummaryInfo.h
M llvm/include/llvm/Transforms/Utils/SizeOpts.h
M llvm/lib/Analysis/ProfileSummaryInfo.cpp
M llvm/lib/CodeGen/MachineSizeOpts.cpp
M llvm/lib/Transforms/Utils/SizeOpts.cpp
Log Message:
-----------
[NFC] Refactor MBB hotness/coldness into templated PSI functions.
In D152399, we calculate BPI->BFI in MachineFunctionSplit pass just to
use PSI->isFunctionHotInCallGraph, which is expensive. Instead, we can
implement this directly with MBFI.
Reviewer mentioned in the comment, that machine_size_opts already has
isFunctionColdInCallGraph, isFunctionHotInCallGraphNthPercentile, etc
implemented. These can be refactored and reused across MFS and machine
size opts.
This CL does this - it refactors out those internal static functions
into PSI as templated functions, so they can be accessed easily.
Differential Revision: https://reviews.llvm.org/D152758
More information about the All-commits
mailing list