Sanjiv.Gupta at microchip.com
2008-Jun-15 14:57 UTC
[LLVMdev] API to retrieve current time.
What's the API to retrieve current time of day in llc? I need to use this to generate an unique number every time llc runs. TIA - Sanjiv
> What's the API to retrieve current time of day in llc? > I need to use this to generate an unique number every time llc runs.The llvm.readcyclecounter might suit your needs: http://www.llvm.org/docs/LangRef.html#int_readcyclecounter Regards, -Mahadevan.
Sanjiv.Gupta at microchip.com
2008-Jun-15 15:52 UTC
[LLVMdev] API to retrieve current time.
> -----Original Message----- > From: llvmdev-bounces at cs.uiuc.edu > [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Mahadevan R > Sent: Sunday, June 15, 2008 8:42 PM > To: LLVM Developers Mailing List > Subject: Re: [LLVMdev] API to retrieve current time. > > > What's the API to retrieve current time of day in llc? > > I need to use this to generate an unique number every time llc runs. > > The llvm.readcyclecounter might suit your needs: > http://www.llvm.org/docs/LangRef.html#int_readcyclecounter >I need this at compile-time. I want to use this number in the generated .s file. - Sanjiv
Hello, Sanjiv> I need this at compile-time. I want to use this number in the generated > .s file.time(0) ? -- With best regards, Anton Korobeynikov. Faculty of Mathematics & Mechanics, Saint Petersburg State University.
Note that using the current time won't be unique in the case of concurrent llc runs. Dan On Jun 15, 2008, at 7:57 AM, Sanjiv.Gupta at microchip.com wrote:> What's the API to retrieve current time of day in llc? > I need to use this to generate an unique number every time llc runs. > > TIA > - Sanjiv > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev