[PATCH] D129518: [BOLT] Add function layout class
Fabian Parzefall via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 12 08:00:55 PDT 2022
FPar marked an inline comment as done.
FPar added inline comments.
================
Comment at: bolt/include/bolt/Core/BinaryBasicBlock.h:678
+
+ void setIsCold(const bool Flag) { FragmentNum = Flag ? 1 : 0; }
----------------
yota9 wrote:
> Hello, I didn't investigate this patch carefully for now, but why FragmentNum needs to be unsigned? It seems it is used like previously used isCold flag.
>
It is unsigned, because it will be used to reference the fragment in which the basic block resides. You are correct that as of this patch there is only a hot and cold fragment and FragmentNum only assumes values 0 or 1. This will change with subsequent patches, in which support for multiple fragment splitting will be introduced.
For this patch, I'll change the definition of getFragmentNum() to depend on IsCold, and retain the original definition for isCold()/setIsCold().
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129518/new/
https://reviews.llvm.org/D129518
More information about the llvm-commits
mailing list