[llvm] [BOLT] Skip functions with unsupported Linux kernel features (PR #86345)

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 22 14:56:20 PDT 2024


================
@@ -1305,6 +1334,27 @@ Error LinuxKernelRewriter::readAltInstructions() {
   return Error::success();
 }
 
+Error LinuxKernelRewriter::rewriteAltInstructions() {
+  // Disable output of functions with alt instructions before the rewrite
+  // support is complete.
+  for (BinaryFunction &BF : llvm::make_second_range(BC.getBinaryFunctions())) {
+    if (!BC.shouldEmit(BF))
+      continue;
+    for (const BinaryBasicBlock &BB : BF) {
+      if (!BC.shouldEmit(BF))
----------------
dcci wrote:

I think this might just be a typo and be `BB.shouldEmit()` instead maybe.

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


More information about the llvm-commits mailing list