diff options
author | Emil Velikov <[email protected]> | 2018-02-20 18:01:24 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2018-02-23 19:17:31 +0000 |
commit | 14a2c87c41946794a4ea4870a160b70c01225c4f (patch) | |
tree | 559fe3c7a5a9f86aee4b10dcb70da3650bc5dd94 | |
parent | 5980a41c0f3481aef2a4bc644d8a3a6c8618da46 (diff) |
swr: remove dead LLVM code paths
LLVM requirement was bumped to 4.0.0 with earlier commit.
Hence any code tailored for older versions is now unreachable.
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-By: George Kyriazis <[email protected]>
Reviewed-by: Andres Gomez <[email protected]>
3 files changed, 0 insertions, 28 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp index 8092c144025..ab7c6eb15b0 100644 --- a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp +++ b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp @@ -71,11 +71,6 @@ JitManager::JitManager(uint32_t simdWidth, const char *arch, const char* core) tOpts.NoInfsFPMath = false; tOpts.NoNaNsFPMath = false; tOpts.UnsafeFPMath = false; -#if defined(_DEBUG) -#if LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR < 7 - tOpts.NoFramePointerElim = true; -#endif -#endif //tOpts.PrintMachineCode = true; @@ -249,15 +244,9 @@ DIType* JitManager::GetDebugType(Type* pTy) switch (id) { case Type::VoidTyID: return builder.createUnspecifiedType("void"); break; -#if LLVM_VERSION_MAJOR >= 4 case Type::HalfTyID: return builder.createBasicType("float16", 16, dwarf::DW_ATE_float); break; case Type::FloatTyID: return builder.createBasicType("float", 32, dwarf::DW_ATE_float); break; case Type::DoubleTyID: return builder.createBasicType("double", 64, dwarf::DW_ATE_float); break; -#else - case Type::HalfTyID: return builder.createBasicType("float16", 16, 0, dwarf::DW_ATE_float); break; - case Type::FloatTyID: return builder.createBasicType("float", 32, 0, dwarf::DW_ATE_float); break; - case Type::DoubleTyID: return builder.createBasicType("double", 64, 0, dwarf::DW_ATE_float); break; -#endif case Type::IntegerTyID: return GetDebugIntegerType(pTy); break; case Type::StructTyID: return GetDebugStructType(pTy); break; case Type::ArrayTyID: return GetDebugArrayType(pTy); break; @@ -294,19 +283,11 @@ DIType* JitManager::GetDebugIntegerType(Type* pTy) IntegerType* pIntTy = cast<IntegerType>(pTy); switch (pIntTy->getBitWidth()) { -#if LLVM_VERSION_MAJOR >= 4 case 1: return builder.createBasicType("int1", 1, dwarf::DW_ATE_unsigned); break; case 8: return builder.createBasicType("int8", 8, dwarf::DW_ATE_signed); break; case 16: return builder.createBasicType("int16", 16, dwarf::DW_ATE_signed); break; case 32: return builder.createBasicType("int", 32, dwarf::DW_ATE_signed); break; case 64: return builder.createBasicType("int64", 64, dwarf::DW_ATE_signed); break; -#else - case 1: return builder.createBasicType("int1", 1, 0, dwarf::DW_ATE_unsigned); break; - case 8: return builder.createBasicType("int8", 8, 0, dwarf::DW_ATE_signed); break; - case 16: return builder.createBasicType("int16", 16, 0, dwarf::DW_ATE_signed); break; - case 32: return builder.createBasicType("int", 32, 0, dwarf::DW_ATE_signed); break; - case 64: return builder.createBasicType("int64", 64, 0, dwarf::DW_ATE_signed); break; -#endif default: SWR_ASSERT(false, "Unimplemented integer bit width"); } return nullptr; diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp b/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp index f7d0402a3d4..3bba6ff04f3 100644 --- a/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp +++ b/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp @@ -117,12 +117,7 @@ namespace SwrJit } else { - // maskload intrinsic expects integer mask operand in llvm >= 3.8 -#if (LLVM_VERSION_MAJOR > 3) || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 8) mask = BITCAST(mask, VectorType::get(mInt32Ty, mVWidth)); -#else - mask = BITCAST(mask, VectorType::get(mFP32Ty, mVWidth)); -#endif Function *func = Intrinsic::getDeclaration(JM()->mpCurrentModule, Intrinsic::x86_avx_maskload_ps_256); vResult = BITCAST(CALL(func, { src,mask }), VectorType::get(mInt32Ty, mVWidth)); } diff --git a/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp b/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp index 53c03214aad..031bced8a0a 100644 --- a/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp +++ b/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp @@ -105,12 +105,8 @@ using PassManager = llvm::legacy::PassManager; #include "llvm/Support/MemoryBuffer.h" #include "llvm/Config/llvm-config.h" -#if LLVM_VERSION_MAJOR < 4 -#include "llvm/Bitcode/ReaderWriter.h" -#else #include "llvm/Bitcode/BitcodeWriter.h" #include "llvm/Bitcode/BitcodeReader.h" -#endif #if LLVM_USE_INTEL_JITEVENTS #include "llvm/ExecutionEngine/JITEventListener.h" |