[llvm] r211705 - Random Number Generator (llvm)

JF Bastien jfb at google.com
Mon Jun 30 09:25:19 PDT 2014


> This looks interesting, but why is there a pointer from llvm::Module to this?  This doesn’t seem like part of the IR structure of a file, and isn’t serializable into bitcode or .ll files.  Unless I’m missing something big here, this should not be part of llvm::Module.


Hi Chris,

We discussed this on the review (http://reviews.llvm.org/D3390) and
IRC: should it be in the Module, LLVMContext, or somewhere else? The
agreement was that there was no great place to put it. Module seemed
best because it's currently the unit of concurrency (no need for
TLS/locking, and unpredictability in the RNG stream), and the initial
seed+salt are part of how the final bitcode and machine code get
generated (I definitely think this should be part of bitcode
serialization so that we can get reproducible results with the same
toolchain). Would you rather have something else?

Adding the author of the patch to the email.




More information about the llvm-commits mailing list