[llvm-commits] [PATCH] Fix ARM MCJIT icache invalidation

Jim Grosbach grosbach at apple.com
Tue Sep 18 14:19:43 PDT 2012


On Sep 18, 2012, at 2:14 PM, Renato Golin wrote:

> On 18 September 2012 14:06, Amara Emerson <amara.emerson at arm.com> wrote:
>> Ping. Jim, could you take a look at this? There was a patch for review a
>> while ago which may conflict with this one (refactoring parts of lli and
>> adding MCJIT tests).
> 
> Hi Amara,
> 
> Are you sure you need to invalidate the instruction cache when
> emitting every object?
> 
> I may be wrong, of course, but AFAICT, this is not the semantics right
> now and doesn't strike me as correct (or desirable), though I see why
> it would "work".


Yep, Renato is completely right. icache handling is the responsibility of the client (in this case, lli), not the MCJIT. Doing it in the JIT itself is wrong as it assume the memory the MCJIT is manipulating is the memory that will actually be executed. That's not the model the MCJIT uses. Consider remote execution, for example, with the code being cross-compiled on a remote host (this is how the MCJIT is used by LLDB, for example, so this isn't hypothetical).


-Jim

> 
> -- 
> cheers,
> --renato
> 
> http://systemcall.org/




More information about the llvm-commits mailing list