mayuyu.io via llvm-dev
2019-Jan-16 15:44 UTC
[llvm-dev] How to get the string representation of an instruction?
he probably means text representation like in text IR Zhang> 在 2019年1月16日,15:42,Ryan Taylor via llvm-dev <llvm-dev at lists.llvm.org> 写道: > > Is Value::getName() not what you want? > >> On Wed, Jan 16, 2019 at 10:25 AM Peng Yu via llvm-dev <llvm-dev at lists.llvm.org> wrote: >> Hi, >> >> I don't see a way to convert an Instruction to a string or const char >> *, although '<<' works on it. >> >> http://llvm.org/doxygen/classllvm_1_1Instruction.html >> >> How to figure this out? Thanks. >> >> -- >> Regards, >> Peng >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190116/8a111299/attachment.html>
Peng Yu via llvm-dev
2019-Jan-16 15:54 UTC
[llvm-dev] How to get the string representation of an instruction?
Yes. Something like "store i32 %4, i32* @u.3, align 4, !dbg !22".> he probably means text representation like in text IR-- Regards, Peng
Ryan Taylor via llvm-dev
2019-Jan-16 15:59 UTC
[llvm-dev] How to get the string representation of an instruction?
Value::print(..)? On Wed, Jan 16, 2019 at 10:54 AM Peng Yu <pengyu.ut at gmail.com> wrote:> Yes. Something like "store i32 %4, i32* @u.3, align 4, !dbg !22". > > > he probably means text representation like in text IR > > -- > Regards, > Peng >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190116/2255aaa3/attachment.html>