[Mesa-dev] [PATCH 11/12] swr: remove pre LLVM 5.0 codepaths
Emil Velikov
emil.l.velikov at gmail.com
Wed Oct 31 13:30:03 UTC 2018
From: Emil Velikov <emil.velikov at collabora.com>
LLVM versions earlier than 5.0.1 are no longer supported.
Cc: Alok Hota <alok.hota at intel.com>
Cc: Bruce Cherniak <bruce.cherniak at intel.com>
Cc: George Kyriazis <george.kyriazis at intel.com>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
Hi all,
I know the team does some back and forth import of the codebase
elsewhere. So if this patch causes grief let me know and I'll drop it.
Thanks
Emil
---
.../drivers/swr/rasterizer/jitter/jit_pch.hpp | 10 ----------
src/gallium/drivers/swr/swr_shader.cpp | 18 ------------------
2 files changed, 28 deletions(-)
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp b/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp
index 47f717bfc2a..62b2fc78d9c 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp
@@ -115,7 +115,6 @@ using PassManager = llvm::legacy::PassManager;
#include "llvm/ExecutionEngine/JITEventListener.h"
#endif
-#if LLVM_VERSION_MAJOR >= 5
static const auto Sync_CrossThread = llvm::SyncScope::System;
static const auto Attrib_FunctionIndex = llvm::AttributeList::FunctionIndex;
static inline llvm::AttributeSet GetFuncAttribSet(llvm::LLVMContext& ctx,
@@ -123,15 +122,6 @@ static inline llvm::AttributeSet GetFuncAttribSet(llvm::LLVMContext& ctx,
{
return llvm::AttributeSet::get(ctx, b);
}
-#else
-static const auto Sync_CrossThread = llvm::SynchronizationScope::CrossThread;
-static const auto Attrib_FunctionIndex = llvm::AttributeSet::FunctionIndex;
-static inline llvm::AttributeSet GetFuncAttribSet(llvm::LLVMContext& ctx,
- const llvm::AttrBuilder& b)
-{
- return llvm::AttributeSet::get(ctx, Attrib_FunctionIndex, b);
-}
-#endif
#pragma pop_macro("DEBUG")
diff --git a/src/gallium/drivers/swr/swr_shader.cpp b/src/gallium/drivers/swr/swr_shader.cpp
index afa184fc466..c5dba55bacd 100644
--- a/src/gallium/drivers/swr/swr_shader.cpp
+++ b/src/gallium/drivers/swr/swr_shader.cpp
@@ -596,13 +596,7 @@ BuilderSWR::CompileGS(struct swr_context *ctx, swr_jit_gs_key &key)
GlobalValue::ExternalLinkage,
"GS",
JM()->mpCurrentModule);
-#if HAVE_LLVM < 0x0500
- AttributeSet attrSet = AttributeSet::get(
- JM()->mContext, AttributeSet::FunctionIndex, attrBuilder);
- pFunction->addAttributes(AttributeSet::FunctionIndex, attrSet);
-#else
pFunction->addAttributes(AttributeList::FunctionIndex, attrBuilder);
-#endif
BasicBlock *block = BasicBlock::Create(JM()->mContext, "entry", pFunction);
IRB()->SetInsertPoint(block);
@@ -767,13 +761,7 @@ BuilderSWR::CompileVS(struct swr_context *ctx, swr_jit_vs_key &key)
GlobalValue::ExternalLinkage,
"VS",
JM()->mpCurrentModule);
-#if HAVE_LLVM < 0x0500
- AttributeSet attrSet = AttributeSet::get(
- JM()->mContext, AttributeSet::FunctionIndex, attrBuilder);
- pFunction->addAttributes(AttributeSet::FunctionIndex, attrSet);
-#else
pFunction->addAttributes(AttributeList::FunctionIndex, attrBuilder);
-#endif
BasicBlock *block = BasicBlock::Create(JM()->mContext, "entry", pFunction);
IRB()->SetInsertPoint(block);
@@ -1052,13 +1040,7 @@ BuilderSWR::CompileFS(struct swr_context *ctx, swr_jit_fs_key &key)
GlobalValue::ExternalLinkage,
"FS",
JM()->mpCurrentModule);
-#if HAVE_LLVM < 0x0500
- AttributeSet attrSet = AttributeSet::get(
- JM()->mContext, AttributeSet::FunctionIndex, attrBuilder);
- pFunction->addAttributes(AttributeSet::FunctionIndex, attrSet);
-#else
pFunction->addAttributes(AttributeList::FunctionIndex, attrBuilder);
-#endif
BasicBlock *block = BasicBlock::Create(JM()->mContext, "entry", pFunction);
IRB()->SetInsertPoint(block);
--
2.19.1
More information about the mesa-dev
mailing list