diff options
author | Marek Olšák <[email protected]> | 2017-03-05 00:15:31 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-03-06 14:13:04 +0100 |
commit | 7e1faa79d31b44e3b3d7a4dc22d9b136300a761e (patch) | |
tree | 4f747c02d078e71ee4cbfeabe70f439e77174e1d /src/amd | |
parent | d5d74fe2b528da8124193366c9c3ad739a3abd50 (diff) |
radeonsi: drop support for LLVM 3.6 & 3.7
They are too old.
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/common/ac_llvm_build.c | 30 | ||||
-rw-r--r-- | src/amd/common/ac_llvm_helper.cpp | 6 | ||||
-rw-r--r-- | src/amd/common/ac_llvm_util.c | 16 |
3 files changed, 14 insertions, 38 deletions
diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c index 0039e63e840..8996159bf22 100644 --- a/src/amd/common/ac_llvm_build.c +++ b/src/amd/common/ac_llvm_build.c @@ -792,22 +792,16 @@ ac_get_thread_id(struct ac_llvm_context *ctx) { LLVMValueRef tid; - if (HAVE_LLVM < 0x0308) { - tid = ac_build_intrinsic(ctx, "llvm.SI.tid", - ctx->i32, - NULL, 0, AC_FUNC_ATTR_READNONE); - } else { - LLVMValueRef tid_args[2]; - tid_args[0] = LLVMConstInt(ctx->i32, 0xffffffff, false); - tid_args[1] = LLVMConstInt(ctx->i32, 0, false); - tid_args[1] = ac_build_intrinsic(ctx, - "llvm.amdgcn.mbcnt.lo", ctx->i32, - tid_args, 2, AC_FUNC_ATTR_READNONE); - - tid = ac_build_intrinsic(ctx, "llvm.amdgcn.mbcnt.hi", - ctx->i32, tid_args, - 2, AC_FUNC_ATTR_READNONE); - } + LLVMValueRef tid_args[2]; + tid_args[0] = LLVMConstInt(ctx->i32, 0xffffffff, false); + tid_args[1] = LLVMConstInt(ctx->i32, 0, false); + tid_args[1] = ac_build_intrinsic(ctx, + "llvm.amdgcn.mbcnt.lo", ctx->i32, + tid_args, 2, AC_FUNC_ATTR_READNONE); + + tid = ac_build_intrinsic(ctx, "llvm.amdgcn.mbcnt.hi", + ctx->i32, tid_args, + 2, AC_FUNC_ATTR_READNONE); set_range_metadata(ctx, tid, 0, 64); return tid; } @@ -972,15 +966,13 @@ LLVMValueRef ac_build_clamp(struct ac_llvm_context *ctx, LLVMValueRef value) AC_FUNC_ATTR_READNONE); } - const char *intr = HAVE_LLVM >= 0x0308 ? "llvm.AMDGPU.clamp." : - "llvm.AMDIL.clamp."; LLVMValueRef args[3] = { value, LLVMConstReal(ctx->f32, 0), LLVMConstReal(ctx->f32, 1), }; - return ac_build_intrinsic(ctx, intr, ctx->f32, args, 3, + return ac_build_intrinsic(ctx, "llvm.AMDGPU.clamp.", ctx->f32, args, 3, AC_FUNC_ATTR_READNONE | AC_FUNC_ATTR_LEGACY); } diff --git a/src/amd/common/ac_llvm_helper.cpp b/src/amd/common/ac_llvm_helper.cpp index 594339ee8c8..4f03103561e 100644 --- a/src/amd/common/ac_llvm_helper.cpp +++ b/src/amd/common/ac_llvm_helper.cpp @@ -26,10 +26,8 @@ /* based on Marek's patch to lp_bld_misc.cpp */ // Workaround http://llvm.org/PR23628 -#if HAVE_LLVM >= 0x0307 -# pragma push_macro("DEBUG") -# undef DEBUG -#endif +#pragma push_macro("DEBUG") +#undef DEBUG #include "ac_llvm_util.h" #include <llvm-c/Core.h> diff --git a/src/amd/common/ac_llvm_util.c b/src/amd/common/ac_llvm_util.c index 4b5d2fe8ab0..a2fe631c00f 100644 --- a/src/amd/common/ac_llvm_util.c +++ b/src/amd/common/ac_llvm_util.c @@ -35,17 +35,10 @@ static void ac_init_llvm_target() { -#if HAVE_LLVM < 0x0307 - LLVMInitializeR600TargetInfo(); - LLVMInitializeR600Target(); - LLVMInitializeR600TargetMC(); - LLVMInitializeR600AsmPrinter(); -#else LLVMInitializeAMDGPUTargetInfo(); LLVMInitializeAMDGPUTarget(); LLVMInitializeAMDGPUTargetMC(); LLVMInitializeAMDGPUAsmPrinter(); -#endif } static once_flag ac_init_llvm_target_once_flag = ONCE_FLAG_INIT; @@ -97,18 +90,11 @@ static const char *ac_get_llvm_processor_name(enum radeon_family family) return "iceland"; case CHIP_CARRIZO: return "carrizo"; -#if HAVE_LLVM <= 0x0307 - case CHIP_FIJI: - return "tonga"; - case CHIP_STONEY: - return "carrizo"; -#else case CHIP_FIJI: return "fiji"; case CHIP_STONEY: return "stoney"; -#endif -#if HAVE_LLVM <= 0x0308 +#if HAVE_LLVM == 0x0308 case CHIP_POLARIS10: return "tonga"; case CHIP_POLARIS11: |