[LLVMdev] Get Name of numbered variables

Paul Sokolovsky pmiscml at gmail.com
Sat Feb 23 16:34:42 PST 2013


Hello,

On Fri, 22 Feb 2013 16:11:17 +0100
Blind Faith <person.of.book at gmail.com> wrote:

> You can get the name of a variable by using the method getName() of
> llvm::Value. However it returns a blank string if the variable is a
> numbered variable, such as %11. How can I make it return %11 in such
> case.

I'd like to second this question. Looking at the source, the numbered
vars are just checked for being sequential and dropped. Well, that may
be understood given sequentiality constraint (what if other
instructions inserted inbetween later), but is there other
human-readable unique identifier for each instruction?

More generally, is it possible to get parsed, but linear 
LLVM IR (corresponding to LLVM assembly)? - otherwise it seems DAG is
constructed straight on IR load.

-- 
Best regards,
 Paul                          mailto:pmiscml at gmail.com



More information about the llvm-dev mailing list