[LLVMdev] Machine Level IR text-based serialization

bevinh at sics.se bevinh at sics.se
Mon Apr 27 01:37:56 PDT 2015


Hi Alex,

> I plan on developing a text-based, human readable format that allows 
> LLVM to
> serialize the machine level IR (The data structures like
> MachineFunction, etc. from CodeGen).
> 
> The motivation for this project is that it will enable easier testing
> of the CodeGen passes,
> and will allow developers to run tests that invoke just a single 
> CodeGen pass,
> or that start from a specific pass (llc's -start-after option).
> 
> I would be interested in hearing from other people who might be
> working on a similar
> project or have ideas in which direction this project should go. I
> will be posting
> an initial proposal for the format in a couple of days.

I have been working on a textual Machine IR for the past few months to
facilitate both testing and use of the internal Machine IR in external
tools related to code generation.

The solution we've employed isn't nearly feature complete and it's 
missing
a lot of data, including type data and globals/metadata from the IR, 
but it's
capable of performing the task you describe using -start-after, as well 
as
printing the Machine IR after a given pass with -stop-after.

Unfortunately I can't share any code as this is (currently) a closed
project, but I'd be very interested in hearing about/discussing the 
approach
to this problem and will be looking forward to hearing more about this 
in
the future!





More information about the llvm-dev mailing list