[PATCH] D128773: [BOLT] Add option to randomize function split point
Fabian Parzefall via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 29 10:45:16 PDT 2022
FPar marked 2 inline comments as done.
FPar added inline comments.
================
Comment at: bolt/lib/Passes/SplitFunctions.cpp:174
+ ParallelUtilities::WorkFuncTy WorkFun;
+ std::minstd_rand0 RandGen(opts::RandomSeed.getValue());
+ if (opts::RandomSplit)
----------------
yota9 wrote:
> It seems that it could be moved under proper WorkFun
If the generator is moved into the lambda and each function uses its own generator, all functions generate the same split point, depending on the seed. To get an actually random looking distribution of splits across functions, the work-function needs access to a shared random number generator.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128773/new/
https://reviews.llvm.org/D128773
More information about the llvm-commits
mailing list