diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-07-20 07:51:56 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-07-20 07:51:56 +0000 |
commit | efd9b4240f78a632b7e46697a94db6c74d2487b9 (patch) | |
tree | 32a97747ae79f5b6d584f499cbdc4e35c13b41ec /llvm/lib/ExecutionEngine/TargetSelect.cpp | |
parent | d2b92d6544c06d8a7af6939a587b781ca1d37342 (diff) | |
download | bcm5719-llvm-efd9b4240f78a632b7e46697a94db6c74d2487b9.tar.gz bcm5719-llvm-efd9b4240f78a632b7e46697a94db6c74d2487b9.zip |
- Move CodeModel from a TargetMachine global option to MCCodeGenInfo.
- Introduce JITDefault code model. This tells targets to set different default
code model for JIT. This eliminates the ugly hack in TargetMachine where
code model is changed after construction.
llvm-svn: 135580
Diffstat (limited to 'llvm/lib/ExecutionEngine/TargetSelect.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/TargetSelect.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/TargetSelect.cpp b/llvm/lib/ExecutionEngine/TargetSelect.cpp index 32dcf9e22ec..7f7931c4c87 100644 --- a/llvm/lib/ExecutionEngine/TargetSelect.cpp +++ b/llvm/lib/ExecutionEngine/TargetSelect.cpp @@ -31,6 +31,7 @@ TargetMachine *EngineBuilder::selectTarget(Module *Mod, StringRef MCPU, const SmallVectorImpl<std::string>& MAttrs, Reloc::Model RM, + CodeModel::Model CM, std::string *ErrorStr) { Triple TheTriple(Mod->getTargetTriple()); if (TheTriple.getTriple().empty()) @@ -85,7 +86,8 @@ TargetMachine *EngineBuilder::selectTarget(Module *Mod, // Allocate a target... TargetMachine *Target = TheTarget->createTargetMachine(TheTriple.getTriple(), - MCPU, FeaturesStr, RM); + MCPU, FeaturesStr, + RM, CM); assert(Target && "Could not allocate target machine!"); return Target; } |