<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class="">Thank you, Emil, for the cleanup!</div>
<div class=""><br class="">
</div>
Reviewed-By: George Kyriazis <<a href="mailto:george.kyriazis@intel.com" class="">george.kyriazis@intel.com</a>>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Feb 20, 2018, at 12:03 PM, Emil Velikov <<a href="mailto:emil.l.velikov@gmail.com" class="">emil.l.velikov@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">From: Emil Velikov <<a href="mailto:emil.velikov@collabora.com" class="">emil.velikov@collabora.com</a>><br class="">
<br class="">
LLVM requirement was bumped to 4.0.0 with earlier commit.<br class="">
Hence any code tailored for older versions is now unreachable.<br class="">
<br class="">
Cc: George Kyriazis <<a href="mailto:george.kyriazis@intel.com" class="">george.kyriazis@intel.com</a>><br class="">
Cc: Andres Gomez <<a href="mailto:agomez@igalia.com" class="">agomez@igalia.com</a>><br class="">
Signed-off-by: Emil Velikov <<a href="mailto:emil.velikov@collabora.com" class="">emil.velikov@collabora.com</a>><br class="">
---<br class="">
.../drivers/swr/rasterizer/jitter/JitManager.cpp | 19 -------------------<br class="">
.../drivers/swr/rasterizer/jitter/builder_mem.cpp | 5 -----<br class="">
src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp | 4 ----<br class="">
3 files changed, 28 deletions(-)<br class="">
<br class="">
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp<br class="">
index 8092c144025..ab7c6eb15b0 100644<br class="">
--- a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp<br class="">
+++ b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp<br class="">
@@ -71,11 +71,6 @@ JitManager::JitManager(uint32_t simdWidth, const char *arch, const char* core)<br class="">
tOpts.NoInfsFPMath = false;<br class="">
tOpts.NoNaNsFPMath = false;<br class="">
tOpts.UnsafeFPMath = false;<br class="">
-#if defined(_DEBUG)<br class="">
-#if LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR < 7<br class="">
- tOpts.NoFramePointerElim = true;<br class="">
-#endif<br class="">
-#endif<br class="">
<br class="">
//tOpts.PrintMachineCode = true;<br class="">
<br class="">
@@ -249,15 +244,9 @@ DIType* JitManager::GetDebugType(Type* pTy)<br class="">
switch (id)<br class="">
{<br class="">
case Type::VoidTyID: return builder.createUnspecifiedType("void"); break;<br class="">
-#if LLVM_VERSION_MAJOR >= 4<br class="">
case Type::HalfTyID: return builder.createBasicType("float16", 16, dwarf::DW_ATE_float); break;<br class="">
case Type::FloatTyID: return builder.createBasicType("float", 32, dwarf::DW_ATE_float); break;<br class="">
case Type::DoubleTyID: return builder.createBasicType("double", 64, dwarf::DW_ATE_float); break;<br class="">
-#else <br class="">
- case Type::HalfTyID: return builder.createBasicType("float16", 16, 0, dwarf::DW_ATE_float); break;<br class="">
- case Type::FloatTyID: return builder.createBasicType("float", 32, 0, dwarf::DW_ATE_float); break;<br class="">
- case Type::DoubleTyID: return builder.createBasicType("double", 64, 0, dwarf::DW_ATE_float); break;<br class="">
-#endif <br class="">
case Type::IntegerTyID: return GetDebugIntegerType(pTy); break;<br class="">
case Type::StructTyID: return GetDebugStructType(pTy); break;<br class="">
case Type::ArrayTyID: return GetDebugArrayType(pTy); break;<br class="">
@@ -294,19 +283,11 @@ DIType* JitManager::GetDebugIntegerType(Type* pTy)<br class="">
IntegerType* pIntTy = cast<IntegerType>(pTy);<br class="">
switch (pIntTy->getBitWidth())<br class="">
{<br class="">
-#if LLVM_VERSION_MAJOR >= 4<br class="">
case 1: return builder.createBasicType("int1", 1, dwarf::DW_ATE_unsigned); break;<br class="">
case 8: return builder.createBasicType("int8", 8, dwarf::DW_ATE_signed); break;<br class="">
case 16: return builder.createBasicType("int16", 16, dwarf::DW_ATE_signed); break;<br class="">
case 32: return builder.createBasicType("int", 32, dwarf::DW_ATE_signed); break;<br class="">
case 64: return builder.createBasicType("int64", 64, dwarf::DW_ATE_signed); break;<br class="">
-#else <br class="">
- case 1: return builder.createBasicType("int1", 1, 0, dwarf::DW_ATE_unsigned); break;<br class="">
- case 8: return builder.createBasicType("int8", 8, 0, dwarf::DW_ATE_signed); break;<br class="">
- case 16: return builder.createBasicType("int16", 16, 0, dwarf::DW_ATE_signed); break;<br class="">
- case 32: return builder.createBasicType("int", 32, 0, dwarf::DW_ATE_signed); break;<br class="">
- case 64: return builder.createBasicType("int64", 64, 0, dwarf::DW_ATE_signed); break;<br class="">
-#endif <br class="">
default: SWR_ASSERT(false, "Unimplemented integer bit width");<br class="">
}<br class="">
return nullptr;<br class="">
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp b/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp<br class="">
index f7d0402a3d4..3bba6ff04f3 100644<br class="">
--- a/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp<br class="">
+++ b/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp<br class="">
@@ -117,12 +117,7 @@ namespace SwrJit<br class="">
}<br class="">
else<br class="">
{<br class="">
- // maskload intrinsic expects integer mask operand in llvm >= 3.8<br class="">
-#if (LLVM_VERSION_MAJOR > 3) || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 8)<br class="">
mask = BITCAST(mask, VectorType::get(mInt32Ty, mVWidth));<br class="">
-#else<br class="">
- mask = BITCAST(mask, VectorType::get(mFP32Ty, mVWidth));<br class="">
-#endif<br class="">
Function *func = Intrinsic::getDeclaration(JM()->mpCurrentModule, Intrinsic::x86_avx_maskload_ps_256);<br class="">
vResult = BITCAST(CALL(func, { src,mask }), VectorType::get(mInt32Ty, mVWidth));<br class="">
}<br class="">
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp b/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp<br class="">
index 53c03214aad..031bced8a0a 100644<br class="">
--- a/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp<br class="">
+++ b/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp<br class="">
@@ -105,12 +105,8 @@ using PassManager = llvm::legacy::PassManager;<br class="">
#include "llvm/Support/MemoryBuffer.h"<br class="">
#include "llvm/Config/llvm-config.h"<br class="">
<br class="">
-#if LLVM_VERSION_MAJOR < 4<br class="">
-#include "llvm/Bitcode/ReaderWriter.h"<br class="">
-#else<br class="">
#include "llvm/Bitcode/BitcodeWriter.h"<br class="">
#include "llvm/Bitcode/BitcodeReader.h"<br class="">
-#endif<br class="">
<br class="">
#if LLVM_USE_INTEL_JITEVENTS<br class="">
#include "llvm/ExecutionEngine/JITEventListener.h"<br class="">
-- <br class="">
2.16.0<br class="">
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>