[PATCH] Random Number Generator Refactoring (removing from Module)

Stephen Crane sjcrane at uci.edu
Thu Jul 3 11:14:56 PDT 2014


Highlighting an issue for discussion:

The RNG is guaranteed to produce the same random stream only when the Module ID and thus the input filename is the same. This might be problematic if the input filename extension changes (e.g. from .c to .bc or .ll).

We could store this salt in NamedMetadata, but this would make the parameter non-const. This would unfortunately make this interface unusable by any Machine passes, since they only have a const reference to their IR Module. Alternatively we can always store salt metadata in the Module constructor, but this means overhead even when the RNG is never used.

http://reviews.llvm.org/D4377






More information about the llvm-commits mailing list