summaryrefslogtreecommitdiffstats
path: root/include/llvm/Target/TargetMachine.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-07-20 07:51:56 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-07-20 07:51:56 +0000
commit34ad6db8b958fdc0d38e122edf753b5326e69b03 (patch)
treec129b78e36733ba161a2e687349a0eb40d2ec807 /include/llvm/Target/TargetMachine.h
parent4c8164813c1be51f6797fda6826bdf3665f2a7d1 (diff)
downloadexternal_llvm-34ad6db8b958fdc0d38e122edf753b5326e69b03.zip
external_llvm-34ad6db8b958fdc0d38e122edf753b5326e69b03.tar.gz
external_llvm-34ad6db8b958fdc0d38e122edf753b5326e69b03.tar.bz2
- 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135580 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetMachine.h')
-rw-r--r--include/llvm/Target/TargetMachine.h24
1 files changed, 3 insertions, 21 deletions
diff --git a/include/llvm/Target/TargetMachine.h b/include/llvm/Target/TargetMachine.h
index f4c845a..8a8d142 100644
--- a/include/llvm/Target/TargetMachine.h
+++ b/include/llvm/Target/TargetMachine.h
@@ -43,17 +43,6 @@ class TargetSubtargetInfo;
class formatted_raw_ostream;
class raw_ostream;
-// Code model types.
-namespace CodeModel {
- enum Model {
- Default,
- Small,
- Kernel,
- Medium,
- Large
- };
-}
-
// Code generation optimization level.
namespace CodeGenOpt {
enum Level {
@@ -101,7 +90,6 @@ protected: // Can only create subclasses.
std::string TargetFS;
/// CodeGenInfo - Low level target information such as relocation model.
- ///
const MCCodeGenInfo *CodeGenInfo;
/// AsmInfo - Contains target specific asm information.
@@ -214,11 +202,7 @@ public:
/// getCodeModel - Returns the code model. The choices are small, kernel,
/// medium, large, and target default.
- static CodeModel::Model getCodeModel();
-
- /// setCodeModel - Sets the code model.
- ///
- static void setCodeModel(CodeModel::Model Model);
+ CodeModel::Model getCodeModel() const;
/// getAsmVerbosityDefault - Returns the default value of asm verbosity.
///
@@ -301,7 +285,8 @@ public:
class LLVMTargetMachine : public TargetMachine {
protected: // Can only create subclasses.
LLVMTargetMachine(const Target &T, StringRef TargetTriple,
- StringRef CPU, StringRef FS, Reloc::Model RM);
+ StringRef CPU, StringRef FS,
+ Reloc::Model RM, CodeModel::Model CM);
private:
/// addCommonCodeGenPasses - Add standard LLVM codegen passes used for
@@ -310,9 +295,6 @@ private:
bool addCommonCodeGenPasses(PassManagerBase &, CodeGenOpt::Level,
bool DisableVerify, MCContext *&OutCtx);
- virtual void setCodeModelForJIT();
- virtual void setCodeModelForStatic();
-
public:
/// addPassesToEmitFile - Add passes to the specified pass manager to get the
/// specified file emitted. Typically this will involve several steps of code