[llvm-dev] How to get all opcode of the same type?

fateme Hoseini via llvm-dev llvm-dev at lists.llvm.org
Wed Jun 15 14:29:04 PDT 2016


Hi,
I need to find all load/ store instructions in the machine code. for this
purpose, I find all the load/ store opcodes and compare the instruction
opcode to them, for example:

mInst->getOpcode()== ARM::LDRi12 || mInst->getOpcode()== ARM::LDRBi12 ||
mInst->getOpcode()== ARM::LDRD || mInst->getOpcode()== ARM::LDRH ||....

to find all Load instructions. This way, I have to do many comparisons and
I'm not sure if I have a complete list of store/load instructions (I found
the instructions from ARMInstrInfo.cpp for ARM backend).
Is there an easier way to get all Load/Stores in the machine code?
Thanks,
Fateme
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160615/6c2c49fd/attachment.html>


More information about the llvm-dev mailing list