Those are the ones I am refering to. The description for instnamer says that it names unnamed instructions (not operands), or am I confused on the terminology here?<br><br>For example, if I print out I->getName I get "add" not "x" or "y", but when I do Value *V = I->getOperands(loop) and then do V->getName, then it prints out the name of the operand. Am I going about this backwards? It sounds like it from the terminology you are using (calling an operand an instruction).<br>
<br>I don't mean to be contentious (as I really appreciate your time and help) but apparently someone does use it, me. When going from source to source it's needed to keep track of the variables. Or am I missing something here too?<br>
<br><br><br><div class="gmail_quote">On Sat, Oct 22, 2011 at 12:51 PM, Nick Lewycky <span dir="ltr"><<a href="mailto:nicholas@mxc.ca">nicholas@mxc.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">Ryan Taylor wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Nick,<br>
<br>
    Unfortunately this doesn't answer my question I don't think. It<br>
seems that -instnamer, as you mention, names the instructions but still<br>
does not name the local variables.<br>
</blockquote>
<br></div>
What other local variables are you referring to? When AsmWriter prints "%y = add i32 %x, 1", the name of that add instruction is "y" and "x" is the name of another instruction or argument. If it has no name, the AsmWriter emits a number ("%0"), by counting from the top. The only other locals could be function arguments, and instnamer names those too.<div class="im">
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
    So there really is no way to do this shy of creating (or basically<br>
copying) the API from AsmWriter (seems very dedundant to me)? This seems<br>
like a large failing?<br>
</blockquote>
<br></div>
Correct, you'd have to copy that logic.<br>
<br>
It's not a large failing because nobody uses names of non-globals for anything. When we want to refer to a value, we use the Value*.<br><font color="#888888">
<br>
Nick<br>
<br>
</font><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
On Fri, Oct 21, 2011 at 7:03 PM, Nick Lewycky <<a href="mailto:nicholas@mxc.ca" target="_blank">nicholas@mxc.ca</a><br></div><div class="im">
<mailto:<a href="mailto:nicholas@mxc.ca" target="_blank">nicholas@mxc.ca</a>>> wrote:<br>
<br>
    Ryan Taylor wrote:<br>
<br>
        It looks like the AsmWriter is generating the local variables<br>
        (SlotNum)s<br>
        on the fly in that file (AsmWriter.cpp), so is there any way at<br>
        all to<br>
        get this information from the operation itself, via Instruction,<br>
        Value<br>
        or Type?<br>
<br>
<br>
    Nope! As you noticed, they're created on the fly...<br>
<br>
    ...when the Value or Type is anonymous. If you want them to be<br>
    persistent, values can have names via. the setName() call. "opt<br>
    -instnamer" will name all your instructions, for example.<br>
<br>
    Nick<br>
<br>
<br>
</div></blockquote>
<br>
</blockquote></div><br>