[llvm] r214318 - Rename llvm-uselistorder => verify-uselistorder

Sean Silva chisophugis at gmail.com
Thu Jul 31 11:39:37 PDT 2014


On Thu, Jul 31, 2014 at 11:56 AM, Duncan P. N. Exon Smith <
dexonsmith at apple.com> wrote:

>
> > On 2014-Jul-31, at 10:33, Sean Silva <chisophugis at gmail.com> wrote:
> >
> > ; RUN: verify-uselistorder < %s.bc -preserve-bc-use-list-order
> -num-shuffles=5
> >
> > quick question: is the shuffling nondeterministic? I think we really
> need to avoid a test that is nondeterministic.
> >
>
>
> Designed it to be deterministic (if it's not there's a bug).


Ok, I guess that's not a problem. I guess it's sort of weird to see an
option like -num-shuffles being used like this. Why not just test 1
shuffle? or 10? Testing 5 "random" shuffles just so that it tests the same
5 shuffles every time doesn't seem very productive. If it's going to test 5
deterministic shuffles then it should at least check 5 specific shuffles
like reverse, pipe organ, interleave, etc.

At the very least, the number "5" should not be on every RUN line if it is
just some arbitrary default number of shuffles to try and has no reason to
vary from test to test.


>  Here's
> what's supposed to happen.
>
>   - Seeds the random number generator.  The RNG is seeded at the
>     beginning of each shuffle (shuffle 0 uses default+0, shuffle 1 uses
>     default+1, etc.).
>   - Visits every Value in a deterministic order.
>   - Assigns a random number to each use in the Value's use-list in a
>     deterministic order.
>   - Sorts the use-list using `Value::sortUseList()`, which is a stable
>     sort.
>
>
This would be great to add to the top-of-file comment in the .cpp file.

-- Sean Silva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140731/0ddfd79a/attachment.html>


More information about the llvm-commits mailing list