<div dir="ltr">Hi,<div><br></div><div>The MIR serialization format is a new, text-based, human readable serialization format that represents LLVM's machine-specific IR.</div><div>I have worked on it for the last couple of months, and despite some of the limitations that it currently has, I feel that it's ready to </div><div>be used to test some of the code generation passes in LLVM. There are several MIR tests in trunk already, e.g.: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/expand-vr64-gr64-copy.mir?revision=244982&view=co">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/expand-vr64-gr64-copy.mir?revision=244982&view=co</a> .</div><div><br></div><div>There are two ways you can use the MIR format:</div><div>- You can write MIR tests and test individual code generation passes using the 'run-pass' option in llc.</div><div>- You can write LLVM assembly tests and use the 'stop-after' option in llc. This will allow you to verify <span style="line-height:normal">that a specific code generation pass produces the expected MIR.</span></div><div><br></div><div>The "MIR Testing Guide" section in the MIR docs (<a href="http://llvm.org/docs/MIRLangRef.html#mir-testing-guide">http://llvm.org/docs/MIRLangRef.html#mir-testing-guide</a>) has more</div><div>information about how the MIR format can be used for tests. It also describes some of the current MIR limitations.</div><div><br></div><div>The MIR syntax is partially covered by the current docs <span style="line-height:normal">(<a href="http://llvm.org/docs/MIRLangRef.html">http://llvm.org/docs/MIRLangRef.html</a>). </span>Right now the <span style="line-height:normal">syntax reference </span></div><div><span style="line-height:normal">is quite sparse, but you can expect this to change in the future. </span><span style="line-height:normal">I'm also working on patches that fix some of the </span>existing</div><div><span style="line-height:normal">limitations by extending the MIR format and serializing the target-specific </span><span style="line-height:normal">state that </span><span style="line-height:normal">is not serialized at the moment.</span></div><div><span style="line-height:normal"><br></span></div><div>Feel free to email me if you have any questions about the new format!</div><div><div><br></div><div>Thanks,</div><div>Alex</div></div></div>