[PATCH] D141511: [ARM] Use MCInstrInfo::get in ARMDisassembler instead of reinventing it

Simon Tatham via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 12 05:36:06 PST 2023


simon_tatham accepted this revision.
simon_tatham added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp:1638
+  const MCInstrInfo *MCII =
+      static_cast<const ARMDisassembler *>(Decoder)->MCII.get();
+  if (Val != ARMCC::AL && !MCII->get(Inst.getOpcode()).isPredicable())
----------------
foad wrote:
> It is slightly ugly having to down-cast here but I assume it is safe.
It happens in several other places already in this file, and in similar situations in quite a few other backends, so I agree that looks safe.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141511



More information about the llvm-commits mailing list