Morten Ofstad
2004-Oct-19 12:40 UTC
[LLVMdev] How to solve missing srand48/lrand48/drand48?
These calls are in ExternalCalls.cpp, they are platform dependent calls, so maybe llvm should consider including it's own implementation of a random number generator? For the time being I just replaced with calls to srand and rand like Paolo also did, but it needs to be fixed... m.
Paolo Invernizzi
2004-Oct-19 13:32 UTC
[LLVMdev] How to solve missing srand48/lrand48/drand48?
Morten, have a look at the http://mail.cs.uiuc.edu/pipermail/llvmdev/2004-September/002235.html thread... On Oct 19, 2004, at 2:40 PM, Morten Ofstad wrote:> These calls are in ExternalCalls.cpp, they are platform dependent > calls, so maybe llvm should consider including it's own implementation > of a random number generator? For the time being I just replaced with > calls to srand and rand like Paolo also did, but it needs to be > fixed... > > m. > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
Morten Ofstad
2004-Oct-19 14:19 UTC
[LLVMdev] How to solve missing srand48/lrand48/drand48?
Paolo Invernizzi wrote:> Morten, > have a look at the > http://mail.cs.uiuc.edu/pipermail/llvmdev/2004-September/002235.html > thread...OK, I understand now -- I have made a patch which wraps those functions in a #ifdef HAVE_RAND48 which I hope someone can add to the configure process. I also added a new plain rand function, since it did not make much sense to have the plain srand without having the corresponding rand... There is only a few problems left now which I have not submitted patches for, one is the user defined hash functions which have to be done differently with the Visual C STL implementation and then there is the linking problem which has been discussed at great length and the variable length array which no patch has been accepted for. When these problems are resolved, the visual studio project files can be put into the CVS. I have custom build steps which does the configuration (using gnuwin32 sed) and the tablegen process (although not in a very maintainable way) so it will be possible to build the complete fibonacci example from the sources in CVS with no manual steps. m. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20041019/c5243c61/attachment.txt>
Chris Lattner
2004-Oct-19 15:05 UTC
[LLVMdev] How to solve missing srand48/lrand48/drand48?
On Tue, 19 Oct 2004, Morten Ofstad wrote:> These calls are in ExternalCalls.cpp, they are platform dependent calls, > so maybe llvm should consider including it's own implementation of a > random number generator? For the time being I just replaced with calls > to srand and rand like Paolo also did, but it needs to be fixed...These calls, if they only occur in lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp, should just be removed completely. These are just forwarding functions for the interpreter. They are a gross hack so they should just be removed if they are causing a problem. -Chris -- http://llvm.org/ http://nondot.org/sabre/