<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2015-04-28 10:15 GMT-07:00 Hal Finkel <span dir="ltr"><<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</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"><div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:rgb(0,0,0)"><br><hr><blockquote style="border-left-width:2px;border-left-style:solid;border-left-color:rgb(16,16,255);margin-left:5px;padding-left:5px;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><b>From: </b>"Alex L" <<a href="mailto:arphaman@gmail.com" target="_blank">arphaman@gmail.com</a>><br><b>To: </b>"LLVM Developers Mailing List" <<a href="mailto:llvmdev@cs.uiuc.edu" target="_blank">llvmdev@cs.uiuc.edu</a>><br><b>Sent: </b>Tuesday, April 28, 2015 11:56:42 AM<br><b>Subject: </b>[LLVMdev] RFC: Machine Level IR text-based serialization format<div><div class="h5"><br><br><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></div></div></div></blockquote><br>Hi Alex,<br><br>I think this looks promising. What are the 1 an 4 above? How are you proposing to serialize operand flags (dead, etc.)?<br><br> -Hal<br></div></div></blockquote><div><br></div><div>Hi Hal,</div><div><br></div><div>The 1 and 4 above are constants that are specific to x86 memory addressing, I believe they basically compute the address RSP + 1 * 0 + 4.</div><div>I haven't settled on a final version of the operand flags (for registers) syntax, but at the moment I'm thinking of something like this:</div><div>- The IsDef flag is implied by the use of the register before the '=', unless it's implicit.</div><div>- TiedTo and IsEarlyClobber aren't not serialized, as they are defined by the instruction description. (I believe that's true in all cases, but I'm not 100% sure).</div><div>- IsUndef, IsImp, IsKill, IsDead, IsInternalRead, IsDebug - keywords like 'implicit', 'undef', 'kill', 'dead' are used before the register e.g. 'undef %rax', 'implicit-def kill %eflags'.</div><div><br></div><div>I don't have a syntax for the SubReg_TargetFlags at the moment.<br></div><div><br></div><div>Alex</div><div> </div><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"><div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:rgb(0,0,0)"><br><blockquote style="border-left-width:2px;border-left-style:solid;border-left-color:rgb(16,16,255);margin-left:5px;padding-left:5px;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><span class=""><div dir="ltr"><pre style="margin-top:0px;margin-bottom:0px"></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>
<br></span><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></blockquote><span class=""><font color="#888888"><br><br><br>-- <br><div><span name="x"></span>Hal Finkel<br>Assistant Computational Scientist<br>Leadership Computing Facility<br>Argonne National Laboratory<span name="x"></span><br></div></font></span></div></div></blockquote></div><br></div></div>