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 <bruce.cherniak@intel.com>
This commit is contained in:
George Kyriazis 2018-03-21 13:23:23 -05:00
parent d68694016c
commit b15fb78df5
4 changed files with 5 additions and 44 deletions

View file

@ -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);

View file

@ -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;

View file

@ -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

View file

@ -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