fateme Hoseini via llvm-dev
2016-Jun-15 21:29 UTC
[llvm-dev] How to get all opcode of the same type?
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>
Krzysztof Parzyszek via llvm-dev
2016-Jun-15 21:30 UTC
[llvm-dev] How to get all opcode of the same type?
On 6/15/2016 4:29 PM, fateme Hoseini via llvm-dev wrote:> > Is there an easier way to get all Load/Stores in the machine code?You could use MI->mayLoad() and MI->mayStore(). -Krzysztof -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation