[LLVMdev] MCJIT and Kaleidoscope Tutorial

David Tweed david.tweed at arm.com
Tue Jun 4 07:05:35 PDT 2013


| 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. 

Cheers,
Dave







More information about the llvm-dev mailing list