[LLVMdev] Question about local variables
Ryan Taylor
ryta1203 at gmail.com
Sat Oct 22 12:08:56 PDT 2011
Nick,
Unfortunately this doesn't answer my question I don't think. It seems
that -instnamer, as you mention, names the instructions but still does not
name the local variables.
So there really is no way to do this shy of creating (or basically
copying) the API from AsmWriter (seems very dedundant to me)? This seems
like a large failing?
On Fri, Oct 21, 2011 at 7:03 PM, Nick Lewycky <nicholas at mxc.ca> wrote:
> Ryan Taylor wrote:
>
>> It looks like the AsmWriter is generating the local variables (SlotNum)s
>> on the fly in that file (AsmWriter.cpp), so is there any way at all to
>> get this information from the operation itself, via Instruction, Value
>> or Type?
>>
>
> Nope! As you noticed, they're created on the fly...
>
> ...when the Value or Type is anonymous. If you want them to be persistent,
> values can have names via. the setName() call. "opt -instnamer" will name
> all your instructions, for example.
>
> Nick
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111022/d9b7d682/attachment.html>
More information about the llvm-dev
mailing list