[LLVMdev] MCJIT and Kaleidoscope Tutorial
Kaylor, Andrew
andrew.kaylor at intel.com
Tue Jun 4 09:10:38 PDT 2013
Hi Dmitri,
You're right. The lli code should be cleaned up. As David said, there was a time when the call to invalidate the instruction cache was necessary. It isn't necessary anymore.
-Andy
-----Original Message-----
From: Dmitri Rubinstein [mailto:dmitri.rubinstein at googlemail.com]
Sent: Tuesday, June 04, 2013 7:20 AM
To: David Tweed
Cc: Kaylor, Andrew; LLVM Dev
Subject: Re: [LLVMdev] MCJIT and Kaleidoscope Tutorial
Am 04.06.2013 16:05, schrieb David Tweed:
> | I am curious about JMM->invalidInstructionCache(), which I found in
> | lli.cpp implementation. lli.cpp contains also call finalizeObject(),
> | I just overlooked it. lli.cpp calls finalizeObject(), which calls
> | applyPermissions, which in turn calls invalidateInstructionCache. So
> | why lli.cpp does call JMM->invalidInstructionCache() explicitely again ?
>
> My suspicion is it's a historical development; because different
> architectures do or don't actually require cache invalidation the
> calls have tended not to be initially put in, then added when other
> architectures started using the code. When I was doing some cosmetic
> changes related to that I didn't touch lli because the impression
> seemed to be that it was very little used these days, so erring on the
> safe side seemed more important than being completely minimal. In
> general, nowadays lli is not an example of the cleanest way to use MCJIT.
But then there is no clean example of using MCJIT at all, please correct me if I am wrong. I just did a "git grep MCJIT" in the LLVM git repo, and the only tool using MCJIT is lli. Since Kaleidoscope tutorials are not compatible with MCJIT, there is also no tutorial explaining how to use MCJIT.
Best,
Dmitri
>
> Cheers,
> Dave
>
>
>
More information about the llvm-dev
mailing list