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

Duncan P. N. Exon Smith dexonsmith at apple.com
Thu Jul 31 10:56:00 PDT 2014


> 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).  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.




More information about the llvm-commits mailing list