ExecutionEngine: refactor interface

The OptLevel is now redundant with the TargetMachine*.
And selectTarget() isn't really JIT-specific and could probably
get refactored into one of the lower level libraries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146355 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dylan Noblesmith
2011-12-12 04:20:36 +00:00
parent d93e4c3496
commit 9ea47179e6
7 changed files with 30 additions and 38 deletions

View File

@@ -42,6 +42,7 @@ class MachineCodeInfo;
class Module;
class MutexGuard;
class TargetData;
class Triple;
class Type;
/// \brief Helper class for helping synchronize access to the global address map
@@ -133,14 +134,12 @@ protected:
Module *M,
std::string *ErrorStr,
JITMemoryManager *JMM,
CodeGenOpt::Level OptLevel,
bool GVsWithCode,
TargetMachine *TM);
static ExecutionEngine *(*MCJITCtor)(
Module *M,
std::string *ErrorStr,
JITMemoryManager *JMM,
CodeGenOpt::Level OptLevel,
bool GVsWithCode,
TargetMachine *TM);
static ExecutionEngine *(*InterpCtor)(Module *M, std::string *ErrorStr);
@@ -584,7 +583,7 @@ public:
/// selectTarget - Pick a target either via -march or by guessing the native
/// arch. Add any CPU features specified via -mcpu or -mattr.
static TargetMachine *selectTarget(Module *M,
static TargetMachine *selectTarget(const Triple &TargetTriple,
StringRef MArch,
StringRef MCPU,
const SmallVectorImpl<std::string>& MAttrs,