[LLVMdev] Values have no names when generating *.ll files in clang and llvm 2.8 ?

Chris Lattner clattner at apple.com
Wed Oct 13 11:36:42 PDT 2010


On Oct 13, 2010, at 4:29 AM, Xinfinity wrote:

> 
> Hello,
> 
> I upgraded to llvm 2.8 and when I generate *.ll files from C/C++ with
> clang -S -emit-llvm I obtain a *.ll file in which instructions and
> basicblocks have no names.
> I tried as well compiling with the -g option, but no names were given.
> 
> In the release notes it is indicated to use "--show-annotations"  to print
> the number of uses. Is there something similar for assigning names to
> values, as in the previous llvm versions?

Yep, run the .ll file through the "opt -instnamer" pass.

-Chris


> 
> I prefer the version from llvm 2.7 :
> do.cond24:                                        ; preds = %if.end
>  %tmp25 = load i32* %i                           ; <i32> [#uses=1]
>  %cmp26 = icmp ult i32 %tmp25, 20                ; <i1> [#uses=1]
>  br i1 %cmp26, label %land.lhs.true, label %land.end
> 
> than llvm 2.8 :
> 
> ; <label>:9                                       ; preds = %56, %0
>  %10 = load i32* %k, align 4
>  %11 = icmp ult i32 %10, 5
>  br i1 %11, label %12, label %57
> 
> 
> Thank you,
> Alexandra
> 
> -- 
> View this message in context: http://old.nabble.com/Values-have-no-names-when-generating-*.ll-files-in-clang-and-llvm-2.8----tp29951743p29951743.html
> Sent from the LLVM - Dev mailing list archive at Nabble.com.
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev





More information about the llvm-dev mailing list