From a668b46733310bbe9bc578e95ac5171efeceb949 Mon Sep 17 00:00:00 2001 From: Tim Northover Date: Thu, 20 Sep 2012 08:46:30 +0000 Subject: 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 --- tools/lli/lli.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools/lli/lli.cpp') 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(JMM)->invalidateInstructionCache(); -- cgit v1.2.3