[llvm-dev] Convert Register Names to String

Ahmad Nouralizadeh Khorrami via llvm-dev llvm-dev at lists.llvm.org
Sun Nov 11 05:38:52 PST 2018


Hi.
I want to do a cutomized points-to analysis on IR. Suppose that we have:
*%91 = bitcast i8* %90 to %struct.demux_packet*, !dbg !2688*

I want to store sth similar to %91 -> target of %90, which records the
target of pointer named %91. How can I access the names (Here, %90 and %91)?
I know that I can put the whole line for an instruction into a string,
using the following code:
*string str;*
*llvm::raw_string_ostream ss(str);*
*inst->print(ss);*

But a postprocessing will be needed. I need to parse for parameters which
will not be easy in the general case. I appreciate any help.
Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181111/b4b2e6ea/attachment.html>


More information about the llvm-dev mailing list