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
Duncan Sands
2010-Oct-14 07:21 UTC
[LLVMdev] Values have no names when generating *.ll files in clang and llvm 2.8 ?
Hi Chris,> 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).having the output of clang depend on whether clang was built with assertions on or not sounds like a bad idea to me. Ciao, Duncan.
John McCall
2010-Oct-14 08:13 UTC
[LLVMdev] Values have no names when generating *.ll files in clang and llvm 2.8 ?
On Oct 14, 2010, at 12:21 AM, Duncan Sands wrote:>> 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). > > having the output of clang depend on whether clang was built with assertions > on or not sounds like a bad idea to me.While I agree in the abstract that this is an independent choice from assertions and optimization, I'm not convinced that it's an important enough feature to seriously complicate our configuration over. Nobody really wants names unless they're debugging a compiler, and even then they're not crucial. They should be on by default as long as Debug builds are the default, but we don't want people to unintentionally make production compilers with names enabled. I think there's a case to be made that we should kill names based on --enable-optimized instead of --disable-assertions. The only problem is that --enable-optimized doesn't actually turn into a -D right now. John.
Maybe Matching 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 ?