aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine/JIT
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ExecutionEngine/JIT')
-rw-r--r--lib/ExecutionEngine/JIT/JIT.h6
-rw-r--r--lib/ExecutionEngine/JIT/TargetSelect.cpp7
2 files changed, 8 insertions, 5 deletions
diff --git a/lib/ExecutionEngine/JIT/JIT.h b/lib/ExecutionEngine/JIT/JIT.h
index 53e8738bb8..414d1c6e68 100644
--- a/lib/ExecutionEngine/JIT/JIT.h
+++ b/lib/ExecutionEngine/JIT/JIT.h
@@ -44,9 +44,11 @@ public:
~JIT();
/// create - Create an return a new JIT compiler if there is one available
- /// for the current target. Otherwise, return null.
+ /// for the current target. Otherwise, return null. If the JIT is created
+ /// successfully, it takes responsibility for deleting the specified
+ /// IntrinsicLowering implementation.
///
- static ExecutionEngine *create(ModuleProvider *MP);
+ static ExecutionEngine *create(ModuleProvider *MP, IntrinsicLowering *IL = 0);
/// run - Start execution with the specified function and arguments.
///
diff --git a/lib/ExecutionEngine/JIT/TargetSelect.cpp b/lib/ExecutionEngine/JIT/TargetSelect.cpp
index 4a381fb5a2..0540862870 100644
--- a/lib/ExecutionEngine/JIT/TargetSelect.cpp
+++ b/lib/ExecutionEngine/JIT/TargetSelect.cpp
@@ -53,8 +53,9 @@ namespace {
/// create - Create an return a new JIT compiler if there is one available
/// for the current target. Otherwise, return null.
///
-ExecutionEngine *JIT::create(ModuleProvider *MP) {
- TargetMachine* (*TargetMachineAllocator)(const Module &) = 0;
+ExecutionEngine *JIT::create(ModuleProvider *MP, IntrinsicLowering *IL) {
+ TargetMachine* (*TargetMachineAllocator)(const Module &,
+ IntrinsicLowering *IL) = 0;
// Allow a command-line switch to override what *should* be the default target
// machine for this platform. This allows for debugging a Sparc JIT on X86 --
@@ -80,7 +81,7 @@ ExecutionEngine *JIT::create(ModuleProvider *MP) {
#endif
// Allocate a target...
- TargetMachine *Target = TargetMachineAllocator(*MP->getModule());
+ TargetMachine *Target = TargetMachineAllocator(*MP->getModule(), IL);
assert(Target && "Could not allocate target machine!");
// If the target supports JIT code generation, return a new JIT now.