[PATCH] D128773: [BOLT] Add option to randomize function split point
Amir Ayupov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 29 01:11:20 PDT 2022
Amir added a comment.
Thank you for working on this!
================
Comment at: bolt/lib/Passes/SplitFunctions.cpp:147-150
+ LLVM_DEBUG(dbgs() << formatv("BOLT-DEBUG: randomly chose last {0} (out of "
+ "{1} possible) blocks to split\n",
+ ColdEnd - OutlineableBegin,
+ OutlineableEnd - OutlineableBegin));
----------------
As a matter of preference - I try to wrap LLVM_DEBUG body with curly braces to indent it just like a regular code block.
================
Comment at: bolt/test/X86/split-random.s:6
+# RUN: llvm-bolt %t.exe -o %t.out --split-functions --split-random \
+# RUN: --print-finalized --print-only=two_block 2>&1 | FileCheck %s
+
----------------
The test looks good and very clean! There's just one concern with regards to our NFC testing - I think we should specify the seed as an option to ensure identical binaries between runs.
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