diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-12-02 22:16:29 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-12-02 22:16:29 +0000 |
commit | 8a8d479214745c82ef00f08d4e4f1c173b5f9ce2 (patch) | |
tree | db4233da588d41bdf07d31520db63e841eb5dce4 /include/llvm/Support/TargetRegistry.h | |
parent | c4f0b309eeaa479de9bbf62eaf304931a526f622 (diff) | |
download | llvm-8a8d479214745c82ef00f08d4e4f1c173b5f9ce2.tar.gz llvm-8a8d479214745c82ef00f08d4e4f1c173b5f9ce2.tar.bz2 llvm-8a8d479214745c82ef00f08d4e4f1c173b5f9ce2.tar.xz |
Move global variables in TargetMachine into new TargetOptions class. As an API
change, now you need a TargetOptions object to create a TargetMachine. Clang
patch to follow.
One small functionality change in PTX. PTX had commented out the machine
verifier parts in their copy of printAndVerify. That now calls the version in
LLVMTargetMachine. Users of PTX who need verification disabled should rely on
not passing the command-line flag to enable it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145714 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/TargetRegistry.h')
-rw-r--r-- | include/llvm/Support/TargetRegistry.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/llvm/Support/TargetRegistry.h b/include/llvm/Support/TargetRegistry.h index e1ef39e5c6..ea55c91841 100644 --- a/include/llvm/Support/TargetRegistry.h +++ b/include/llvm/Support/TargetRegistry.h @@ -44,6 +44,7 @@ namespace llvm { class MCTargetAsmLexer; class MCTargetAsmParser; class TargetMachine; + class TargetOptions; class raw_ostream; class formatted_raw_ostream; @@ -86,6 +87,7 @@ namespace llvm { StringRef TT, StringRef CPU, StringRef Features, + const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL); @@ -334,13 +336,14 @@ namespace llvm { /// either the target triple from the module, or the target triple of the /// host if that does not exist. TargetMachine *createTargetMachine(StringRef Triple, StringRef CPU, - StringRef Features, + StringRef Features, const TargetOptions &Options, Reloc::Model RM = Reloc::Default, CodeModel::Model CM = CodeModel::Default, CodeGenOpt::Level OL = CodeGenOpt::Default) const { if (!TargetMachineCtorFn) return 0; - return TargetMachineCtorFn(*this, Triple, CPU, Features, RM, CM, OL); + return TargetMachineCtorFn(*this, Triple, CPU, Features, Options, + RM, CM, OL); } /// createMCAsmBackend - Create a target specific assembly parser. @@ -1017,10 +1020,11 @@ namespace llvm { private: static TargetMachine *Allocator(const Target &T, StringRef TT, StringRef CPU, StringRef FS, + const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL) { - return new TargetMachineImpl(T, TT, CPU, FS, RM, CM, OL); + return new TargetMachineImpl(T, TT, CPU, FS, Options, RM, CM, OL); } }; |