[llvm] [BOLT][Linux] Support ORC for alternative instructions (PR #96709)

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 26 16:36:16 PDT 2024


================
@@ -563,11 +563,28 @@ Error LinuxKernelRewriter::readORCTables() {
     if (!BF->hasInstructions())
       continue;
 
-    MCInst *Inst = BF->getInstructionAtOffset(IP - BF->getAddress());
-    if (!Inst)
+    const uint64_t Offset = IP - BF->getAddress();
+    MCInst *Inst = BF->getInstructionAtOffset(Offset);
+    if (!Inst) {
+      // Check if there is an alternative instruction(s) at this IP. Multiple
----------------
dcci wrote:

Great comment, thanks.

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


More information about the llvm-commits mailing list