[llvm] r211705 - Random Number Generator (llvm)

Chris Lattner clattner at apple.com
Tue Jul 1 21:50:39 PDT 2014


On Jun 30, 2014, at 1:41 PM, Chris Lattner <clattner at apple.com> wrote:

> 
> On Jun 30, 2014, at 11:38 AM, Per Larsen <per.larsen at gmail.com> wrote:
> 
>> 
>> Apologies if this has already been asked, but can we rely on the STL RNGs to produce identical results across implementations?  Ideally, the same bitcode and same seed should produce the same results regardless of host platform.
>> 
>> Will the RNG only be used in CodeGen or will it be used in IR passes?  If it's in IR passes, then you need to save more intermediate state if you want to be able to split up IR passes and still have the same results.  OTOH, it might be OK to give up on that.
>> The patches we're initially contributing use the RNG in CodeGen. However, some randomizing transformations (e.g., basic block permutation) would be IR passes so making the RNG available to both kinds of passes is the most forward looking design IMHO.
> 
> Making something part of IR is the most expensive and "highest coupling” way to design something.  It is much better to make it be an out of band thing that is passed around, even if it adds more code.

Any thoughts guys?  If we are unclear what the right design here is, I'd prefer you to revert the patch until it is figured out.  Thanks,

-Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140701/f9b8b5d5/attachment.html>


More information about the llvm-commits mailing list