[llvm] [BOLT] Don't terminate on trap instruction for Linux kernel (PR #87021)

Vladislav Khmelevsky via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 30 22:47:46 PDT 2024


================
@@ -121,6 +130,11 @@ bool MCPlusBuilder::equals(const MCTargetExpr &A, const MCTargetExpr &B,
   llvm_unreachable("target-specific expressions are unsupported");
 }
 
+bool MCPlusBuilder::isTerminator(const MCInst &Inst) const {
+  return Analysis->isTerminator(Inst) ||
+         (opts::TerminalTrap && Info->get(Inst.getOpcode()).isTrap());
----------------
yota9 wrote:

@maksfb Hi! Currently I don't think it is a huge problem

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


More information about the llvm-commits mailing list