Xinfinity
2010-Oct-13 11:29 UTC
[LLVMdev] Values have no names when generating *.ll files in clang and llvm 2.8 ?
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? 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.
Chris Lattner
2010-Oct-13 18:36 UTC
[LLVMdev] Values have no names when generating *.ll files in clang and llvm 2.8 ?
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
Eli Friedman
2010-Oct-13 18:38 UTC
[LLVMdev] Values have no names when generating *.ll files in clang and llvm 2.8 ?
On Wed, Oct 13, 2010 at 4:29 AM, Xinfinity <xinfinity_a at yahoo.com> 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?opt -instnamer will assign names to a given LLVM assembly file. -Eli
Duncan Sands
2010-Oct-13 19:16 UTC
[LLVMdev] Values have no names when generating *.ll files in clang and llvm 2.8 ?
Hi Alexandra,> 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.with dragonegg using -fverbose-asm causes names to be generated in the IR. Maybe clang could do this to? Ciao, Duncan.
Chris Lattner
2010-Oct-13 20:58 UTC
[LLVMdev] Values have no names when generating *.ll files in clang and llvm 2.8 ?
On Oct 13, 2010, at 12:16 PM, Duncan Sands wrote:> Hi Alexandra, > >> 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. > > with dragonegg using -fverbose-asm causes names to be generated in the IR. > Maybe clang could do this to?This isn't a 2.8 change, the issue is that release-without-asserts builds don't add names on instructions (because IRBuilder gets a different argument). -Chris
Apparently Analagous Threads
- [LLVMdev] Values have no names when generating *.ll files in clang and llvm 2.8 ?
- [LLVMdev] Values have no names when generating *.ll files in clang and llvm 2.8 ?
- [LLVMdev] Values have no names when generating *.ll files in clang and llvm 2.8 ?
- [LLVMdev] Values have no names when generating *.ll files in clang and llvm 2.8 ?
- [LLVMdev] Values have no names when generating *.ll files in clang and llvm 2.8 ?