Ivo
2009-Aug-24 22:05 UTC
[LLVMdev] asmwriting times (was Re: LLVMContext: Suggestions for API Changes)
On Monday 24 August 2009 23:27, Albert Graef wrote:> Thank you also for the hint about bitcode reading/writing. I'm aware of > this, but I actually prefer the .ll output because it's human-readable, > which is great for debugging purposes. I might add a bitcode writer some > time, but it's not a high priority for me right now.Isn't there a tool to turn bitcode into human readable text? I have been reading about the internals of LLVM lately (I'm planning on making a new backend) and the whole infrastructure reminds me a lot of the Amsterdam Compiler Kit (ACK). They had a program to turn binary EM code into ASCII, making it easy to dump the output to |more or less during debugging. --Ivo
Dale Johannesen
2009-Aug-24 22:10 UTC
[LLVMdev] asmwriting times (was Re: LLVMContext: Suggestions for API Changes)
On Aug 24, 2009, at 3:05 PMPDT, Ivo wrote:> On Monday 24 August 2009 23:27, Albert Graef wrote: >> Thank you also for the hint about bitcode reading/writing. I'm >> aware of >> this, but I actually prefer the .ll output because it's human- >> readable, >> which is great for debugging purposes. I might add a bitcode writer >> some >> time, but it's not a high priority for me right now. > > Isn't there a tool to turn bitcode into human readable text? I have > been > reading about the internals of LLVM lately (I'm planning on making a > new > backend) and the whole infrastructure reminds me a lot of the > Amsterdam > Compiler Kit (ACK). They had a program to turn binary EM code into > ASCII, > making it easy to dump the output to |more or less during debugging.Yes, llvm-dis is documented on the LLVM web site. Of course it does not run in zero time, which may be a consideration.
Jim Grosbach
2009-Aug-24 22:13 UTC
[LLVMdev] asmwriting times (was Re: LLVMContext: Suggestions for API Changes)
On Aug 24, 2009, at 3:05 PM, Ivo wrote:> On Monday 24 August 2009 23:27, Albert Graef wrote: >> Thank you also for the hint about bitcode reading/writing. I'm >> aware of >> this, but I actually prefer the .ll output because it's human- >> readable, >> which is great for debugging purposes. I might add a bitcode writer >> some >> time, but it's not a high priority for me right now. > > Isn't there a tool to turn bitcode into human readable text? I have > been > reading about the internals of LLVM lately (I'm planning on making a > new > backend) and the whole infrastructure reminds me a lot of the > Amsterdam > Compiler Kit (ACK). They had a program to turn binary EM code into > ASCII, > making it easy to dump the output to |more or less during debugging. >There's the llvm disassembler (llvm-dis), which works nicely. Albert, would that work for you? Might be a way to get a bit more performance with a mild convenience cost (needing to run the disassembler in order to examine IR) during debugging. -Jim
Albert Graef
2009-Aug-24 23:39 UTC
[LLVMdev] asmwriting times (was Re: LLVMContext: Suggestions for API Changes)
Jim Grosbach wrote:> There's the llvm disassembler (llvm-dis), which works nicely. Albert, > would that work for you? Might be a way to get a bit more performance > with a mild convenience cost (needing to run the disassembler in order > to examine IR) during debugging.Well, now that the performance bug in my code is solved, the speed of assembler generation is fine with me. Most Pure users don't do this anyway, either they just run their scripts in the interpreter or compile them to an executable or object file. For the latter, bitcode would indeed make things faster. As I said, I'm probably going to add that some time, but I'm still procrastinating so that maybe I wake up one day and find that the .o writer is already finished, so I can just use that instead. ;-) Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr.Graef at t-online.de, ag at muwiinfa.geschichte.uni-mainz.de WWW: http://www.musikinformatik.uni-mainz.de/ag
Apparently Analagous Threads
- [LLVMdev] asmwriting times (was Re: LLVMContext: Suggestions for API Changes)
- [LLVMdev] asmwriting times (was Re: LLVMContext: Suggestions for API Changes)
- [LLVMdev] asmwriting times (was Re: LLVMContext: Suggestions for API Changes)
- [LLVMdev] LLVMContext: Suggestions for API Changes
- [LLVMdev] LLVMContext: Suggestions for API Changes