Is there a tool to spit LLVM's IR out in a more machine-friendly syntax like XML? -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e
On Feb 4, 2009, at 4:19 PM, Jon Harrop wrote:> Is there a tool to spit LLVM's IR out in a more machine-friendly > syntax like XML?Nope, but, you could add one. :-) It should be a AST consumer.
On Wed, Feb 4, 2009 at 19:19, Jon Harrop <jon at ffconsultancy.com> wrote:> > Is there a tool to spit LLVM's IR out in a more machine-friendly syntax like > XML? >It seems like the correct, if unhelpful, answer to that is bitcode, which is far more machine-friendly (by my definition) than XML. What's your eventual goal?
On Feb 4, 2009, at 5:11 PM, me22 wrote:> On Wed, Feb 4, 2009 at 19:19, Jon Harrop <jon at ffconsultancy.com> > wrote: >> >> Is there a tool to spit LLVM's IR out in a more machine-friendly >> syntax like >> XML? >> > > It seems like the correct, if unhelpful, answer to that is bitcode, > which is far more machine-friendly (by my definition) than XML. > > What's your eventual goal?I'm not the one who asked, but I would love to see something like this, not because it's more machine-friendly, but because it's a representation that most languages can handle. To wit: I'm manipulating IR in Scheme. If there was a two-way map between XML terms and LLVM IR, my life would be much simpler. S-expressions would be even better, but I'm not holding my breath. :) John Clements
On Thursday 05 February 2009 01:11:51 me22 wrote:> On Wed, Feb 4, 2009 at 19:19, Jon Harrop <jon at ffconsultancy.com> wrote: > > Is there a tool to spit LLVM's IR out in a more machine-friendly syntax > > like XML? > > It seems like the correct, if unhelpful, answer to that is bitcode, > which is far more machine-friendly (by my definition) than XML.I am toying with the idea of a managed IR that converts LLVM IR into code for my VM that runs in a safe environment, allowing code compiled from any of LLVM's front-ends (C, C++, Fortran) to be run in a managed environment and then interoperated with more easily (and safely) from other managed languages. -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e