diff options
author | Eric Christopher <echristo@apple.com> | 2009-11-17 21:58:16 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2009-11-17 21:58:16 +0000 |
commit | 88b5aca20a6dd0a8b15ff620bdee59aae567d245 (patch) | |
tree | ffd061c9069b4940a9f10b8db2c889867791f740 /include/llvm/ExecutionEngine | |
parent | 6c8a0715c40cf1d6465f732969c187910bf8d128 (diff) | |
download | llvm-88b5aca20a6dd0a8b15ff620bdee59aae567d245.tar.gz llvm-88b5aca20a6dd0a8b15ff620bdee59aae567d245.tar.bz2 llvm-88b5aca20a6dd0a8b15ff620bdee59aae567d245.tar.xz |
Add ability to set code model within the execution engine builders
and creation interfaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89151 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ExecutionEngine')
-rw-r--r-- | include/llvm/ExecutionEngine/ExecutionEngine.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/include/llvm/ExecutionEngine/ExecutionEngine.h b/include/llvm/ExecutionEngine/ExecutionEngine.h index f8274efa2e..d2c547dcf1 100644 --- a/include/llvm/ExecutionEngine/ExecutionEngine.h +++ b/include/llvm/ExecutionEngine/ExecutionEngine.h @@ -113,7 +113,8 @@ protected: std::string *ErrorStr, JITMemoryManager *JMM, CodeGenOpt::Level OptLevel, - bool GVsWithCode); + bool GVsWithCode, + CodeModel::Model CMM); static ExecutionEngine *(*InterpCtor)(ModuleProvider *MP, std::string *ErrorStr); @@ -173,7 +174,9 @@ public: JITMemoryManager *JMM = 0, CodeGenOpt::Level OptLevel = CodeGenOpt::Default, - bool GVsWithCode = true); + bool GVsWithCode = true, + CodeModel::Model CMM = + CodeModel::Default); /// addModuleProvider - Add a ModuleProvider to the list of modules that we /// can JIT from. Note that this takes ownership of the ModuleProvider: when @@ -425,6 +428,7 @@ class EngineBuilder { CodeGenOpt::Level OptLevel; JITMemoryManager *JMM; bool AllocateGVsWithCode; + CodeModel::Model CMModel; /// InitEngine - Does the common initialization of default options. /// @@ -434,6 +438,7 @@ class EngineBuilder { OptLevel = CodeGenOpt::Default; JMM = NULL; AllocateGVsWithCode = false; + CMModel = CodeModel::Default; } public: @@ -478,6 +483,13 @@ class EngineBuilder { return *this; } + /// setCodeModel - Set the CodeModel that the ExecutionEngine target + /// data is using. Defaults to target specific default "CodeModel::Default". + EngineBuilder &setCodeModel(CodeModel::Model M) { + CMModel = M; + return *this; + } + /// setAllocateGVsWithCode - Sets whether global values should be allocated /// into the same buffer as code. For most applications this should be set /// to false. Allocating globals with code breaks freeMachineCodeForFunction |