[PATCH] D34157: [llvm-stress] Use C++11 mersenne_twister_engine random device instead of our own (PR32585)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 26 06:28:03 PDT 2017


RKSimon added inline comments.


================
Comment at: tools/llvm-stress/llvm-stress.cpp:47
 
+typedef std::mt19937_64 RandomGen;
+typedef std::uniform_int_distribution<uint64_t> RandomDist;
----------------
jroelofs wrote:
> Can you use the llvm::RandomNumberGenerator wrapper instead? That prevents accidentally copying it.
Maybe, although it'll need a slight refactor of how the salt/seeding system works. llvm::RandomNumberGenerator creates a salt based on the pass' name and module id. We need the ability to support llvm-stress providing a seed value at the command line


Repository:
  rL LLVM

https://reviews.llvm.org/D34157





More information about the llvm-commits mailing list