<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Jun 6, 2012, at 12:50 AM, Ivan Llopard <<a href="mailto:ivanllopard@gmail.com">ivanllopard@gmail.com</a>> wrote:</div><blockquote type="cite"><div bgcolor="#FFFFFF" text="#000000">On 05/06/2012 23:48, Andrew Trick wrote:
<blockquote cite="mid:7CA7A883-E41C-4EB5-AA1B-C0727727C796@apple.com" type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<div>
<div>On Jun 5, 2012, at 12:43 AM, Ivan Llopard <<a moz-do-not-send="true" href="mailto:ivanllopard@gmail.com">ivanllopard@gmail.com</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<div bgcolor="#FFFFFF" text="#000000"> Hi again!<br>
<br>
I don't know if I should send patches for review to llvmdev
or llvmcommits so I forward my original message sent to
llvmdev.<br>
<br>
Thanks,<br>
Ivan<br>
<br>
<br>
-------- Original Message --------
<table class="moz-email-headers-table" style="position: static; z-index: auto; " border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Subject:
</th>
<td>[LLVMdev] [PATCH] Remove instruction within a
bundle</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Date:
</th>
<td>Sun, 03 Jun 2012 17:17:47 +0200</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">From:
</th>
<td>Ivan Llopard <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:ivanllopard@gmail.com"><ivanllopard@gmail.com></a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">To:
</th>
<td>LLVM Developers Mailing List <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:llvmdev@cs.uiuc.edu"><llvmdev@cs.uiuc.edu></a></td>
</tr>
</tbody>
</table>
<br>
<br>
<pre>Hi,
I've raised an assertion when I tried to remove an instruction within a
bundle by calling eraseFromParent(). It seems that in order to erase the
MI, a bundle iterator is created but it's forbidden if the MI is not the
bundle's header. The attached patch fix it.
As a test case, call eraseFromParent() on a machine instruction with its
isInsideBundle flag activated.
Ivan
</pre>
</div>
</blockquote>
<br>
</div>
<div>llvm-commits is the place for patches.</div>
<div><br>
</div>
<div>I committed this with a comment in r158025.</div>
</blockquote>
<br>
Thanks!<br>
<br>
<blockquote cite="mid:7CA7A883-E41C-4EB5-AA1B-C0727727C796@apple.com" type="cite">
<div><br>
</div>
<div>I realize it's nearly impossible to come up with a unit test.
I was hoping to create a testing mode for MachineInstrBundles
but never got to it. Contributions welcome.</div>
</blockquote>
<br>
Do you have any idea on how to implement it? I'd like to contribute
in my free time.<br></div></blockquote></div><br><div>You could probably catch some bugs with a fuzz bundler. In the MachineScheduler you could arbitrarily bundle instruction sequences of random length, and unbundle them later, probably just before postRA scheduling. This should work on any target, but may require formalizing some constraints or limitations on legal bundles, which is probably a good exercise. This won't capture all classes of bugs though. Other ideas are also welcome :)</div><div><br></div><div>-Andy</div></body></html>