Is there a tool to spit LLVM's IR out in a more machine-friendly syntax like

Nope, but, you could add one. :slight_smile: It should be a AST consumer.

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. :slight_smile:

John Clements

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