<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2015-04-27 1:37 GMT-07:00  <span dir="ltr"><<a href="mailto:bevinh@sics.se" target="_blank">bevinh@sics.se</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi Alex,<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
I plan on developing a text-based, human readable format that allows LLVM to<br>
serialize the machine level IR (The data structures like<br>
MachineFunction, etc. from CodeGen).<br>
<br>
The motivation for this project is that it will enable easier testing<br>
of the CodeGen passes,<br>
and will allow developers to run tests that invoke just a single CodeGen pass,<br>
or that start from a specific pass (llc's -start-after option).<br>
<br>
I would be interested in hearing from other people who might be<br>
working on a similar<br>
project or have ideas in which direction this project should go. I<br>
will be posting<br>
an initial proposal for the format in a couple of days.<br>
</blockquote>
<br></span>
I have been working on a textual Machine IR for the past few months to<br>
facilitate both testing and use of the internal Machine IR in external<br>
tools related to code generation.<br>
<br>
The solution we've employed isn't nearly feature complete and it's missing<br>
a lot of data, including type data and globals/metadata from the IR, but it's<br>
capable of performing the task you describe using -start-after, as well as<br>
printing the Machine IR after a given pass with -stop-after.<br>
<br>
Unfortunately I can't share any code as this is (currently) a closed<br>
project, but I'd be very interested in hearing about/discussing the approach<br>
to this problem and will be looking forward to hearing more about this in<br>
the future!<br></blockquote><div><br></div><div style="font-size:13px">That's great that you've got it working! I would be interested in hearing more details</div><div style="font-size:13px">about the format and the approach that you chose.</div><div style="font-size:13px"><br></div><div style="font-size:13px">Btw, my proposal is now up: <a href="http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-April/084932.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-April/084932.html</a>.</div><div style="font-size:13px">It's quite high level right now, but I would be interested in hearing your thoughts on the</div><div style="font-size:13px">proposed format.</div><div style="font-size:13px"> </div><div style="font-size:13px">Cheers,</div><div><span style="font-size:13px">Alex.</span> </div></div><br></div></div>