summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.h
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2018-05-30 01:57:45 +0000
committerLang Hames <lhames@gmail.com>2018-05-30 01:57:45 +0000
commitbd0cb787d05b555791a88640dcf9800bab54d4fa (patch)
tree54462834993763589d348390b6886b1fef1da6fe /llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.h
parentb534510cd55dc979bf6eebd66140cda23ba1f163 (diff)
downloadbcm5719-llvm-bd0cb787d05b555791a88640dcf9800bab54d4fa.tar.gz
bcm5719-llvm-bd0cb787d05b555791a88640dcf9800bab54d4fa.zip
[ORC] Update JITCompileCallbackManager to support multi-threaded code.
Previously JITCompileCallbackManager only supported single threaded code. This patch embeds a VSO (see include/llvm/ExecutionEngine/Orc/Core.h) in the callback manager. The VSO ensures that the compile callback is only executed once and that the resulting address cached for use by subsequent re-entries. llvm-svn: 333490
Diffstat (limited to 'llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.h')
-rw-r--r--llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.h b/llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.h
index 6b2743b9853..c4424e009b4 100644
--- a/llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.h
+++ b/llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.h
@@ -71,11 +71,12 @@ public:
// Use ability to create callback manager to detect whether Orc
// has indirection support on this platform. This way the test
// and Orc code do not get out of sync.
- SupportsIndirection = !!orc::createLocalCompileCallbackManager(TT, 0);
+ SupportsIndirection = !!orc::createLocalCompileCallbackManager(TT, ES, 0);
}
};
protected:
+ orc::ExecutionSession ES;
LLVMContext Context;
std::unique_ptr<TargetMachine> TM;
bool SupportsJIT = false;
OpenPOWER on IntegriCloud