[llvm-commits] [llvm] r162803 - /llvm/trunk/tools/lli/lli.cpp
Jim Grosbach
grosbach at apple.com
Tue Aug 28 16:22:30 PDT 2012
Author: grosbach
Date: Tue Aug 28 18:22:30 2012
New Revision: 162803
URL: http://llvm.org/viewvc/llvm-project?rev=162803&view=rev
Log:
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.
Modified:
llvm/trunk/tools/lli/lli.cpp
Modified: llvm/trunk/tools/lli/lli.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lli/lli.cpp?rev=162803&r1=162802&r2=162803&view=diff
==============================================================================
--- llvm/trunk/tools/lli/lli.cpp (original)
+++ llvm/trunk/tools/lli/lli.cpp Tue Aug 28 18:22:30 2012
@@ -466,10 +466,6 @@
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 @@
}
}
+ // Clear instruction cache before code will be executed.
+ if (JMM)
+ JMM->invalidateInstructionCache();
+
// Run main.
int Result = EE->runFunctionAsMain(EntryFn, InputArgv, envp);
More information about the llvm-commits
mailing list