[PATCH] D125743: [outliner] Use profile data to avoid outlining hot blocks
Ellis Hoag via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 17 15:16:56 PDT 2022
ellis added inline comments.
================
Comment at: llvm/lib/CodeGen/MachineOutliner.cpp:911
+ if (!RunOnAllFunctions && !TII->shouldOutlineFromFunctionByDefault(*MF) &&
+ !UseProfileData)
continue;
----------------
kyulee wrote:
> I'm not sure I understand this correctly. When UseProfileData is true, do we ignore the other two conditions?
There are basically three reasons why the machine outliner would run.
1. If `RunOnAllFunctions` is true
2. If `shouldOutlineFromFunctionByDefault()` is true.
a. Currently this only happens when targeting arm64 with minsize.
3. If we pass `-machine-outliner-use-profile-data`
On second thought I should also check `F.hasProfileData()` so that we don't conservatively assume unprofiled functions are always hot.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125743/new/
https://reviews.llvm.org/D125743
More information about the llvm-commits
mailing list