[llvm-dev] Dump LLVM StoreInst
Zhou Zhizhong via llvm-dev
llvm-dev at lists.llvm.org
Fri Mar 9 09:18:27 PST 2018
Hi,
I’m writing a loop-free LLVM pass, my thought is to track if the value inside the loop is changed, so I look up the Instruction StoreInst first and try to get its value in a set. I checked getValueOperand(), getValueName() in the API document but unfortunately they failed the compilation.
if (isa<StoreInst>(I)){
Value* v = I.getOperand(0);
Instruction* op1 = dyn_cast<Instruction>(v);
errs()<< v << "\t" << v1-getName()<<"\t"<<op<<\n"
}
Any suggestions on this?
Thanks,
Ethan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 15895 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180309/17fc0773/attachment.bin>
More information about the llvm-dev
mailing list