From: George Kyriazis Date: Wed, 21 Mar 2018 18:23:23 +0000 (-0500) Subject: swr/rast: Cleanup of JitManager convenience types X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b15fb78df55af2b73b9daf3b585b16c4cec6cf34;p=mesa.git swr/rast: Cleanup of JitManager convenience types Small cleanup. Remove convenience types from JitManager and standardize on the Builder's convenience types. Reviewed-by: Bruce Cherniak --- diff --git a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp index bfb1d2e0c8b..90809647b35 100644 --- a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp +++ b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp @@ -110,11 +110,6 @@ JitManager::JitManager(uint32_t simdWidth, const char *arch, const char* core) mpExec->RegisterJITEventListener(vTune); #endif - mFP32Ty = Type::getFloatTy(mContext); // float type - mInt8Ty = Type::getInt8Ty(mContext); - mInt32Ty = Type::getInt32Ty(mContext); // int type - mInt64Ty = Type::getInt64Ty(mContext); // int type - // fetch function signature #if USE_SIMD16_SHADERS // typedef void(__cdecl *PFN_FETCH_FUNC)(SWR_FETCH_CONTEXT& fetchInfo, simd16vertex& out); @@ -135,20 +130,6 @@ JitManager::JitManager(uint32_t simdWidth, const char *arch, const char* core) mFetchShaderTy = FunctionType::get(Type::getVoidTy(mContext), fsArgs, false); - mSimtFP32Ty = VectorType::get(mFP32Ty, mVWidth); - mSimtInt32Ty = VectorType::get(mInt32Ty, mVWidth); - - mSimdVectorTy = ArrayType::get(mSimtFP32Ty, 4); - mSimdVectorInt32Ty = ArrayType::get(mSimtInt32Ty, 4); - -#if USE_SIMD16_SHADERS - mSimd16FP32Ty = ArrayType::get(mSimtFP32Ty, 2); - mSimd16Int32Ty = ArrayType::get(mSimtInt32Ty, 2); - - mSimd16VectorFP32Ty = ArrayType::get(mSimd16FP32Ty, 4); - mSimd16VectorInt32Ty = ArrayType::get(mSimd16Int32Ty, 4); - -#endif #if defined(_WIN32) // explicitly instantiate used symbols from potentially staticly linked libs sys::DynamicLibrary::AddSymbol("exp2f", &exp2f); diff --git a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.h b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.h index 3660249d421..86e6758ada7 100644 --- a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.h +++ b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.h @@ -143,26 +143,6 @@ struct JitManager uint32_t mVWidth; - // Built in types. - llvm::Type* mInt8Ty; - llvm::Type* mInt32Ty; - llvm::Type* mInt64Ty; - llvm::Type* mFP32Ty; - - llvm::Type* mSimtFP32Ty; - llvm::Type* mSimtInt32Ty; - - llvm::Type* mSimdVectorInt32Ty; - llvm::Type* mSimdVectorTy; - -#if USE_SIMD16_SHADERS - llvm::Type* mSimd16FP32Ty; - llvm::Type* mSimd16Int32Ty; - - llvm::Type* mSimd16VectorFP32Ty; - llvm::Type* mSimd16VectorInt32Ty; - -#endif // fetch shader types llvm::FunctionType* mFetchShaderTy; diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder.cpp b/src/gallium/drivers/swr/rasterizer/jitter/builder.cpp index 260daab8621..625f13287bf 100644 --- a/src/gallium/drivers/swr/rasterizer/jitter/builder.cpp +++ b/src/gallium/drivers/swr/rasterizer/jitter/builder.cpp @@ -42,10 +42,8 @@ namespace SwrJit : mpJitMgr(pJitMgr), mpPrivateContext(nullptr) { - SWR_ASSERT(pJitMgr->mVWidth == 8); - mVWidth = pJitMgr->mVWidth; - mVWidth16 = pJitMgr->mVWidth * 2; + mVWidth16 = 16; mpIRBuilder = &pJitMgr->mBuilder; @@ -67,7 +65,7 @@ namespace SwrJit mSimd4FP64Ty = VectorType::get(mDoubleTy, 4); - // Built in types: simd8 + // Built in types: target simd mSimdInt1Ty = VectorType::get(mInt1Ty, mVWidth); mSimdInt16Ty = VectorType::get(mInt16Ty, mVWidth); @@ -76,6 +74,7 @@ namespace SwrJit mSimdFP16Ty = VectorType::get(mFP16Ty, mVWidth); mSimdFP32Ty = VectorType::get(mFP32Ty, mVWidth); mSimdVectorTy = ArrayType::get(mSimdFP32Ty, 4); + mSimdVectorIntTy= ArrayType::get(mSimdInt32Ty, 4); mSimdVectorTRTy = ArrayType::get(mSimdFP32Ty, 5); // Built in types: simd16 diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder.h b/src/gallium/drivers/swr/rasterizer/jitter/builder.h index 0b57fbf16d4..6b2c9f0e025 100644 --- a/src/gallium/drivers/swr/rasterizer/jitter/builder.h +++ b/src/gallium/drivers/swr/rasterizer/jitter/builder.h @@ -68,7 +68,7 @@ namespace SwrJit Type* mSimd4FP64Ty; - // Built in types: simd8 + // Built in types: target SIMD Type* mSimdFP16Ty; Type* mSimdFP32Ty; @@ -79,6 +79,7 @@ namespace SwrJit Type* mSimdIntPtrTy; Type* mSimdVectorTy; Type* mSimdVectorTRTy; + Type* mSimdVectorIntTy; // Built in types: simd16