[llvm] [BOLT] Add split function support for the Linux kernel (PR #90541)

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 08:03:02 PDT 2024


================
@@ -715,6 +715,12 @@ Error SplitFunctions::runOnFunctions(BinaryContext &BC) {
   if (!opts::SplitFunctions)
     return Error::success();
 
+  if (BC.IsLinuxKernel && BC.BOLTReserved.empty()) {
+    BC.errs() << "BOLT-ERROR: split functions require reserved space in the "
----------------
dcci wrote:

longer term idea/ drive-by comment: having to remember to type `BOLT-ERROR:` every time is cognitive load we might want to avoid. Potentially we might want at some point to do a global mark-and-sweep and introduce something like `llvm::bolt::bolt_error()`, or something along these lines.

https://github.com/llvm/llvm-project/pull/90541


More information about the llvm-commits mailing list