The duplication of code to get various properties of the instructions between BOLT's AArch64MCPlusBuilder and AArch64InstrInfo from LLVM core was mentioned several times throughout discussing the patches for gadget scanner:
Creating a dedicated issue on this topic.