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

Maksim Panchenko via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 28 17:02:12 PDT 2024


================
@@ -211,13 +211,6 @@ class X86MCPlusBuilder : public MCPlusBuilder {
     return false;
   }
 
-  // FIXME: For compatibility with old LLVM only!
-  bool isTerminator(const MCInst &Inst) const override {
-    unsigned Opcode = Inst.getOpcode();
-    return Info->get(Opcode).isTerminator() || X86::isUD1(Opcode) ||
-           X86::isUD2(Opcode);
----------------
maksfb wrote:

I'm dropping them only for the Linux kernel. For the rest, by default they will still terminate, but the condition check is modified with `isTrap()` check instead of the opcode lookup.

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


More information about the llvm-commits mailing list