diff options
author | Tim Rowley <[email protected]> | 2016-08-09 15:29:06 -0600 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2016-08-10 11:09:42 -0500 |
commit | 9aa75e5d46b9c2cf4eba2c182874a86ea9f5464a (patch) | |
tree | 201e4b6a84524220724d574384766f5116a03bc6 /src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp | |
parent | b311bdf92d65a0704faf8e89caa506d6d18c07e6 (diff) |
swr: [rasterizer jitter] add core string to JitManager
Signed-off-by: Tim Rowley <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp')
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp index 6637cdd7619..4540105ed9a 100644 --- a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp +++ b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp @@ -76,7 +76,7 @@ using namespace llvm; ////////////////////////////////////////////////////////////////////////// /// @brief Contructor for JitManager. /// @param simdWidth - SIMD width to be used in generated program. -JitManager::JitManager(uint32_t simdWidth, const char *arch) +JitManager::JitManager(uint32_t simdWidth, const char *arch, const char* core) : mContext(), mBuilder(mContext), mIsModuleFinalized(true), mJitNumber(0), mVWidth(simdWidth), mArch(arch) { InitializeNativeTarget(); @@ -96,6 +96,9 @@ JitManager::JitManager(uint32_t simdWidth, const char *arch) //tOpts.PrintMachineCode = true; + mCore = std::string(core); + std::transform(mCore.begin(), mCore.end(), mCore.begin(), ::tolower); + std::stringstream fnName("JitModule", std::ios_base::in | std::ios_base::out | std::ios_base::ate); fnName << mJitNumber++; std::unique_ptr<Module> newModule(new Module(fnName.str(), mContext)); @@ -357,9 +360,9 @@ extern "C" ////////////////////////////////////////////////////////////////////////// /// @brief Create JIT context. /// @param simdWidth - SIMD width to be used in generated program. - HANDLE JITCALL JitCreateContext(uint32_t targetSimdWidth, const char* arch) + HANDLE JITCALL JitCreateContext(uint32_t targetSimdWidth, const char* arch, const char* core) { - return new JitManager(targetSimdWidth, arch); + return new JitManager(targetSimdWidth, arch, core); } ////////////////////////////////////////////////////////////////////////// |