diff options
author | Jim Grosbach <grosbach@apple.com> | 2012-08-28 23:22:30 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2012-08-28 23:22:30 +0000 |
commit | 5da959daff4d509afab8de212e0c95162c00d1bb (patch) | |
tree | b4b48c6c7001c81517b4e598561904dfda7fcb8b /tools | |
parent | d26200423ee818e54d4088bd0c499caf840d866d (diff) | |
download | external_llvm-5da959daff4d509afab8de212e0c95162c00d1bb.zip external_llvm-5da959daff4d509afab8de212e0c95162c00d1bb.tar.gz external_llvm-5da959daff4d509afab8de212e0c95162c00d1bb.tar.bz2 |
LLI: move instruction cache tweaks.
Invalidate the instruction cache right before we start actually executing code, otherwise
we can miss some that came later. This is still not quite right for a truly lazilly
compiled environment, but it's closer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162803 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lli/lli.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp index b6c9299..3a3f4c7 100644 --- a/tools/lli/lli.cpp +++ b/tools/lli/lli.cpp @@ -466,10 +466,6 @@ int main(int argc, char **argv, char * const *envp) { exit(1); } - // Clear instruction cache before code will be executed. - if (JMM) - JMM->invalidateInstructionCache(); - // The following functions have no effect if their respective profiling // support wasn't enabled in the build configuration. EE->RegisterJITEventListener( @@ -524,6 +520,10 @@ int main(int argc, char **argv, char * const *envp) { } } + // Clear instruction cache before code will be executed. + if (JMM) + JMM->invalidateInstructionCache(); + // Run main. int Result = EE->runFunctionAsMain(EntryFn, InputArgv, envp); |