<div dir="ltr">Thanks for the review,<div><br></div><div>I would actually prefer to keep the successors and weights separate - I've</div><div>attached a patch below that uses the following syntax:</div><div><br></div><div>   successors: [ '%bb.1.less', '%bb.2.exit' ]</div><div>   weights:       [ 16, 16 ]</div><div><br></div><div>I prefer this syntax more than the one you proposed, as with this syntax</div><div>all the MBB references have a consistent syntax that only has the references,</div><div>without any additional attributes. Also, I think that for the majority of the</div><div>test cases, the weights aren't really important, so the person who's writing</div><div>the test by basing it off the output of LLC can simply remove the line with the</div><div>weights instead of removing every weight attribute in each successor.</div><div><br></div><div>Cheers,</div><div>Alex</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-07-28 15:53 GMT-07:00 Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On 2015-Jul-28, at 15:21, Alex L <<a href="mailto:arphaman@gmail.com">arphaman@gmail.com</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> This patch serializes the machine basic block successor's weights.<br>
> This patch adds a new attribute 'successors-and-weights' to the<br>
> machine basic block YAML mapping. The new attribute is used<br>
> to store an array of successors and their corresponding weights.<br>
> Example:<br>
><br>
>     successors-and-weights: [ { block: '%bb.1.less', weight: 16 }, { block: '%bb.2.exit', weight: 16 } ]<br>
<br>
</span>This seems really heavyweight.  I wonder if we can do better.<br>
<br>
A few ideas off the top of my head:<br>
<br>
    successors: [ '%bb.1.less 16', '%bb.2.exit 16' ]<br>
    successors: [ '%bb.1.less (16)', '%bb.2.exit (16)' ]<br>
    successors: [ '%bb.1.less weight: 16', '%bb.2.exit weight: 16' ]<br>
<br>
Thoughts?  Any other ideas?<br>
<span class=""><br>
><br>
> The old attribute 'successors' still can be used to specify the<br>
> machine basic block's successors when those successors don't<br>
> have any weights.<br>
><br>
> Thanks,<br>
> Alex<br>
</span>> <0001-MIR-Serialization-serialize-the-MBB-successor-weight.patch><br>
<br>
</blockquote></div><br></div>