I'm finding it useful to replace the main loop with:<div><div>  for (unsigned i = 0, n = SizeCL/Modifiers.size(); i < n; ++i) {</div><div>      Modifiers[i%Modifiers.size()]->Act();</div><div>  }</div><div><br></div>
<div>That way, changing the size by 1 adds exactly one instruction, which makes delta debugging MUCH easier. Maybe it would be worth changing?</div><div><br></div><div>--Sean Silva </div></div><br><div class="gmail_quote">
On Sun, Feb 26, 2012 at 9:23 PM, Sean Silva <span dir="ltr"><<a href="mailto:silvas@purdue.edu">silvas@purdue.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Wow, nifty tool! I've already found a couple crashes!<div><br></div><div>It is also really easy to pinpoint what is causing the error. Whenever you trigger a bug, run llvm-stress with the same seed but a really small size that doesn't trigger the bug (e.g. like 10). Then do binary search on the size. Eventually you find exactly the cutoff of size that triggers the bug (e.g. 539 runs fine, but 540 crashes), and then you can diff the crashing and non-crashing .ll files and there should only be a tiny difference.</div>
<span class="HOEnZb"><font color="#888888">
<div><br></div></font></span><div><span class="HOEnZb"><font color="#888888">--Sean Silva</font></span><div><div class="h5"><br><br><div class="gmail_quote">On Sun, Feb 26, 2012 at 7:29 PM, Hal Finkel <span dir="ltr"><<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Nadav,<br>
<br>
Thanks, this is neat! Here is a patch which optionally enables<br>
generation of the other floating-point types. Please review.<br>
<br>
 -Hal<br>
<div><div><br>
On Sun, 26 Feb 2012 11:51:04 +0000<br>
"Rotem, Nadav" <<a href="mailto:nadav.rotem@intel.com" target="_blank">nadav.rotem@intel.com</a>> wrote:<br>
<br>
> Hi,<br>
><br>
> Compiling lots of 'junk' helps in catching bugs.  I added a new tool<br>
> (located under llvm/tools/llvm-stress) for generating random LL<br>
> files.  The tool can be used to test different llvm components using<br>
> various compilation flags.  Until now, I only found bugs in the<br>
> codegen, and not in general llvm optimizations. This probably means<br>
> that the generated tests are currently too simple for the<br>
> higher-level optimizations.<br>
><br>
> The command line below generates a random ll file, and llc compiles<br>
> this file. It often crashes.<br>
><br>
> ./llvm-stress -seed $RANDOM -o tmp.ll -size 1000 ; ./llc tmp.ll<br>
> -mcpu=corei7-avx -mattr=+avx -o /dev/null<br>
><br>
> The "-seed" flag sets the initial seed to be used by the random<br>
> function.  I implemented a simple portable 'random' function so that<br>
> the result should be identical on all platforms. The initial seed<br>
> also appears in the name of the generated function.  The "-size"<br>
> parameter sets the size of the generated random file.<br>
><br>
> Nadav<br>
> ---------------------------------------------------------------------<br>
> Intel Israel (74) Limited<br>
><br>
> This e-mail and any attachments may contain confidential material for<br>
> the sole use of the intended recipient(s). Any review or distribution<br>
> by others is strictly prohibited. If you are not the intended<br>
> recipient, please contact the sender and delete all copies.<br>
><br>
><br>
> _______________________________________________<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>
<br>
<br>
<br>
</div></div><span><font color="#888888">--<br>
Hal Finkel<br>
Postdoctoral Appointee<br>
Leadership Computing Facility<br>
Argonne National Laboratory<br>
</font></span><br>_______________________________________________<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>
<br></blockquote></div><br></div></div></div>
</blockquote></div><br>