[LLVMdev] A create-distinct-item function with no (other) side effects
Kenneth Uildriks
kennethuil at gmail.com
Fri Aug 28 18:58:50 PDT 2009
On Fri, Aug 28, 2009 at 8:49 PM, Eli Friedman<eli.friedman at gmail.com> wrote:
> On Fri, Aug 28, 2009 at 5:56 PM, Kenneth Uildriks<kennethuil at gmail.com> wrote:
>> It would also
>> help optimize away calls to "random" in some cases.
>
> If you're talking about the Unix random(), it does has visible side
> effects, specifically related to the guarantee that an srandom call
> followed by N random() calls will always produce the same sequence of
> N numbers.
>
> -Eli
>
I see... that would not be a candidate for this hypothetical function
attribute then. Although, more secure (and expensive) versions that
guarantee the opposite, a non-repeating and
practically-impossible-to-predict sequence, could benefit from this.
More information about the llvm-dev
mailing list