<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2015-04-28 10:14 GMT-07:00 Quentin Colombet <span dir="ltr"><<a href="mailto:qcolombet@apple.com" target="_blank">qcolombet@apple.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Alex,<div><br></div><div>Thanks for working on this.</div><div><br></div><div>Personally I would rather not have to write YAML inputs but instead resort on the what the machine dumps look like. That being said, I can live with YAML :).</div><div><br></div><div>More importantly, how do you plan to report syntax errors to the users?</div><div>Things like invalid instruction, invalid registers, etc.?</div><div>What about unallocated code, i.e., virtual registers, invalid SSA form, etc.?</div><div><br></div><div>Cheers,</div><div>Q.<br></div></div></blockquote><div><br></div><div>Thanks,</div><div><br></div><div>Unfortunately, the machine dumps are quite incomplete (and tricky to parse too!), and thus some sort of new syntax has to be developed.</div><div>I think that a YAML based container is a good candidate for this purpose, as it has a structured format that represents things like machine functions,</div><div>frame information, register information, target specific machine function details, etc in a clear and readable way.</div><div><br></div><div>I haven't thought about error reporting that much, as I've been mostly working on developing the syntax and making sure that all the data structures</div><div>can be represented by it. But I believe that the errors that crop up in an invalid machine instruction syntax, like invalid basic block references, invalid instructions,</div><div>etc. can be reported quite well and I can rely on already existing error reporting facilities in LLVM to help me. The more structural errors, like missing attributes </div><div>will be handled by the YAML parser automatically, and I might extend it to provide better/more specific error messages. And I think that it's possible</div><div>to use the machine verifier to catch the other errors that you've mentioned.</div><div><br></div><div>Alex</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><blockquote type="cite"><div><div class="h5"><div>On Apr 28, 2015, at 9:56 AM, Alex L <<a href="mailto:arphaman@gmail.com" target="_blank">arphaman@gmail.com</a>> wrote:</div><br></div></div><div><div><div class="h5"><div dir="ltr">
<pre style="margin-top:0px;margin-bottom:0px">Hi<span style="color:rgb(192,192,192)"> </span>all,</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px">I<span style="color:rgb(192,192,192)"> </span>would<span style="color:rgb(192,192,192)"> </span>like<span style="color:rgb(192,192,192)"> </span>to<span style="color:rgb(192,192,192)"> </span>propose<span style="color:rgb(192,192,192)"> </span>a<span style="color:rgb(192,192,192)"> </span>text-based,<span style="color:rgb(192,192,192)"> </span>human<span style="color:rgb(192,192,192)"> </span>readable<span style="color:rgb(192,192,192)"> </span>format<span style="color:rgb(192,192,192)"> </span>that<span style="color:rgb(192,192,192)"> </span>will<span style="color:rgb(192,192,192)"> </span>be<span style="color:rgb(192,192,192)"> </span>used<span style="color:rgb(192,192,192)"> </span>to</pre>
<pre style="margin-top:0px;margin-bottom:0px">serialize<span style="color:rgb(192,192,192)"> </span>the<span style="color:rgb(192,192,192)"> </span>machine<span style="color:rgb(192,192,192)"> </span>level<span style="color:rgb(192,192,192)"> </span>IR.<span style="color:rgb(192,192,192)"> </span>The<span style="color:rgb(192,192,192)"> </span>major<span style="color:rgb(192,192,192)"> </span>goal<span style="color:rgb(192,192,192)"> </span>of<span style="color:rgb(192,192,192)"> </span>this<span style="color:rgb(192,192,192)"> </span>format<span style="color:rgb(192,192,192)"> </span>is<span style="color:rgb(192,192,192)"> </span>to<span style="color:rgb(192,192,192)"> </span>allow<span style="color:rgb(192,192,192)"> </span>LLVM</pre>
<pre style="margin-top:0px;margin-bottom:0px">to<span style="color:rgb(192,192,192)"> </span>save<span style="color:rgb(192,192,192)"> </span>the<span style="color:rgb(192,192,192)"> </span>machine<span style="color:rgb(192,192,192)"> </span>level<span style="color:rgb(192,192,192)"> </span>IR<span style="color:rgb(192,192,192)"> </span>after<span style="color:rgb(192,192,192)"> </span>any<span style="color:rgb(192,192,192)"> </span>code<span style="color:rgb(192,192,192)"> </span>generation<span style="color:rgb(192,192,192)"> </span>pass<span style="color:rgb(192,192,192)"> </span>and<span style="color:rgb(192,192,192)"> </span>then<span style="color:rgb(192,192,192)"> </span>to<span style="color:rgb(192,192,192)"> </span>load</pre>
<pre style="margin-top:0px;margin-bottom:0px">it<span style="color:rgb(192,192,192)"> </span>again<span style="color:rgb(192,192,192)"> </span>and<span style="color:rgb(192,192,192)"> </span>continue<span style="color:rgb(192,192,192)"> </span>running<span style="color:rgb(192,192,192)"> </span>passes<span style="color:rgb(192,192,192)"> </span>on<span style="color:rgb(192,192,192)"> </span>the<span style="color:rgb(192,192,192)"> </span>machine<span style="color:rgb(192,192,192)"> </span>level<span style="color:rgb(192,192,192)"> </span>IR.<span style="color:rgb(192,192,192)"> </span>The<span style="color:rgb(192,192,192)"> </span>primary<span style="color:rgb(192,192,192)"> </span>use<span style="color:rgb(192,192,192)"> </span>case</pre>
<pre style="margin-top:0px;margin-bottom:0px">of<span style="color:rgb(192,192,192)"> </span>this<span style="color:rgb(192,192,192)"> </span>format<span style="color:rgb(192,192,192)"> </span>is<span style="color:rgb(192,192,192)"> </span>to<span style="color:rgb(192,192,192)"> </span>enable<span style="color:rgb(192,192,192)"> </span>easier<span style="color:rgb(192,192,192)"> </span>testing<span style="color:rgb(192,192,192)"> </span>process<span style="color:rgb(192,192,192)"> </span>for<span style="color:rgb(192,192,192)"> </span>the<span style="color:rgb(192,192,192)"> </span>code<span style="color:rgb(192,192,192)"> </span>generation<span style="color:rgb(192,192,192)"> </span>passes,</pre>
<pre style="margin-top:0px;margin-bottom:0px">by<span style="color:rgb(192,192,192)"> </span>allowing<span style="color:rgb(192,192,192)"> </span>the<span style="color:rgb(192,192,192)"> </span>developers<span style="color:rgb(192,192,192)"> </span>to<span style="color:rgb(192,192,192)"> </span>write<span style="color:rgb(192,192,192)"> </span>tests<span style="color:rgb(192,192,192)"> </span>that<span style="color:rgb(192,192,192)"> </span>load<span style="color:rgb(192,192,192)"> </span>the<span style="color:rgb(192,192,192)"> </span>IR,<span style="color:rgb(192,192,192)"> </span>then<span style="color:rgb(192,192,192)"> </span>invoke<span style="color:rgb(192,192,192)"> </span>just<span style="color:rgb(192,192,192)"> </span>a</pre>
<pre style="margin-top:0px;margin-bottom:0px">specific<span style="color:rgb(192,192,192)"> </span>code<span style="color:rgb(192,192,192)"> </span>gen<span style="color:rgb(192,192,192)"> </span>pass<span style="color:rgb(192,192,192)"> </span>and<span style="color:rgb(192,192,192)"> </span>then<span style="color:rgb(192,192,192)"> </span>inspect<span style="color:rgb(192,192,192)"> </span>the<span style="color:rgb(192,192,192)"> </span>output<span style="color:rgb(192,192,192)"> </span>of<span style="color:rgb(192,192,192)"> </span>that<span style="color:rgb(192,192,192)"> </span>pass<span style="color:rgb(192,192,192)"> </span>by<span style="color:rgb(192,192,192)"> </span>checking<span style="color:rgb(192,192,192)"> </span>the</pre>
<pre style="margin-top:0px;margin-bottom:0px">printed<span style="color:rgb(192,192,192)"> </span>out<span style="color:rgb(192,192,192)"> </span>IR.</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px">The<span style="color:rgb(192,192,192)"> </span>proposed<span style="color:rgb(192,192,192)"> </span>format<span style="color:rgb(192,192,192)"> </span>has<span style="color:rgb(192,192,192)"> </span>a<span style="color:rgb(192,192,192)"> </span>number<span style="color:rgb(192,192,192)"> </span>of<span style="color:rgb(192,192,192)"> </span>key<span style="color:rgb(192,192,192)"> </span>features:</pre>
<pre style="margin-top:0px;margin-bottom:0px">-<span style="color:rgb(192,192,192)"> </span>It<span style="color:rgb(192,192,192)"> </span>stores<span style="color:rgb(192,192,192)"> </span>the<span style="color:rgb(192,192,192)"> </span>machine<span style="color:rgb(192,192,192)"> </span>level<span style="color:rgb(192,192,192)"> </span>IR<span style="color:rgb(192,192,192)"> </span>and<span style="color:rgb(192,192,192)"> </span>the<span style="color:rgb(192,192,192)"> </span>optional<span style="color:rgb(192,192,192)"> </span>LLVM<span style="color:rgb(192,192,192)"> </span>IR<span style="color:rgb(192,192,192)"> </span>in<span style="color:rgb(192,192,192)"> </span>one<span style="color:rgb(192,192,192)"> </span>text<span style="color:rgb(192,192,192)"> </span>file.</pre>
<pre style="margin-top:0px;margin-bottom:0px">-<span style="color:rgb(192,192,192)"> </span>The<span style="color:rgb(192,192,192)"> </span>connections<span style="color:rgb(192,192,192)"> </span>between<span style="color:rgb(192,192,192)"> </span>the<span style="color:rgb(192,192,192)"> </span>machine<span style="color:rgb(192,192,192)"> </span>level<span style="color:rgb(192,192,192)"> </span>IR<span style="color:rgb(192,192,192)"> </span>and<span style="color:rgb(192,192,192)"> </span>the<span style="color:rgb(192,192,192)"> </span>LLVM<span style="color:rgb(192,192,192)"> </span>IR<span style="color:rgb(192,192,192)"> </span>are<span style="color:rgb(192,192,192)"> </span>preserved.</pre>
<pre style="margin-top:0px;margin-bottom:0px">-<span style="color:rgb(192,192,192)"> </span>The<span style="color:rgb(192,192,192)"> </span>format<span style="color:rgb(192,192,192)"> </span>uses<span style="color:rgb(192,192,192)"> </span>a<span style="color:rgb(192,192,192)"> </span>YAML<span style="color:rgb(192,192,192)"> </span>based<span style="color:rgb(192,192,192)"> </span>container<span style="color:rgb(192,192,192)"> </span>for<span style="color:rgb(192,192,192)"> </span>most<span style="color:rgb(192,192,192)"> </span>of<span style="color:rgb(192,192,192)"> </span>the<span style="color:rgb(192,192,192)"> </span>data<span style="color:rgb(192,192,192)"> </span>structures.<span style="color:rgb(192,192,192)"> </span>The<span style="color:rgb(192,192,192)"> </span>LLVM</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span>IR<span style="color:rgb(192,192,192)"> </span>is<span style="color:rgb(192,192,192)"> </span>embedded<span style="color:rgb(192,192,192)"> </span>in<span style="color:rgb(192,192,192)"> </span>the<span style="color:rgb(192,192,192)"> </span>YAML<span style="color:rgb(192,192,192)"> </span>container.</pre>
<pre style="margin-top:0px;margin-bottom:0px">-<span style="color:rgb(192,192,192)"> </span>The<span style="color:rgb(192,192,192)"> </span>format<span style="color:rgb(192,192,192)"> </span>also<span style="color:rgb(192,192,192)"> </span>uses<span style="color:rgb(192,192,192)"> </span>a<span style="color:rgb(192,192,192)"> </span>new,<span style="color:rgb(192,192,192)"> </span>text-based<span style="color:rgb(192,192,192)"> </span>syntax<span style="color:rgb(192,192,192)"> </span>to<span style="color:rgb(192,192,192)"> </span>serialize<span style="color:rgb(192,192,192)"> </span>the<span style="color:rgb(192,192,192)"> </span>machine<span style="color:rgb(192,192,192)"> </span>instructions.</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span>The<span style="color:rgb(192,192,192)"> </span>instructions<span style="color:rgb(192,192,192)"> </span>are<span style="color:rgb(192,192,192)"> </span>embedded<span style="color:rgb(192,192,192)"> </span>in<span style="color:rgb(192,192,192)"> </span>YAML.</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px">This<span style="color:rgb(192,192,192)"> </span>is<span style="color:rgb(192,192,192)"> </span>an<span style="color:rgb(192,192,192)"> </span>incomplete<span style="color:rgb(192,192,192)"> </span>example<span style="color:rgb(192,192,192)"> </span>of<span style="color:rgb(192,192,192)"> </span>a<span style="color:rgb(192,192,192)"> </span>YAML<span style="color:rgb(192,192,192)"> </span>file<span style="color:rgb(192,192,192)"> </span>containing<span style="color:rgb(192,192,192)"> </span>the<span style="color:rgb(192,192,192)"> </span>LLVM<span style="color:rgb(192,192,192)"> </span>IR,<span style="color:rgb(192,192,192)"> </span>the<span style="color:rgb(192,192,192)"> </span>machine<span style="color:rgb(192,192,192)"> </span>level<span style="color:rgb(192,192,192)"> </span>IR</pre>
<pre style="margin-top:0px;margin-bottom:0px">and<span style="color:rgb(192,192,192)"> </span>the<span style="color:rgb(192,192,192)"> </span>instructions:</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px">---</pre>
<pre style="margin-top:0px;margin-bottom:0px">ir:<span style="color:rgb(192,192,192)"> </span>|</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span>define<span style="color:rgb(192,192,192)"> </span>i32<span style="color:rgb(192,192,192)"> </span>@fact(i32<span style="color:rgb(192,192,192)"> </span>%n)<span style="color:rgb(192,192,192)"> </span>{</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>%1<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span>alloca<span style="color:rgb(192,192,192)"> </span>i32,<span style="color:rgb(192,192,192)"> </span>align<span style="color:rgb(192,192,192)"> </span>4</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>store<span style="color:rgb(192,192,192)"> </span>i32<span style="color:rgb(192,192,192)"> </span>%n,<span style="color:rgb(192,192,192)"> </span>i32*<span style="color:rgb(192,192,192)"> </span>%1,<span style="color:rgb(192,192,192)"> </span>align<span style="color:rgb(192,192,192)"> </span>4</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>%2<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span>load<span style="color:rgb(192,192,192)"> </span>i32,<span style="color:rgb(192,192,192)"> </span>i32*<span style="color:rgb(192,192,192)"> </span>%1,<span style="color:rgb(192,192,192)"> </span>align<span style="color:rgb(192,192,192)"> </span>4</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>%3<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span>icmp<span style="color:rgb(192,192,192)"> </span>eq<span style="color:rgb(192,192,192)"> </span>i32<span style="color:rgb(192,192,192)"> </span>%2,<span style="color:rgb(192,192,192)"> </span>0</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>br<span style="color:rgb(192,192,192)"> </span>i1<span style="color:rgb(192,192,192)"> </span>%3,<span style="color:rgb(192,192,192)"> </span>label<span style="color:rgb(192,192,192)"> </span>%10,<span style="color:rgb(192,192,192)"> </span>label<span style="color:rgb(192,192,192)"> </span>%4</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span>;<span style="color:rgb(192,192,192)"> </span><label>:4<span style="color:rgb(192,192,192)">                                       </span>;<span style="color:rgb(192,192,192)"> </span>preds<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span>%0</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>%5<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span>load<span style="color:rgb(192,192,192)"> </span>i32,<span style="color:rgb(192,192,192)"> </span>i32*<span style="color:rgb(192,192,192)"> </span>%1,<span style="color:rgb(192,192,192)"> </span>align<span style="color:rgb(192,192,192)"> </span>4</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>%6<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span>sub<span style="color:rgb(192,192,192)"> </span>nsw<span style="color:rgb(192,192,192)"> </span>i32<span style="color:rgb(192,192,192)"> </span>%5,<span style="color:rgb(192,192,192)"> </span>1</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>%7<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span>call<span style="color:rgb(192,192,192)"> </span>i32<span style="color:rgb(192,192,192)"> </span>@fact(i32<span style="color:rgb(192,192,192)"> </span>%6)</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>%8<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span>load<span style="color:rgb(192,192,192)"> </span>i32,<span style="color:rgb(192,192,192)"> </span>i32*<span style="color:rgb(192,192,192)"> </span>%1,<span style="color:rgb(192,192,192)"> </span>align<span style="color:rgb(192,192,192)"> </span>4</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>%9<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span>mul<span style="color:rgb(192,192,192)"> </span>nsw<span style="color:rgb(192,192,192)"> </span>i32<span style="color:rgb(192,192,192)"> </span>%7,<span style="color:rgb(192,192,192)"> </span>%8</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>br<span style="color:rgb(192,192,192)"> </span>label<span style="color:rgb(192,192,192)"> </span>%10</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span>;<span style="color:rgb(192,192,192)"> </span><label>:10<span style="color:rgb(192,192,192)">                                      </span>;<span style="color:rgb(192,192,192)"> </span>preds<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span>%0,<span style="color:rgb(192,192,192)"> </span>%4</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>%11<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span>phi<span style="color:rgb(192,192,192)"> </span>i32<span style="color:rgb(192,192,192)"> </span>[<span style="color:rgb(192,192,192)"> </span>%9,<span style="color:rgb(192,192,192)"> </span>%4<span style="color:rgb(192,192,192)"> </span>],<span style="color:rgb(192,192,192)"> </span>[<span style="color:rgb(192,192,192)"> </span>1,<span style="color:rgb(192,192,192)"> </span>%0<span style="color:rgb(192,192,192)"> </span>]</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>ret<span style="color:rgb(192,192,192)"> </span>i32<span style="color:rgb(192,192,192)"> </span>%11</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span>}</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px">...</pre>
<pre style="margin-top:0px;margin-bottom:0px">---</pre>
<pre style="margin-top:0px;margin-bottom:0px">number:<span style="color:rgb(192,192,192)">          </span>0</pre>
<pre style="margin-top:0px;margin-bottom:0px">name:<span style="color:rgb(192,192,192)">            </span>fact</pre>
<pre style="margin-top:0px;margin-bottom:0px">alignment:<span style="color:rgb(192,192,192)">       </span>4</pre>
<pre style="margin-top:0px;margin-bottom:0px">regInfo:</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span>....</pre>
<pre style="margin-top:0px;margin-bottom:0px">frameInfo:</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span>....</pre>
<pre style="margin-top:0px;margin-bottom:0px">body:</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span>-<span style="color:rgb(192,192,192)"> </span>bb:<span style="color:rgb(192,192,192)">              </span>0</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>llbb:<span style="color:rgb(192,192,192)">            </span>'%0'</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>successors:<span style="color:rgb(192,192,192)">      </span>[<span style="color:rgb(192,192,192)"> </span>'bb#2',<span style="color:rgb(192,192,192)"> </span>'bb#1'<span style="color:rgb(192,192,192)"> </span>]</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>liveIns:<span style="color:rgb(192,192,192)">         </span>[<span style="color:rgb(192,192,192)"> </span>'%edi'<span style="color:rgb(192,192,192)"> </span>]</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>instructions:</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">      </span>-<span style="color:rgb(192,192,192)"> </span>'push64r<span style="color:rgb(192,192,192)"> </span>undef<span style="color:rgb(192,192,192)"> </span>%rax,<span style="color:rgb(192,192,192)"> </span>%rsp,<span style="color:rgb(192,192,192)"> </span>%rsp'</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">      </span>-<span style="color:rgb(192,192,192)"> </span>'mov32mr<span style="color:rgb(192,192,192)"> </span>%rsp,<span style="color:rgb(192,192,192)"> </span>1,<span style="color:rgb(192,192,192)"> </span>%noreg,<span style="color:rgb(192,192,192)"> </span>4,<span style="color:rgb(192,192,192)"> </span>%noreg,<span style="color:rgb(192,192,192)"> </span>%edi'</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">      </span>-<span style="color:rgb(192,192,192)"> </span>....</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span>....</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span>-<span style="color:rgb(192,192,192)"> </span>bb:<span style="color:rgb(192,192,192)">              </span>1</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>llbb:<span style="color:rgb(192,192,192)">            </span>'%4'</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>successors:<span style="color:rgb(192,192,192)">      </span>[<span style="color:rgb(192,192,192)"> </span>'bb#2'<span style="color:rgb(192,192,192)"> </span>]</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>instructions:</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">      </span>-<span style="color:rgb(192,192,192)"> </span>'%edi<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span>mov32rm<span style="color:rgb(192,192,192)"> </span>%rsp,<span style="color:rgb(192,192,192)"> </span>1,<span style="color:rgb(192,192,192)"> </span>%noreg,<span style="color:rgb(192,192,192)"> </span>4,<span style="color:rgb(192,192,192)"> </span>%noreg'</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">      </span>-<span style="color:rgb(192,192,192)"> </span>....</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span>....</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span>-<span style="color:rgb(192,192,192)"> </span>....</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>....</pre>
<pre style="margin-top:0px;margin-bottom:0px">...</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px">The<span style="color:rgb(192,192,192)"> </span>example<span style="color:rgb(192,192,192)"> </span>above<span style="color:rgb(192,192,192)"> </span>shows<span style="color:rgb(192,192,192)"> </span>a<span style="color:rgb(192,192,192)"> </span>YAML<span style="color:rgb(192,192,192)"> </span>file<span style="color:rgb(192,192,192)"> </span>with<span style="color:rgb(192,192,192)"> </span>two<span style="color:rgb(192,192,192)"> </span>YAML<span style="color:rgb(192,192,192)"> </span>documents<span style="color:rgb(192,192,192)"> </span>(delimited<span style="color:rgb(192,192,192)"> </span>by<span style="color:rgb(192,192,192)"> </span>`---`</pre>
<pre style="margin-top:0px;margin-bottom:0px">and<span style="color:rgb(192,192,192)"> </span>`...`)<span style="color:rgb(192,192,192)"> </span>containing<span style="color:rgb(192,192,192)"> </span>the<span style="color:rgb(192,192,192)"> </span>LLVM<span style="color:rgb(192,192,192)"> </span>IR<span style="color:rgb(192,192,192)"> </span>and<span style="color:rgb(192,192,192)"> </span>the<span style="color:rgb(192,192,192)"> </span>machine<span style="color:rgb(192,192,192)"> </span>function<span style="color:rgb(192,192,192)"> </span>information<span style="color:rgb(192,192,192)"> </span>for<span style="color:rgb(192,192,192)"> </span>the<span style="color:rgb(192,192,192)"> </span>function<span style="color:rgb(192,192,192)"> </span>`fact`.</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px">When<span style="color:rgb(192,192,192)"> </span>a<span style="color:rgb(192,192,192)"> </span>specific<span style="color:rgb(192,192,192)"> </span>format<span style="color:rgb(192,192,192)"> </span>is<span style="color:rgb(192,192,192)"> </span>chosen,<span style="color:rgb(192,192,192)"> </span>I'll<span style="color:rgb(192,192,192)"> </span>start<span style="color:rgb(192,192,192)"> </span>with<span style="color:rgb(192,192,192)"> </span>patches<span style="color:rgb(192,192,192)"> </span>that<span style="color:rgb(192,192,192)"> </span>serialize<span style="color:rgb(192,192,192)"> </span>the</pre>
<pre style="margin-top:0px;margin-bottom:0px">embedded<span style="color:rgb(192,192,192)"> </span>LLVM<span style="color:rgb(192,192,192)"> </span>IR.<span style="color:rgb(192,192,192)"> </span>Then<span style="color:rgb(192,192,192)"> </span>I'll<span style="color:rgb(192,192,192)"> </span>add<span style="color:rgb(192,192,192)"> </span>support<span style="color:rgb(192,192,192)"> </span>for<span style="color:rgb(192,192,192)"> </span>things<span style="color:rgb(192,192,192)"> </span>like<span style="color:rgb(192,192,192)"> </span>machine<span style="color:rgb(192,192,192)"> </span>functions<span style="color:rgb(192,192,192)"> </span>and</pre>
<pre style="margin-top:0px;margin-bottom:0px">machine<span style="color:rgb(192,192,192)"> </span>basic<span style="color:rgb(192,192,192)"> </span>blocks,<span style="color:rgb(192,192,192)"> </span>and<span style="color:rgb(192,192,192)"> </span>I<span style="color:rgb(192,192,192)"> </span>think<span style="color:rgb(192,192,192)"> </span>that<span style="color:rgb(192,192,192)"> </span>an<span style="color:rgb(192,192,192)"> </span>intrusive<span style="color:rgb(192,192,192)"> </span>implementation<span style="color:rgb(192,192,192)"> </span>will<span style="color:rgb(192,192,192)"> </span>work<span style="color:rgb(192,192,192)"> </span>best</pre>
<pre style="margin-top:0px;margin-bottom:0px">for<span style="color:rgb(192,192,192)"> </span>data<span style="color:rgb(192,192,192)"> </span>structures<span style="color:rgb(192,192,192)"> </span>like<span style="color:rgb(192,192,192)"> </span>these.<span style="color:rgb(192,192,192)"> </span>After<span style="color:rgb(192,192,192)"> </span>that<span style="color:rgb(192,192,192)"> </span>I<span style="color:rgb(192,192,192)"> </span>will<span style="color:rgb(192,192,192)"> </span>continue<span style="color:rgb(192,192,192)"> </span>adding<span style="color:rgb(192,192,192)"> </span>support<span style="color:rgb(192,192,192)"> </span>for</pre>
<pre style="margin-top:0px;margin-bottom:0px">serialization<span style="color:rgb(192,192,192)"> </span>of<span style="color:rgb(192,192,192)"> </span>the<span style="color:rgb(192,192,192)"> </span>remaining<span style="color:rgb(192,192,192)"> </span>data<span style="color:rgb(192,192,192)"> </span>structures.</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px">Thanks<span style="color:rgb(192,192,192)"> </span>for<span style="color:rgb(192,192,192)"> </span>reading<span style="color:rgb(192,192,192)"> </span>through<span style="color:rgb(192,192,192)"> </span>the<span style="color:rgb(192,192,192)"> </span>proposal.<span style="color:rgb(192,192,192)"> </span>What<span style="color:rgb(192,192,192)"> </span>are<span style="color:rgb(192,192,192)"> </span>you<span style="color:rgb(192,192,192)"> </span>thoughts<span style="color:rgb(192,192,192)"> </span>about<span style="color:rgb(192,192,192)"> </span>this<span style="color:rgb(192,192,192)"> </span>format?</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre></div></div></div><span class="">
_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></span></div></blockquote></div><br></div></div></blockquote></div><br></div></div>