[PATCH] D158280: [jitlink/rtdydl][checker] Construct disassembler at every decodeInst

Lang Hames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 29 22:11:13 PDT 2023


lhames added inline comments.


================
Comment at: llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp:299
+        return std::make_pair(EvalResult(ErrMsgStream.str()), "");
+      }
+      Inst.dump_pretty(ErrMsgStream, InstPrinter.get().get());
----------------
Eymay wrote:
> Is there a way we could try alternative triples when there is a fail? The reason is if somehow TargetFlag emission has a problem, the triple is wrong and MCDisassembler fails terribly. How should the error be handled in RuntimeDyld setting?
What would cause `TargetFlag` emission to be incorrect? Are you worried that we're missing cases in RuntimeDyld?

If we can fix those cases without too much trouble we should. If it's too tricky to fix RuntimeDyld I'd be ok with adding some special-case logic to the checker specifically for arm / thumb: if arm fails try thumb and vice-versa. We should add a fixme to remove this as soon as RuntimeDyld is gone. It might also be good to put the hack behind a mode flag that we set when the checker is created. If we're in "RuntimeDyldMode" then we try the triple swap, if we're in JITLink we don't. This would prevent us from silently masking errors in JITLink.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158280/new/

https://reviews.llvm.org/D158280



More information about the llvm-commits mailing list