diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-07-15 20:24:03 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-07-15 20:24:03 +0000 |
commit | 51b198af83cb0080c2709b04c129a3d774c07765 (patch) | |
tree | 7d6c8b0869f698fb07f0ef49b12c444a1c9ed668 /lib/ExecutionEngine/JIT | |
parent | e4d54d72bd159e8b39da152557268da95a40800c (diff) | |
download | external_llvm-51b198af83cb0080c2709b04c129a3d774c07765.zip external_llvm-51b198af83cb0080c2709b04c129a3d774c07765.tar.gz external_llvm-51b198af83cb0080c2709b04c129a3d774c07765.tar.bz2 |
Reapply TargetRegistry refactoring commits.
--- Reverse-merging r75799 into '.':
U test/Analysis/PointerTracking
U include/llvm/Target/TargetMachineRegistry.h
U include/llvm/Target/TargetMachine.h
U include/llvm/Target/TargetRegistry.h
U include/llvm/Target/TargetSelect.h
U tools/lto/LTOCodeGenerator.cpp
U tools/lto/LTOModule.cpp
U tools/llc/llc.cpp
U lib/Target/PowerPC/PPCTargetMachine.h
U lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
U lib/Target/PowerPC/PPCTargetMachine.cpp
U lib/Target/PowerPC/PPC.h
U lib/Target/ARM/ARMTargetMachine.cpp
U lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
U lib/Target/ARM/ARMTargetMachine.h
U lib/Target/ARM/ARM.h
U lib/Target/XCore/XCoreTargetMachine.cpp
U lib/Target/XCore/XCoreTargetMachine.h
U lib/Target/PIC16/PIC16TargetMachine.cpp
U lib/Target/PIC16/PIC16TargetMachine.h
U lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp
U lib/Target/Alpha/AlphaTargetMachine.cpp
U lib/Target/Alpha/AlphaTargetMachine.h
U lib/Target/X86/X86TargetMachine.h
U lib/Target/X86/X86.h
U lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h
U lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
U lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h
U lib/Target/X86/X86TargetMachine.cpp
U lib/Target/MSP430/MSP430TargetMachine.cpp
U lib/Target/MSP430/MSP430TargetMachine.h
U lib/Target/CppBackend/CPPTargetMachine.h
U lib/Target/CppBackend/CPPBackend.cpp
U lib/Target/CBackend/CTargetMachine.h
U lib/Target/CBackend/CBackend.cpp
U lib/Target/TargetMachine.cpp
U lib/Target/IA64/IA64TargetMachine.cpp
U lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp
U lib/Target/IA64/IA64TargetMachine.h
U lib/Target/IA64/IA64.h
U lib/Target/MSIL/MSILWriter.cpp
U lib/Target/CellSPU/SPUTargetMachine.h
U lib/Target/CellSPU/SPU.h
U lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp
U lib/Target/CellSPU/SPUTargetMachine.cpp
U lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
U lib/Target/Mips/MipsTargetMachine.cpp
U lib/Target/Mips/MipsTargetMachine.h
U lib/Target/Mips/Mips.h
U lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp
U lib/Target/Sparc/SparcTargetMachine.cpp
U lib/Target/Sparc/SparcTargetMachine.h
U lib/ExecutionEngine/JIT/TargetSelect.cpp
U lib/Support/TargetRegistry.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75820 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/JIT')
-rw-r--r-- | lib/ExecutionEngine/JIT/TargetSelect.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/lib/ExecutionEngine/JIT/TargetSelect.cpp b/lib/ExecutionEngine/JIT/TargetSelect.cpp index 24dd013..93ad81f 100644 --- a/lib/ExecutionEngine/JIT/TargetSelect.cpp +++ b/lib/ExecutionEngine/JIT/TargetSelect.cpp @@ -45,19 +45,22 @@ ExecutionEngine *JIT::createJIT(ModuleProvider *MP, std::string *ErrorStr, JITMemoryManager *JMM, CodeGenOpt::Level OptLevel, bool AllocateGVsWithCode) { - const TargetMachineRegistry::entry *TheArch = MArch; - if (TheArch == 0) { + const Target *TheTarget; + if (MArch == 0) { std::string Error; - TheArch = TargetMachineRegistry::getClosestTargetForJIT(Error); - if (TheArch == 0) { + TheTarget = TargetRegistry::getClosestTargetForJIT(Error); + if (TheTarget == 0) { if (ErrorStr) *ErrorStr = Error; return 0; } - } else if (TheArch->JITMatchQualityFn() == 0) { - cerr << "WARNING: This target JIT is not designed for the host you are" - << " running. If bad things happen, please choose a different " - << "-march switch.\n"; + } else { + TheTarget = &MArch->TheTarget; + if (TheTarget->getJITMatchQuality() == 0) { + cerr << "WARNING: This target JIT is not designed for the host you are" + << " running. If bad things happen, please choose a different " + << "-march switch.\n"; + } } // Package up features to be passed to target/subtarget @@ -71,7 +74,8 @@ ExecutionEngine *JIT::createJIT(ModuleProvider *MP, std::string *ErrorStr, } // Allocate a target... - TargetMachine *Target = TheArch->CtorFn(*MP->getModule(), FeaturesStr); + TargetMachine *Target = + TheTarget->createTargetMachine(*MP->getModule(), FeaturesStr); assert(Target && "Could not allocate target machine!"); // If the target supports JIT code generation, return a new JIT now. |