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 | 748b947849eddc1929b7784957f9786ec8441ede (patch) | |
| tree | dd8ea284b74e00241f384ea7e7060ab1dd60b0ef /llvm/tools | |
| parent | 1083b0dea603a9abea643a8e9238e1c4505501cb (diff) | |
| download | bcm5719-llvm-748b947849eddc1929b7784957f9786ec8441ede.tar.gz bcm5719-llvm-748b947849eddc1929b7784957f9786ec8441ede.zip | |
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.
llvm-svn: 162803
Diffstat (limited to 'llvm/tools')
| -rw-r--r-- | llvm/tools/lli/lli.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/tools/lli/lli.cpp b/llvm/tools/lli/lli.cpp index b6c9299c65b..3a3f4c7cddf 100644 --- a/llvm/tools/lli/lli.cpp +++ b/llvm/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); |

