summaryrefslogtreecommitdiff
path: root/tools/lli
diff options
context:
space:
mode:
authortnorthover <tnorthover@91177308-0d34-0410-b5e6-96231b3b80d8>2012-09-20 08:46:30 +0000
committertnorthover <tnorthover@91177308-0d34-0410-b5e6-96231b3b80d8>2012-09-20 08:46:30 +0000
commit7be88a63181b5c94164e4b14fe4845c14f4bb68a (patch)
treeed6883350216efd7fccf8f15b57aaec32d6b8305 /tools/lli
parent7048a00349cf096866d45b31a29db8604e7a4717 (diff)
Make sure lli compiles all code before invalidating instruction caches.
Patch from Amara Emerson. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164296 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lli')
-rw-r--r--tools/lli/lli.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp
index 4004b6c4d4..c5645ec601 100644
--- a/tools/lli/lli.cpp
+++ b/tools/lli/lli.cpp
@@ -656,6 +656,9 @@ int main(int argc, char **argv, char * const *envp) {
Target.stop();
} else {
+ // Trigger compilation separately so code regions that need to be
+ // invalidated will be known.
+ (void)EE->getPointerToFunction(EntryFn);
// Clear instruction cache before code will be executed.
if (JMM)
static_cast<LLIMCJITMemoryManager*>(JMM)->invalidateInstructionCache();