mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 17:50:12 +01:00
swr: [rasterizer jitter] Remove HAVE_LLVM tests supporting llvm < 3.8
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
This commit is contained in:
parent
973d38801d
commit
af909c0200
4 changed files with 0 additions and 52 deletions
|
|
@ -206,12 +206,7 @@ bool JitManager::SetupModuleFromIR(const uint8_t *pIR, size_t length)
|
|||
return false;
|
||||
}
|
||||
|
||||
#if HAVE_LLVM == 0x307
|
||||
// llvm-3.7 has mismatched setDataLyout/getDataLayout APIs
|
||||
newModule->setDataLayout(*mpExec->getDataLayout());
|
||||
#else
|
||||
newModule->setDataLayout(mpExec->getDataLayout());
|
||||
#endif
|
||||
|
||||
mpCurrentModule = newModule.get();
|
||||
#if defined(_WIN32)
|
||||
|
|
@ -256,12 +251,7 @@ void JitManager::DumpAsm(Function* pFunction, const char* fileName)
|
|||
sprintf(fName, "%s.%s.asm", funcName, fileName);
|
||||
#endif
|
||||
|
||||
#if HAVE_LLVM == 0x306
|
||||
raw_fd_ostream fd(fName, EC, llvm::sys::fs::F_None);
|
||||
formatted_raw_ostream filestream(fd);
|
||||
#else
|
||||
raw_fd_ostream filestream(fName, EC, llvm::sys::fs::F_None);
|
||||
#endif
|
||||
|
||||
legacy::PassManager* pMPasses = new legacy::PassManager();
|
||||
auto* pTarget = mpExec->getTargetMachine();
|
||||
|
|
|
|||
|
|
@ -61,15 +61,9 @@
|
|||
|
||||
#include "llvm/Analysis/Passes.h"
|
||||
|
||||
#if HAVE_LLVM == 0x306
|
||||
#include "llvm/PassManager.h"
|
||||
using FunctionPassManager = llvm::FunctionPassManager;
|
||||
using PassManager = llvm::PassManager;
|
||||
#else
|
||||
#include "llvm/IR/LegacyPassManager.h"
|
||||
using FunctionPassManager = llvm::legacy::FunctionPassManager;
|
||||
using PassManager = llvm::legacy::PassManager;
|
||||
#endif
|
||||
|
||||
#include "llvm/CodeGen/Passes.h"
|
||||
#include "llvm/ExecutionEngine/ExecutionEngine.h"
|
||||
|
|
|
|||
|
|
@ -236,13 +236,6 @@ namespace SwrJit
|
|||
return UndefValue::get(VectorType::get(t, mVWidth));
|
||||
}
|
||||
|
||||
#if HAVE_LLVM == 0x306
|
||||
Value *Builder::VINSERT(Value *vec, Value *val, uint64_t index)
|
||||
{
|
||||
return VINSERT(vec, val, C((int64_t)index));
|
||||
}
|
||||
#endif
|
||||
|
||||
Value *Builder::VBROADCAST(Value *src)
|
||||
{
|
||||
// check if src is already a vector
|
||||
|
|
@ -324,7 +317,6 @@ namespace SwrJit
|
|||
return CALLA(Callee, args);
|
||||
}
|
||||
|
||||
#if HAVE_LLVM > 0x306
|
||||
CallInst *Builder::CALL(Value *Callee, Value* arg)
|
||||
{
|
||||
std::vector<Value*> args;
|
||||
|
|
@ -348,7 +340,6 @@ namespace SwrJit
|
|||
args.push_back(arg3);
|
||||
return CALLA(Callee, args);
|
||||
}
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
Value *Builder::DEBUGTRAP()
|
||||
|
|
@ -504,11 +495,7 @@ namespace SwrJit
|
|||
|
||||
// get a pointer to the first character in the constant string array
|
||||
std::vector<Constant*> geplist{C(0),C(0)};
|
||||
#if HAVE_LLVM == 0x306
|
||||
Constant *strGEP = ConstantExpr::getGetElementPtr(gvPtr,geplist,false);
|
||||
#else
|
||||
Constant *strGEP = ConstantExpr::getGetElementPtr(nullptr, gvPtr,geplist,false);
|
||||
#endif
|
||||
|
||||
// insert the pointer to the format string in the argument vector
|
||||
printCallArgs[0] = strGEP;
|
||||
|
|
@ -1536,11 +1523,7 @@ namespace SwrJit
|
|||
Value* Builder::STACKSAVE()
|
||||
{
|
||||
Function* pfnStackSave = Intrinsic::getDeclaration(JM()->mpCurrentModule, Intrinsic::stacksave);
|
||||
#if HAVE_LLVM == 0x306
|
||||
return CALL(pfnStackSave);
|
||||
#else
|
||||
return CALLA(pfnStackSave);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Builder::STACKRESTORE(Value* pSaved)
|
||||
|
|
@ -1594,29 +1577,16 @@ namespace SwrJit
|
|||
|
||||
Value *Builder::VEXTRACTI128(Value* a, Constant* imm8)
|
||||
{
|
||||
#if HAVE_LLVM == 0x306
|
||||
Function *func =
|
||||
Intrinsic::getDeclaration(JM()->mpCurrentModule,
|
||||
Intrinsic::x86_avx_vextractf128_si_256);
|
||||
return CALL(func, {a, imm8});
|
||||
#else
|
||||
bool flag = !imm8->isZeroValue();
|
||||
SmallVector<Constant*,8> idx;
|
||||
for (unsigned i = 0; i < mVWidth / 2; i++) {
|
||||
idx.push_back(C(flag ? i + mVWidth / 2 : i));
|
||||
}
|
||||
return VSHUFFLE(a, VUNDEF_I(), ConstantVector::get(idx));
|
||||
#endif
|
||||
}
|
||||
|
||||
Value *Builder::VINSERTI128(Value* a, Value* b, Constant* imm8)
|
||||
{
|
||||
#if HAVE_LLVM == 0x306
|
||||
Function *func =
|
||||
Intrinsic::getDeclaration(JM()->mpCurrentModule,
|
||||
Intrinsic::x86_avx_vinsertf128_si_256);
|
||||
return CALL(func, {a, b, imm8});
|
||||
#else
|
||||
bool flag = !imm8->isZeroValue();
|
||||
SmallVector<Constant*,8> idx;
|
||||
for (unsigned i = 0; i < mVWidth; i++) {
|
||||
|
|
@ -1632,7 +1602,6 @@ namespace SwrJit
|
|||
idx2.push_back(C(flag ? i + mVWidth / 2 : i));
|
||||
}
|
||||
return VSHUFFLE(a, inter, ConstantVector::get(idx2));
|
||||
#endif
|
||||
}
|
||||
|
||||
// rdtsc buckets macros
|
||||
|
|
|
|||
|
|
@ -59,9 +59,6 @@ Value *VUNDEF_F();
|
|||
Value *VUNDEF_I();
|
||||
Value *VUNDEF(Type* ty, uint32_t size);
|
||||
Value *VUNDEF_IPTR();
|
||||
#if HAVE_LLVM == 0x306
|
||||
Value *VINSERT(Value *vec, Value *val, uint64_t index);
|
||||
#endif
|
||||
Value *VBROADCAST(Value *src);
|
||||
Value *VRCP(Value *va);
|
||||
Value *VPLANEPS(Value* vA, Value* vB, Value* vC, Value* &vX, Value* &vY);
|
||||
|
|
@ -72,12 +69,10 @@ int32_t S_IMMED(Value* i);
|
|||
Value *GEP(Value* ptr, const std::initializer_list<Value*> &indexList);
|
||||
Value *GEP(Value* ptr, const std::initializer_list<uint32_t> &indexList);
|
||||
CallInst *CALL(Value *Callee, const std::initializer_list<Value*> &args);
|
||||
#if HAVE_LLVM > 0x306
|
||||
CallInst *CALL(Value *Callee) { return CALLA(Callee); }
|
||||
CallInst *CALL(Value *Callee, Value* arg);
|
||||
CallInst *CALL2(Value *Callee, Value* arg1, Value* arg2);
|
||||
CallInst *CALL3(Value *Callee, Value* arg1, Value* arg2, Value* arg3);
|
||||
#endif
|
||||
|
||||
LoadInst *LOAD(Value *BasePtr, const std::initializer_list<uint32_t> &offset, const llvm::Twine& name = "");
|
||||
LoadInst *LOADV(Value *BasePtr, const std::initializer_list<Value*> &offset, const llvm::Twine& name = "");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue