mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-11 08:29:25 +00:00
Pass around IntrinsicLowering instances as appropriate.
Reimplement the Interpreters implementation of va_* to be more direct. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10627 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include "JIT/JIT.h"
|
||||
#include "llvm/Constants.h"
|
||||
#include "llvm/DerivedTypes.h"
|
||||
#include "llvm/IntrinsicLowering.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/ModuleProvider.h"
|
||||
#include "llvm/ExecutionEngine/ExecutionEngine.h"
|
||||
@@ -105,20 +106,23 @@ int ExecutionEngine::runFunctionAsMain(Function *Fn,
|
||||
/// NULL is returned.
|
||||
///
|
||||
ExecutionEngine *ExecutionEngine::create(ModuleProvider *MP,
|
||||
bool ForceInterpreter) {
|
||||
bool ForceInterpreter,
|
||||
IntrinsicLowering *IL) {
|
||||
ExecutionEngine *EE = 0;
|
||||
|
||||
// Unless the interpreter was explicitly selected, make a JIT.
|
||||
// Unless the interpreter was explicitly selected, try making a JIT.
|
||||
if (!ForceInterpreter)
|
||||
EE = JIT::create(MP);
|
||||
EE = JIT::create(MP, IL);
|
||||
|
||||
// If we can't make a JIT, make an interpreter instead.
|
||||
try {
|
||||
if (EE == 0)
|
||||
EE = Interpreter::create(MP->materializeModule());
|
||||
EE = Interpreter::create(MP->materializeModule(), IL);
|
||||
} catch (...) {
|
||||
EE = 0;
|
||||
}
|
||||
|
||||
if (EE == 0) delete IL;
|
||||
return EE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user